@nextcloud/vue 3.10.2 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +114 -19
- package/README.md +9 -10
- package/dist/Components/ActionButton.js +24 -3
- package/dist/Components/ActionButton.js.map +1 -1
- package/dist/Components/ActionCaption.js +23 -0
- package/dist/Components/ActionCaption.js.map +1 -0
- package/dist/Components/ActionCheckbox.js +24 -3
- package/dist/Components/ActionCheckbox.js.map +1 -1
- package/dist/Components/ActionInput.js +124 -21
- package/dist/Components/ActionInput.js.map +1 -1
- package/dist/Components/ActionLink.js +24 -3
- package/dist/Components/ActionLink.js.map +1 -1
- package/dist/Components/ActionRadio.js +24 -3
- package/dist/Components/ActionRadio.js.map +1 -1
- package/dist/Components/ActionRouter.js +23 -2
- package/dist/Components/ActionRouter.js.map +1 -1
- package/dist/Components/ActionSeparator.js +1 -1
- package/dist/Components/ActionSeparator.js.map +1 -1
- package/dist/Components/ActionText.js +23 -2
- package/dist/Components/ActionText.js.map +1 -1
- package/dist/Components/ActionTextEditable.js +45 -3
- package/dist/Components/ActionTextEditable.js.map +1 -1
- package/dist/Components/Actions.js +25 -4
- package/dist/Components/Actions.js.map +1 -1
- package/dist/Components/AppContent.js +21 -1
- package/dist/Components/AppContent.js.map +1 -1
- package/dist/Components/AppContentDetails.js +1 -1
- package/dist/Components/AppContentDetails.js.map +1 -1
- package/dist/Components/AppContentList.js +1 -1
- package/dist/Components/AppContentList.js.map +1 -1
- package/dist/Components/AppNavigation.js +109 -2
- package/dist/Components/AppNavigation.js.map +1 -1
- package/dist/Components/AppNavigationCaption.js +66 -1
- package/dist/Components/AppNavigationCaption.js.map +1 -1
- package/dist/Components/AppNavigationCounter.js +2 -2
- package/dist/Components/AppNavigationCounter.js.map +1 -1
- package/dist/Components/AppNavigationIconBullet.js +2 -2
- package/dist/Components/AppNavigationIconBullet.js.map +1 -1
- package/dist/Components/AppNavigationItem.js +49 -7
- package/dist/Components/AppNavigationItem.js.map +1 -1
- package/dist/Components/AppNavigationNew.js +1 -1
- package/dist/Components/AppNavigationNew.js.map +1 -1
- package/dist/Components/AppNavigationNewItem.js +2 -2
- package/dist/Components/AppNavigationNewItem.js.map +1 -1
- package/dist/Components/AppNavigationSettings.js +5 -5
- package/dist/Components/AppNavigationSettings.js.map +1 -1
- package/dist/Components/AppNavigationSpacer.js +1 -1
- package/dist/Components/AppNavigationSpacer.js.map +1 -1
- package/dist/Components/AppNavigationToggle.js +109 -2
- package/dist/Components/AppNavigationToggle.js.map +1 -1
- package/dist/Components/AppSettingsDialog.js +64 -22
- package/dist/Components/AppSettingsDialog.js.map +1 -1
- package/dist/Components/AppSettingsSection.js +1 -1
- package/dist/Components/AppSettingsSection.js.map +1 -1
- package/dist/Components/AppSidebar.js +38 -17
- package/dist/Components/AppSidebar.js.map +1 -1
- package/dist/Components/AppSidebarTab.js +1 -1
- package/dist/Components/AppSidebarTab.js.map +1 -1
- package/dist/Components/Avatar.js +9 -10
- package/dist/Components/Avatar.js.map +1 -1
- package/dist/Components/Breadcrumb.js +33 -12
- package/dist/Components/Breadcrumb.js.map +1 -1
- package/dist/Components/Breadcrumbs.js +59 -17
- package/dist/Components/Breadcrumbs.js.map +1 -1
- package/dist/Components/CheckboxRadioSwitch.js +44 -0
- package/dist/Components/CheckboxRadioSwitch.js.map +1 -0
- package/dist/Components/ColorPicker.js +6 -7
- package/dist/Components/ColorPicker.js.map +1 -1
- package/dist/Components/Content.js +2 -2
- package/dist/Components/Content.js.map +1 -1
- package/dist/Components/CounterBubble.js +23 -0
- package/dist/Components/CounterBubble.js.map +1 -0
- package/dist/Components/DatetimePicker.js +341 -3
- package/dist/Components/DatetimePicker.js.map +1 -1
- package/dist/Components/EmojiPicker.js +14 -14
- package/dist/Components/EmojiPicker.js.map +1 -1
- package/dist/Components/EmptyContent.js +2 -2
- package/dist/Components/EmptyContent.js.map +1 -1
- package/dist/Components/Highlight.js +3 -3
- package/dist/Components/Highlight.js.map +1 -1
- package/dist/Components/ListItem.js +130 -0
- package/dist/Components/ListItem.js.map +1 -0
- package/dist/Components/ListItemIcon.js +20 -21
- package/dist/Components/ListItemIcon.js.map +1 -1
- package/dist/Components/Modal.js +53 -11
- package/dist/Components/Modal.js.map +1 -1
- package/dist/Components/Multiselect.js +22 -23
- package/dist/Components/Multiselect.js.map +1 -1
- package/dist/Components/MultiselectTags.js +24 -25
- package/dist/Components/MultiselectTags.js.map +1 -1
- package/dist/Components/Popover.js +2 -2
- package/dist/Components/Popover.js.map +1 -1
- package/dist/Components/PopoverMenu.js +1 -1
- package/dist/Components/PopoverMenu.js.map +1 -1
- package/dist/Components/ProgressBar.js +2 -2
- package/dist/Components/ProgressBar.js.map +1 -1
- package/dist/Components/RichContenteditable.js +2 -2
- package/dist/Components/RichContenteditable.js.map +1 -1
- package/dist/Components/SettingsInputText.js +22 -1
- package/dist/Components/SettingsInputText.js.map +1 -1
- package/dist/Components/SettingsSection.js +2 -2
- package/dist/Components/SettingsSection.js.map +1 -1
- package/dist/Components/SettingsSelectGroup.js +41 -21
- package/dist/Components/SettingsSelectGroup.js.map +1 -1
- package/dist/Components/TimezonePicker.js +340 -0
- package/dist/Components/TimezonePicker.js.map +1 -0
- package/dist/Components/UserBubble.js +35 -36
- package/dist/Components/UserBubble.js.map +1 -1
- package/dist/Directives/Focus.js +1 -1
- package/dist/Directives/Focus.js.map +1 -1
- package/dist/Directives/Linkify.js +1 -1
- package/dist/Directives/Linkify.js.map +1 -1
- package/dist/Directives/Tooltip.js +2 -2
- package/dist/Directives/Tooltip.js.map +1 -1
- package/dist/Functions/usernameToColor.js +2 -3
- package/dist/Functions/usernameToColor.js.map +1 -1
- package/dist/Mixins/excludeClickOutsideClasses.js +2 -2
- package/dist/Mixins/excludeClickOutsideClasses.js.map +1 -1
- package/dist/Mixins/isFullscreen.js +1 -1
- package/dist/Mixins/isFullscreen.js.map +1 -1
- package/dist/Mixins/isMobile.js +1 -1
- package/dist/Mixins/isMobile.js.map +1 -1
- package/dist/Mixins/richEditor.js +1 -1
- package/dist/Mixins/richEditor.js.map +1 -1
- package/dist/ncvuecomponents.js +276 -69
- package/dist/ncvuecomponents.js.map +1 -1
- package/package.json +28 -43
- package/src/assets/action.scss +0 -132
- package/src/assets/iconfont/README.md +0 -30
- package/src/assets/iconfont/arrow-left-double.svg +0 -3
- package/src/assets/iconfont/arrow-left.svg +0 -3
- package/src/assets/iconfont/arrow-right-double.svg +0 -3
- package/src/assets/iconfont/arrow-right.svg +0 -3
- package/src/assets/iconfont/breadcrumb.svg +0 -1
- package/src/assets/iconfont/checkmark.svg +0 -1
- package/src/assets/iconfont/close.svg +0 -1
- package/src/assets/iconfont/confirm.svg +0 -1
- package/src/assets/iconfont/info.svg +0 -1
- package/src/assets/iconfont/menu.svg +0 -1
- package/src/assets/iconfont/more.svg +0 -1
- package/src/assets/iconfont/pause.svg +0 -1
- package/src/assets/iconfont/play.svg +0 -1
- package/src/assets/iconfont/triangle-s.svg +0 -1
- package/src/assets/iconfont/user-status-away.svg +0 -2
- package/src/assets/iconfont/user-status-dnd.svg +0 -2
- package/src/assets/iconfont/user-status-invisible.svg +0 -2
- package/src/assets/iconfont/user-status-online.svg +0 -2
- package/src/assets/inputs.scss +0 -104
- package/src/assets/variables.scss +0 -57
- package/src/components/ActionButton/ActionButton.vue +0 -160
- package/src/components/ActionButton/index.js +0 -24
- package/src/components/ActionCheckbox/ActionCheckbox.vue +0 -220
- package/src/components/ActionCheckbox/index.js +0 -24
- package/src/components/ActionInput/ActionInput.vue +0 -418
- package/src/components/ActionInput/index.js +0 -24
- package/src/components/ActionLink/ActionLink.vue +0 -132
- package/src/components/ActionLink/index.js +0 -24
- package/src/components/ActionRadio/ActionRadio.vue +0 -219
- package/src/components/ActionRadio/index.js +0 -24
- package/src/components/ActionRouter/ActionRouter.vue +0 -100
- package/src/components/ActionRouter/index.js +0 -24
- package/src/components/ActionSeparator/ActionSeparator.vue +0 -43
- package/src/components/ActionSeparator/index.js +0 -24
- package/src/components/ActionText/ActionText.vue +0 -87
- package/src/components/ActionText/index.js +0 -24
- package/src/components/ActionTextEditable/ActionTextEditable.vue +0 -306
- package/src/components/ActionTextEditable/index.js +0 -24
- package/src/components/Actions/Actions.vue +0 -764
- package/src/components/Actions/index.js +0 -24
- package/src/components/AppContent/AppContent.vue +0 -93
- package/src/components/AppContent/index.js +0 -23
- package/src/components/AppContentDetails/AppContentDetails.vue +0 -34
- package/src/components/AppContentDetails/index.js +0 -23
- package/src/components/AppContentList/AppContentList.vue +0 -44
- package/src/components/AppContentList/index.js +0 -23
- package/src/components/AppNavigation/AppNavigation.vue +0 -190
- package/src/components/AppNavigation/index.js +0 -23
- package/src/components/AppNavigationCaption/AppNavigationCaption.vue +0 -39
- package/src/components/AppNavigationCaption/index.js +0 -3
- package/src/components/AppNavigationCounter/AppNavigationCounter.vue +0 -82
- package/src/components/AppNavigationCounter/index.js +0 -25
- package/src/components/AppNavigationIconBullet/AppNavigationIconBullet.vue +0 -95
- package/src/components/AppNavigationIconBullet/index.js +0 -24
- package/src/components/AppNavigationItem/AppNavigationIconCollapsible.vue +0 -90
- package/src/components/AppNavigationItem/AppNavigationItem.vue +0 -629
- package/src/components/AppNavigationItem/InputConfirmCancel.vue +0 -134
- package/src/components/AppNavigationItem/index.js +0 -24
- package/src/components/AppNavigationNew/AppNavigationNew.vue +0 -76
- package/src/components/AppNavigationNew/index.js +0 -23
- package/src/components/AppNavigationNewItem/AppNavigationNewItem.vue +0 -165
- package/src/components/AppNavigationNewItem/index.js +0 -24
- package/src/components/AppNavigationSettings/AppNavigationSettings.vue +0 -105
- package/src/components/AppNavigationSettings/index.js +0 -23
- package/src/components/AppNavigationSpacer/AppNavigationSpacer.vue +0 -39
- package/src/components/AppNavigationSpacer/index.js +0 -23
- package/src/components/AppNavigationToggle/AppNavigationToggle.vue +0 -78
- package/src/components/AppNavigationToggle/index.js +0 -24
- package/src/components/AppSettingsDialog/AppSettingsDialog.vue +0 -331
- package/src/components/AppSettingsDialog/index.js +0 -25
- package/src/components/AppSettingsSection/AppSettingsSection.vue +0 -64
- package/src/components/AppSettingsSection/index.js +0 -25
- package/src/components/AppSidebar/AppSidebar.vue +0 -802
- package/src/components/AppSidebar/AppSidebarTabs.vue +0 -348
- package/src/components/AppSidebar/index.js +0 -23
- package/src/components/AppSidebarTab/AppSidebarTab.vue +0 -103
- package/src/components/AppSidebarTab/index.js +0 -23
- package/src/components/Avatar/Avatar.vue +0 -758
- package/src/components/Avatar/index.js +0 -25
- package/src/components/Breadcrumb/Breadcrumb.vue +0 -262
- package/src/components/Breadcrumb/index.js +0 -25
- package/src/components/Breadcrumbs/Breadcrumbs.vue +0 -537
- package/src/components/Breadcrumbs/index.js +0 -25
- package/src/components/ColorPicker/ColorPicker.vue +0 -380
- package/src/components/ColorPicker/index.js +0 -25
- package/src/components/Content/Content.vue +0 -77
- package/src/components/Content/index.js +0 -23
- package/src/components/DatetimePicker/DatetimePicker.vue +0 -195
- package/src/components/DatetimePicker/index.js +0 -28
- package/src/components/DatetimePicker/index.scss +0 -405
- package/src/components/EmojiPicker/EmojiPicker.vue +0 -302
- package/src/components/EmojiPicker/index.js +0 -23
- package/src/components/EmptyContent/EmptyContent.vue +0 -120
- package/src/components/EmptyContent/index.js +0 -24
- package/src/components/Highlight/Highlight.vue +0 -183
- package/src/components/Highlight/index.js +0 -25
- package/src/components/ListItemIcon/ListItemIcon.vue +0 -277
- package/src/components/ListItemIcon/index.js +0 -25
- package/src/components/Modal/Modal.vue +0 -833
- package/src/components/Modal/index.js +0 -27
- package/src/components/Multiselect/EllipsisedOption.vue +0 -141
- package/src/components/Multiselect/Multiselect.vue +0 -430
- package/src/components/Multiselect/index.js +0 -28
- package/src/components/Multiselect/index.scss +0 -290
- package/src/components/MultiselectTags/MultiselectTags.vue +0 -179
- package/src/components/MultiselectTags/api.js +0 -115
- package/src/components/MultiselectTags/index.js +0 -23
- package/src/components/Popover/Popover.vue +0 -208
- package/src/components/Popover/index.js +0 -25
- package/src/components/PopoverMenu/PopoverMenu.vue +0 -62
- package/src/components/PopoverMenu/PopoverMenuItem.vue +0 -382
- package/src/components/PopoverMenu/index.js +0 -24
- package/src/components/ProgressBar/ProgressBar.vue +0 -135
- package/src/components/ProgressBar/index.js +0 -25
- package/src/components/RichContenteditable/AutoCompleteResult.vue +0 -191
- package/src/components/RichContenteditable/MentionBubble.vue +0 -165
- package/src/components/RichContenteditable/RichContenteditable.vue +0 -517
- package/src/components/RichContenteditable/index.js +0 -25
- package/src/components/SettingsInputText/SettingsInputText.vue +0 -207
- package/src/components/SettingsInputText/index.js +0 -24
- package/src/components/SettingsSection/SettingsSection.vue +0 -151
- package/src/components/SettingsSection/index.js +0 -24
- package/src/components/SettingsSelectGroup/SettingsSelectGroup.vue +0 -149
- package/src/components/SettingsSelectGroup/index.js +0 -25
- package/src/components/UserBubble/UserBubble.vue +0 -319
- package/src/components/UserBubble/index.js +0 -25
- package/src/components/index.js +0 -110
- package/src/directives/Focus/index.js +0 -29
- package/src/directives/Linkify/index.js +0 -31
- package/src/directives/Tooltip/index.js +0 -32
- package/src/directives/Tooltip/index.scss +0 -117
- package/src/directives/index.js +0 -31
- package/src/fonts/iconfont-vue-f56d517.eot +0 -0
- package/src/fonts/iconfont-vue-f56d517.svg +0 -1
- package/src/fonts/iconfont-vue-f56d517.ttf +0 -0
- package/src/fonts/iconfont-vue-f56d517.woff +0 -0
- package/src/fonts/scss/iconfont-vue.scss +0 -115
- package/src/functions/usernameToColor/index.js +0 -25
- package/src/functions/usernameToColor/usernameToColor.js +0 -68
- package/src/index.js +0 -40
- package/src/l10n.js +0 -42
- package/src/mixins/actionGlobal.js +0 -59
- package/src/mixins/actionText.js +0 -85
- package/src/mixins/excludeClickOutsideClasses/index.js +0 -72
- package/src/mixins/index.js +0 -35
- package/src/mixins/isFullscreen/index.js +0 -46
- package/src/mixins/isMobile/index.js +0 -43
- package/src/mixins/l10n.js +0 -8
- package/src/mixins/richEditor/index.js +0 -160
- package/src/mixins/userStatus.js +0 -76
- package/src/utils/FindRanges.js +0 -47
- package/src/utils/GenColors.js +0 -79
- package/src/utils/GenRandomId.js +0 -31
- package/src/utils/GetChildren.js +0 -47
- package/src/utils/GetParent.js +0 -41
- package/src/utils/IsMobileState.js +0 -49
- package/src/utils/IsOutOfViewport.js +0 -36
- package/src/utils/ScopeComponent.js +0 -37
- package/src/utils/Timer.js +0 -61
- package/src/utils/ValidateChildren.js +0 -50
- package/src/utils/ValidateSlot.js +0 -57
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) 2020 Marco Ambrosini <marcoambrosini@pm.me>
|
|
3
|
-
*
|
|
4
|
-
* @author Marco Ambrosini <marcoambrosini@pm.me>
|
|
5
|
-
*
|
|
6
|
-
* @license GNU AGPL version 3 or any later version
|
|
7
|
-
*
|
|
8
|
-
* This program is free software: you can redistribute it and/or modify
|
|
9
|
-
* it under the terms of the GNU Affero General Public License as
|
|
10
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
11
|
-
* License, or (at your option) any later version.
|
|
12
|
-
*
|
|
13
|
-
* This program is distributed in the hope that it will be useful,
|
|
14
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
* GNU Affero General Public License for more details.
|
|
17
|
-
*
|
|
18
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
19
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
import AppSettingsDialog from './AppSettingsDialog'
|
|
24
|
-
|
|
25
|
-
export default AppSettingsDialog
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
- @copyright Copyright (c) 2020 Marco Ambrosini <marcoambrosini@pm.me>
|
|
3
|
-
-
|
|
4
|
-
- @author Marco Ambrosini <marcoambrosini@pm.me>
|
|
5
|
-
-
|
|
6
|
-
- @license GNU AGPL version 3 or any later version
|
|
7
|
-
-
|
|
8
|
-
- This program is free software: you can redistribute it and/or modify
|
|
9
|
-
- it under the terms of the GNU Affero General Public License as
|
|
10
|
-
- published by the Free Software Foundation, either version 3 of the
|
|
11
|
-
- License, or (at your option) any later version.
|
|
12
|
-
-
|
|
13
|
-
- This program is distributed in the hope that it will be useful,
|
|
14
|
-
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
- GNU Affero General Public License for more details.
|
|
17
|
-
-
|
|
18
|
-
- You should have received a copy of the GNU Affero General Public License
|
|
19
|
-
- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
-
|
|
21
|
-
-->`
|
|
22
|
-
|
|
23
|
-
<template>
|
|
24
|
-
<div :id="id" class="app-settings-section">
|
|
25
|
-
<h3 :id="title"
|
|
26
|
-
class="app-settings-section__title">
|
|
27
|
-
{{ title }}
|
|
28
|
-
</h3>
|
|
29
|
-
<slot />
|
|
30
|
-
</div>
|
|
31
|
-
</template>
|
|
32
|
-
|
|
33
|
-
<script>
|
|
34
|
-
export default {
|
|
35
|
-
name: 'AppSettingsSection',
|
|
36
|
-
|
|
37
|
-
props: {
|
|
38
|
-
title: {
|
|
39
|
-
type: String,
|
|
40
|
-
required: true,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
computed: {
|
|
44
|
-
// generate an id for each settingssection based on the title without whitespaces
|
|
45
|
-
id() {
|
|
46
|
-
return 'settings-section_' + this.title.replace(/\s+/g, '')
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
<style lang="scss" scoped>
|
|
54
|
-
.app-settings-section {
|
|
55
|
-
margin-bottom: 80px;
|
|
56
|
-
&__title {
|
|
57
|
-
font-size: 20px;
|
|
58
|
-
font-weight: bold;
|
|
59
|
-
overflow: hidden;
|
|
60
|
-
white-space: nowrap;
|
|
61
|
-
text-overflow: ellipsis;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
</style>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) 2020 Marco Ambrosini <marcoambrosini@pm.me>
|
|
3
|
-
*
|
|
4
|
-
* @author Marco Ambrosini <marcoambrosini@pm.me>
|
|
5
|
-
*
|
|
6
|
-
* @license GNU AGPL version 3 or any later version
|
|
7
|
-
*
|
|
8
|
-
* This program is free software: you can redistribute it and/or modify
|
|
9
|
-
* it under the terms of the GNU Affero General Public License as
|
|
10
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
11
|
-
* License, or (at your option) any later version.
|
|
12
|
-
*
|
|
13
|
-
* This program is distributed in the hope that it will be useful,
|
|
14
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
* GNU Affero General Public License for more details.
|
|
17
|
-
*
|
|
18
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
19
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
import AppSettingsSection from './AppSettingsSection'
|
|
24
|
-
|
|
25
|
-
export default AppSettingsSection
|
|
@@ -1,802 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
- @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
|
|
3
|
-
-
|
|
4
|
-
- @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
5
|
-
-
|
|
6
|
-
- @license GNU AGPL version 3 or any later version
|
|
7
|
-
-
|
|
8
|
-
- This program is free software: you can redistribute it and/or modify
|
|
9
|
-
- it under the terms of the GNU Affero General Public License as
|
|
10
|
-
- published by the Free Software Foundation, either version 3 of the
|
|
11
|
-
- License, or (at your option) any later version.
|
|
12
|
-
-
|
|
13
|
-
- This program is distributed in the hope that it will be useful,
|
|
14
|
-
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
- GNU Affero General Public License for more details.
|
|
17
|
-
-
|
|
18
|
-
- You should have received a copy of the GNU Affero General Public License
|
|
19
|
-
- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
-
|
|
21
|
-
-->
|
|
22
|
-
|
|
23
|
-
<docs>
|
|
24
|
-
### General description
|
|
25
|
-
|
|
26
|
-
This component provides a way to include the standardised sidebar.
|
|
27
|
-
The standard properties like title, subtitle, starred, etc. allow to automatically
|
|
28
|
-
include a standard-header like it's used by the files app.
|
|
29
|
-
|
|
30
|
-
### Standard usage
|
|
31
|
-
|
|
32
|
-
```vue
|
|
33
|
-
<AppSidebar
|
|
34
|
-
title="cat-picture.jpg"
|
|
35
|
-
subtitle="last edited 3 weeks ago">
|
|
36
|
-
<AppSidebarTab icon="icon-settings" name="Settings" id="settings">
|
|
37
|
-
Settings tab content
|
|
38
|
-
</AppSidebarTab>
|
|
39
|
-
<AppSidebarTab icon="icon-share" name="Sharing" id="share">
|
|
40
|
-
Sharing tab content
|
|
41
|
-
</AppSidebarTab>
|
|
42
|
-
</AppSidebar>
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Editable title
|
|
46
|
-
|
|
47
|
-
```vue
|
|
48
|
-
<template>
|
|
49
|
-
<AppSidebar
|
|
50
|
-
:title.sync="title"
|
|
51
|
-
:title-editable="true"
|
|
52
|
-
title-placeholder="Filename"
|
|
53
|
-
subtitle="last edited 3 weeks ago">
|
|
54
|
-
<!-- Insert your slots and tabs here -->
|
|
55
|
-
</AppSidebar>
|
|
56
|
-
</template>
|
|
57
|
-
<script>
|
|
58
|
-
export default {
|
|
59
|
-
data() {
|
|
60
|
-
return {
|
|
61
|
-
title: 'cat-picture.jpg',
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
}
|
|
65
|
-
</script>
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Editable title after click with custom tertiary action
|
|
69
|
-
|
|
70
|
-
```vue
|
|
71
|
-
<template>
|
|
72
|
-
<AppSidebar
|
|
73
|
-
:title="title"
|
|
74
|
-
:title-editable.sync="titleEditable"
|
|
75
|
-
:title-placeholder="titlePlaceholder"
|
|
76
|
-
:subtitle="subtitle"
|
|
77
|
-
@update:title="titleUpdate">
|
|
78
|
-
<template slot="tertiary-actions">
|
|
79
|
-
<form>
|
|
80
|
-
<input type="checkbox" @click="toggledCheckbox"/>
|
|
81
|
-
</form>
|
|
82
|
-
</template>
|
|
83
|
-
</AppSidebar>
|
|
84
|
-
</template>
|
|
85
|
-
<script>
|
|
86
|
-
export default {
|
|
87
|
-
data() {
|
|
88
|
-
return {
|
|
89
|
-
title: 'cat-picture.jpg',
|
|
90
|
-
titlePlaceholder: 'Filename',
|
|
91
|
-
subtitle: 'last edited 3 weeks ago',
|
|
92
|
-
titleEditable: false
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
methods: {
|
|
96
|
-
titleUpdate(e) {
|
|
97
|
-
this.title = e
|
|
98
|
-
},
|
|
99
|
-
toggledCheckbox() {
|
|
100
|
-
alert('toggle')
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
</script>
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### Empty sidebar for e.g. empty content component.
|
|
108
|
-
|
|
109
|
-
```vue
|
|
110
|
-
<template>
|
|
111
|
-
<AppSidebar
|
|
112
|
-
title="cat-picture.jpg"
|
|
113
|
-
:empty="true">
|
|
114
|
-
<EmptyContent icon="icon-search">
|
|
115
|
-
Content not found.
|
|
116
|
-
</EmptyContent>
|
|
117
|
-
</AppSidebar>
|
|
118
|
-
</template>
|
|
119
|
-
```
|
|
120
|
-
</docs>
|
|
121
|
-
|
|
122
|
-
<template>
|
|
123
|
-
<transition
|
|
124
|
-
appear
|
|
125
|
-
name="slide-right"
|
|
126
|
-
@before-enter="onBeforeEnter"
|
|
127
|
-
@after-enter="onAfterEnter"
|
|
128
|
-
@before-leave="onBeforeLeave"
|
|
129
|
-
@after-leave="onAfterLeave">
|
|
130
|
-
<aside id="app-sidebar-vue" class="app-sidebar">
|
|
131
|
-
<header :class="{
|
|
132
|
-
'app-sidebar-header--with-figure': hasFigure,
|
|
133
|
-
'app-sidebar-header--compact': compact,
|
|
134
|
-
}"
|
|
135
|
-
class="app-sidebar-header">
|
|
136
|
-
<!-- close sidebar button -->
|
|
137
|
-
<a
|
|
138
|
-
v-tooltip.auto="closeTranslated"
|
|
139
|
-
href="#"
|
|
140
|
-
class="app-sidebar__close icon-close"
|
|
141
|
-
@click.prevent="closeSidebar" />
|
|
142
|
-
|
|
143
|
-
<!-- container for figure and description, allows easy switching to compact mode -->
|
|
144
|
-
<div class="app-sidebar-header__info">
|
|
145
|
-
<!-- sidebar header illustration/figure -->
|
|
146
|
-
<div v-if="hasFigure && !empty"
|
|
147
|
-
:class="{
|
|
148
|
-
'app-sidebar-header__figure--with-action': hasFigureClickListener
|
|
149
|
-
}"
|
|
150
|
-
class="app-sidebar-header__figure"
|
|
151
|
-
:style="{
|
|
152
|
-
backgroundImage: `url(${background})`
|
|
153
|
-
}"
|
|
154
|
-
@click="onFigureClick">
|
|
155
|
-
<slot class="app-sidebar-header__background" name="header" />
|
|
156
|
-
</div>
|
|
157
|
-
|
|
158
|
-
<!-- sidebar details -->
|
|
159
|
-
<div v-if="!empty"
|
|
160
|
-
:class="{
|
|
161
|
-
'app-sidebar-header__desc--with-tertiary-action': canStar || $slots['tertiary-actions'],
|
|
162
|
-
'app-sidebar-header__desc--editable': titleEditable && !subtitle,
|
|
163
|
-
'app-sidebar-header__desc--with-subtitle--editable': titleEditable && subtitle,
|
|
164
|
-
'app-sidebar-header__desc--without-actions': !$slots['secondary-actions'],
|
|
165
|
-
}"
|
|
166
|
-
class="app-sidebar-header__desc">
|
|
167
|
-
<!-- favourite icon -->
|
|
168
|
-
<div v-if="canStar || $slots['tertiary-actions']" class="app-sidebar-header__tertiary-actions">
|
|
169
|
-
<slot name="tertiary-actions">
|
|
170
|
-
<a v-if="canStar"
|
|
171
|
-
:class="{
|
|
172
|
-
'icon-starred': isStarred && !starLoading,
|
|
173
|
-
'icon-star': !isStarred && !starLoading,
|
|
174
|
-
'icon-loading-small': starLoading,
|
|
175
|
-
}"
|
|
176
|
-
class="app-sidebar-header__star"
|
|
177
|
-
@click.prevent="toggleStarred" />
|
|
178
|
-
</slot>
|
|
179
|
-
</div>
|
|
180
|
-
|
|
181
|
-
<!-- title -->
|
|
182
|
-
<div class="app-sidebar-header__title-container">
|
|
183
|
-
<!-- main title -->
|
|
184
|
-
<h2 v-show="!titleEditable"
|
|
185
|
-
v-linkify="{text: title, linkify: linkifyTitle}"
|
|
186
|
-
v-tooltip.auto="titleTooltip"
|
|
187
|
-
class="app-sidebar-header__maintitle"
|
|
188
|
-
@click.self="editTitle">
|
|
189
|
-
{{ title }}
|
|
190
|
-
</h2>
|
|
191
|
-
<template v-if="titleEditable">
|
|
192
|
-
<form
|
|
193
|
-
v-click-outside="() => onSubmitTitle()"
|
|
194
|
-
class="app-sidebar-header__maintitle-form"
|
|
195
|
-
@submit.prevent="onSubmitTitle">
|
|
196
|
-
<input
|
|
197
|
-
ref="titleInput"
|
|
198
|
-
v-focus
|
|
199
|
-
class="app-sidebar-header__maintitle-input"
|
|
200
|
-
type="text"
|
|
201
|
-
:placeholder="titlePlaceholder"
|
|
202
|
-
:value="title"
|
|
203
|
-
@keydown.esc="onDismissEditing"
|
|
204
|
-
@input="onTitleInput">
|
|
205
|
-
<button
|
|
206
|
-
class="icon-confirm"
|
|
207
|
-
type="submit" />
|
|
208
|
-
</form>
|
|
209
|
-
</template>
|
|
210
|
-
<!-- secondary title -->
|
|
211
|
-
<p
|
|
212
|
-
v-if="subtitle.trim() !== ''"
|
|
213
|
-
v-tooltip.auto="subtitleTooltip"
|
|
214
|
-
class="app-sidebar-header__subtitle">
|
|
215
|
-
{{ subtitle }}
|
|
216
|
-
</p>
|
|
217
|
-
</div>
|
|
218
|
-
|
|
219
|
-
<!-- header main menu -->
|
|
220
|
-
<Actions v-if="$slots['secondary-actions']" class="app-sidebar-header__menu" :force-menu="forceMenu">
|
|
221
|
-
<slot name="secondary-actions" />
|
|
222
|
-
</Actions>
|
|
223
|
-
</div>
|
|
224
|
-
</div>
|
|
225
|
-
<div v-if="$slots['description'] && !empty" class="app-sidebar-header__description">
|
|
226
|
-
<slot name="description" />
|
|
227
|
-
</div>
|
|
228
|
-
</header>
|
|
229
|
-
|
|
230
|
-
<AppSidebarTabs v-show="!loading"
|
|
231
|
-
ref="tabs"
|
|
232
|
-
:active="active"
|
|
233
|
-
@update:active="onUpdateActive">
|
|
234
|
-
<slot />
|
|
235
|
-
</AppSidebarTabs>
|
|
236
|
-
|
|
237
|
-
<EmptyContent v-if="loading" icon="icon-loading" />
|
|
238
|
-
</aside>
|
|
239
|
-
</transition>
|
|
240
|
-
</template>
|
|
241
|
-
|
|
242
|
-
<script>
|
|
243
|
-
import Actions from '../Actions'
|
|
244
|
-
import Focus from '../../directives/Focus'
|
|
245
|
-
import Linkify from '../../directives/Linkify'
|
|
246
|
-
import Tooltip from '../../directives/Tooltip'
|
|
247
|
-
import AppSidebarTabs from './AppSidebarTabs'
|
|
248
|
-
import EmptyContent from '../EmptyContent/EmptyContent'
|
|
249
|
-
import { t } from '../../l10n'
|
|
250
|
-
import { directive as ClickOutside } from 'v-click-outside'
|
|
251
|
-
|
|
252
|
-
export default {
|
|
253
|
-
name: 'AppSidebar',
|
|
254
|
-
|
|
255
|
-
components: {
|
|
256
|
-
Actions,
|
|
257
|
-
AppSidebarTabs,
|
|
258
|
-
EmptyContent,
|
|
259
|
-
},
|
|
260
|
-
|
|
261
|
-
directives: {
|
|
262
|
-
focus: Focus,
|
|
263
|
-
linkify: Linkify,
|
|
264
|
-
ClickOutside,
|
|
265
|
-
Tooltip,
|
|
266
|
-
},
|
|
267
|
-
|
|
268
|
-
props: {
|
|
269
|
-
active: {
|
|
270
|
-
type: String,
|
|
271
|
-
default: '',
|
|
272
|
-
},
|
|
273
|
-
title: {
|
|
274
|
-
type: String,
|
|
275
|
-
default: '',
|
|
276
|
-
required: true,
|
|
277
|
-
},
|
|
278
|
-
|
|
279
|
-
/**
|
|
280
|
-
* Allow to edit the sidebar title.
|
|
281
|
-
*/
|
|
282
|
-
titleEditable: {
|
|
283
|
-
type: Boolean,
|
|
284
|
-
default: false,
|
|
285
|
-
},
|
|
286
|
-
titlePlaceholder: {
|
|
287
|
-
type: String,
|
|
288
|
-
default: '',
|
|
289
|
-
},
|
|
290
|
-
subtitle: {
|
|
291
|
-
type: String,
|
|
292
|
-
default: '',
|
|
293
|
-
},
|
|
294
|
-
subtitleTooltip: {
|
|
295
|
-
type: String,
|
|
296
|
-
default: '',
|
|
297
|
-
},
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Url to the top header background image
|
|
301
|
-
* Applied with css
|
|
302
|
-
*/
|
|
303
|
-
background: {
|
|
304
|
-
type: String,
|
|
305
|
-
default: '',
|
|
306
|
-
},
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* Enable the favourite icon if not null
|
|
310
|
-
* See fired events
|
|
311
|
-
*/
|
|
312
|
-
starred: {
|
|
313
|
-
type: Boolean,
|
|
314
|
-
default: null,
|
|
315
|
-
},
|
|
316
|
-
/**
|
|
317
|
-
* Show loading spinner instead of the star icon
|
|
318
|
-
*/
|
|
319
|
-
starLoading: {
|
|
320
|
-
type: Boolean,
|
|
321
|
-
default: false,
|
|
322
|
-
},
|
|
323
|
-
/**
|
|
324
|
-
* Show loading spinner instead of tabs
|
|
325
|
-
*/
|
|
326
|
-
loading: {
|
|
327
|
-
type: Boolean,
|
|
328
|
-
default: false,
|
|
329
|
-
},
|
|
330
|
-
|
|
331
|
-
/**
|
|
332
|
-
* Display the sidebar in compact mode
|
|
333
|
-
*/
|
|
334
|
-
compact: {
|
|
335
|
-
type: Boolean,
|
|
336
|
-
default: false,
|
|
337
|
-
},
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* Only display close button and default slot content.
|
|
341
|
-
* Don't display other header content and primary and secondary actions.
|
|
342
|
-
* Useful when showing the EmptyContent component as content.
|
|
343
|
-
*/
|
|
344
|
-
empty: {
|
|
345
|
-
type: Boolean,
|
|
346
|
-
default: false,
|
|
347
|
-
},
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* Force the actions to display in a three dot menu
|
|
351
|
-
*/
|
|
352
|
-
forceMenu: {
|
|
353
|
-
type: Boolean,
|
|
354
|
-
default: false,
|
|
355
|
-
},
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Linkify the title
|
|
359
|
-
*/
|
|
360
|
-
linkifyTitle: {
|
|
361
|
-
type: Boolean,
|
|
362
|
-
default: false,
|
|
363
|
-
},
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* Tooltip to display for the title.
|
|
367
|
-
* Can be set to the same text in case it's too long.
|
|
368
|
-
*/
|
|
369
|
-
titleTooltip: {
|
|
370
|
-
type: String,
|
|
371
|
-
default: '',
|
|
372
|
-
},
|
|
373
|
-
},
|
|
374
|
-
|
|
375
|
-
data() {
|
|
376
|
-
return {
|
|
377
|
-
closeTranslated: t('Close'),
|
|
378
|
-
isStarred: this.starred,
|
|
379
|
-
}
|
|
380
|
-
},
|
|
381
|
-
|
|
382
|
-
computed: {
|
|
383
|
-
canStar() {
|
|
384
|
-
return this.isStarred !== null
|
|
385
|
-
},
|
|
386
|
-
hasFigure() {
|
|
387
|
-
return this.$slots.header || this.background
|
|
388
|
-
},
|
|
389
|
-
hasFigureClickListener() {
|
|
390
|
-
return this.$listeners['figure-click']
|
|
391
|
-
},
|
|
392
|
-
},
|
|
393
|
-
|
|
394
|
-
watch: {
|
|
395
|
-
starred() {
|
|
396
|
-
this.isStarred = this.starred
|
|
397
|
-
},
|
|
398
|
-
},
|
|
399
|
-
|
|
400
|
-
beforeDestroy() {
|
|
401
|
-
// Make sure that the 'closed' event is dispatched even if this element is destroyed before the 'after-leave' event is received.
|
|
402
|
-
this.$emit('closed')
|
|
403
|
-
},
|
|
404
|
-
|
|
405
|
-
methods: {
|
|
406
|
-
onBeforeEnter(element) {
|
|
407
|
-
/**
|
|
408
|
-
* The sidebar is opening and the transition is in progress
|
|
409
|
-
* @type {HTMLElement}
|
|
410
|
-
*/
|
|
411
|
-
this.$emit('opening', element)
|
|
412
|
-
},
|
|
413
|
-
onAfterEnter(element) {
|
|
414
|
-
/**
|
|
415
|
-
* The sidebar is opened and the transition is complete
|
|
416
|
-
* @type {HTMLElement}
|
|
417
|
-
*/
|
|
418
|
-
this.$emit('opened', element)
|
|
419
|
-
},
|
|
420
|
-
onBeforeLeave(element) {
|
|
421
|
-
/**
|
|
422
|
-
* The sidebar is closing and the transition is in progress
|
|
423
|
-
* @type {HTMLElement}
|
|
424
|
-
*/
|
|
425
|
-
this.$emit('closing', element)
|
|
426
|
-
},
|
|
427
|
-
onAfterLeave(element) {
|
|
428
|
-
/**
|
|
429
|
-
* The sidebar is closed and the transition is complete
|
|
430
|
-
* @type {HTMLElement}
|
|
431
|
-
*/
|
|
432
|
-
this.$emit('closed', element)
|
|
433
|
-
},
|
|
434
|
-
|
|
435
|
-
/**
|
|
436
|
-
* Used to tell parent component the user asked to close the sidebar
|
|
437
|
-
* @param {Event} e close icon click event
|
|
438
|
-
*/
|
|
439
|
-
closeSidebar(e) {
|
|
440
|
-
/**
|
|
441
|
-
* The user clicked to closed the sidebar
|
|
442
|
-
* @type {Event}
|
|
443
|
-
*/
|
|
444
|
-
this.$emit('close', e)
|
|
445
|
-
},
|
|
446
|
-
|
|
447
|
-
/**
|
|
448
|
-
* Emit figure click event to parent component
|
|
449
|
-
* @param {Event} e click event
|
|
450
|
-
*/
|
|
451
|
-
onFigureClick(e) {
|
|
452
|
-
/**
|
|
453
|
-
* The figure/background header has been clicked
|
|
454
|
-
* @type {Event}
|
|
455
|
-
*/
|
|
456
|
-
this.$emit('figure-click', e)
|
|
457
|
-
},
|
|
458
|
-
|
|
459
|
-
/**
|
|
460
|
-
* Toggle the favourite state
|
|
461
|
-
* and emit to the parent component
|
|
462
|
-
*/
|
|
463
|
-
toggleStarred() {
|
|
464
|
-
this.isStarred = !this.isStarred
|
|
465
|
-
/**
|
|
466
|
-
* Emitted when the starred value changes
|
|
467
|
-
* @type {boolean}
|
|
468
|
-
*/
|
|
469
|
-
this.$emit('update:starred', this.isStarred)
|
|
470
|
-
},
|
|
471
|
-
|
|
472
|
-
editTitle() {
|
|
473
|
-
/**
|
|
474
|
-
* Emitted when the titleEditable value changes
|
|
475
|
-
* @type {boolean}
|
|
476
|
-
*/
|
|
477
|
-
this.$emit('update:titleEditable', true)
|
|
478
|
-
// Focus the title input
|
|
479
|
-
if (this.titleEditable) {
|
|
480
|
-
this.$nextTick(
|
|
481
|
-
() => this.$refs.titleInput.focus()
|
|
482
|
-
)
|
|
483
|
-
}
|
|
484
|
-
},
|
|
485
|
-
|
|
486
|
-
/**
|
|
487
|
-
* Emit title change event to parent component
|
|
488
|
-
* @param {Event} event input event
|
|
489
|
-
*/
|
|
490
|
-
onTitleInput(event) {
|
|
491
|
-
/**
|
|
492
|
-
* Emitted when the title value changes
|
|
493
|
-
* @type {string|Date}
|
|
494
|
-
*/
|
|
495
|
-
this.$emit('update:title', event.target.value)
|
|
496
|
-
},
|
|
497
|
-
|
|
498
|
-
/**
|
|
499
|
-
* Emit when the title form edit confirm button is pressed in order
|
|
500
|
-
* to change the title.
|
|
501
|
-
* @param {Event} event submit event
|
|
502
|
-
*/
|
|
503
|
-
onSubmitTitle(event) {
|
|
504
|
-
// Disable editing
|
|
505
|
-
this.$emit('update:titleEditable', false)
|
|
506
|
-
/**
|
|
507
|
-
* Emitted when the title edit input has been submitted
|
|
508
|
-
* @type {Event}
|
|
509
|
-
*/
|
|
510
|
-
this.$emit('submit-title', event)
|
|
511
|
-
},
|
|
512
|
-
onDismissEditing() {
|
|
513
|
-
// Disable editing
|
|
514
|
-
this.$emit('update:titleEditable', false)
|
|
515
|
-
/**
|
|
516
|
-
* Emitted when the title edit has been cancelled
|
|
517
|
-
* @type {Event}
|
|
518
|
-
*/
|
|
519
|
-
this.$emit('dismiss-editing')
|
|
520
|
-
},
|
|
521
|
-
onUpdateActive(activeTab) {
|
|
522
|
-
/**
|
|
523
|
-
* The active tab changed
|
|
524
|
-
* @type {string}
|
|
525
|
-
*/
|
|
526
|
-
this.$emit('update:active', activeTab)
|
|
527
|
-
},
|
|
528
|
-
},
|
|
529
|
-
}
|
|
530
|
-
</script>
|
|
531
|
-
<style lang="scss" scoped>
|
|
532
|
-
$sidebar-min-width: 300px;
|
|
533
|
-
$sidebar-max-width: 500px;
|
|
534
|
-
|
|
535
|
-
$desc-vertical-padding: 18px;
|
|
536
|
-
$desc-input-padding: 7px;
|
|
537
|
-
|
|
538
|
-
// title and subtitle
|
|
539
|
-
$desc-title-height: 30px;
|
|
540
|
-
$desc-subtitle-height: 22px;
|
|
541
|
-
$desc-height: $desc-title-height + $desc-subtitle-height;
|
|
542
|
-
|
|
543
|
-
$top-buttons-spacing: 6px;
|
|
544
|
-
|
|
545
|
-
/*
|
|
546
|
-
Sidebar: to be used within #content
|
|
547
|
-
app-content will be shrinked properly
|
|
548
|
-
*/
|
|
549
|
-
.app-sidebar {
|
|
550
|
-
position: -webkit-sticky; // Safari support
|
|
551
|
-
position: sticky;
|
|
552
|
-
z-index: 1500;
|
|
553
|
-
top: var(--header-height);
|
|
554
|
-
right: 0;
|
|
555
|
-
display: flex;
|
|
556
|
-
overflow-x: hidden;
|
|
557
|
-
overflow-y: auto;
|
|
558
|
-
flex-direction: column;
|
|
559
|
-
flex-shrink: 0;
|
|
560
|
-
width: 27vw;
|
|
561
|
-
min-width: $sidebar-min-width;
|
|
562
|
-
max-width: $sidebar-max-width;
|
|
563
|
-
height: calc(100vh - var(--header-height));
|
|
564
|
-
border-left: 1px solid var(--color-border);
|
|
565
|
-
background: var(--color-main-background);
|
|
566
|
-
.app-sidebar-header {
|
|
567
|
-
> .app-sidebar__close {
|
|
568
|
-
position: absolute;
|
|
569
|
-
z-index: 100;
|
|
570
|
-
top: $top-buttons-spacing;
|
|
571
|
-
right: $top-buttons-spacing;
|
|
572
|
-
width: $clickable-area;
|
|
573
|
-
height: $clickable-area;
|
|
574
|
-
opacity: $opacity_normal;
|
|
575
|
-
border-radius: $clickable-area / 2;
|
|
576
|
-
&:hover,
|
|
577
|
-
&:active,
|
|
578
|
-
&:focus {
|
|
579
|
-
opacity: $opacity_full;
|
|
580
|
-
background-color: $action-background-hover;
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
// Compact mode only affects a sidebar with a figure
|
|
585
|
-
&--compact.app-sidebar-header--with-figure {
|
|
586
|
-
.app-sidebar-header__info {
|
|
587
|
-
flex-direction: row;
|
|
588
|
-
|
|
589
|
-
.app-sidebar-header__figure {
|
|
590
|
-
z-index: 2;
|
|
591
|
-
width: $desc-height + $desc-vertical-padding;
|
|
592
|
-
height: $desc-height + $desc-vertical-padding;
|
|
593
|
-
margin: $desc-vertical-padding / 2;
|
|
594
|
-
border-radius: 3px;
|
|
595
|
-
flex: 0 0 auto;
|
|
596
|
-
}
|
|
597
|
-
.app-sidebar-header__desc {
|
|
598
|
-
padding-left: 0;
|
|
599
|
-
flex: 1 1 auto;
|
|
600
|
-
min-width: 0;
|
|
601
|
-
padding-right: 2 * $clickable-area + $top-buttons-spacing;
|
|
602
|
-
|
|
603
|
-
&.app-sidebar-header__desc--without-actions {
|
|
604
|
-
padding-right: #{$clickable-area + $top-buttons-spacing};
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
.app-sidebar-header__tertiary-actions {
|
|
608
|
-
z-index: 3; // above star
|
|
609
|
-
position: absolute;
|
|
610
|
-
top: $desc-vertical-padding / 2;
|
|
611
|
-
left: -1 * $clickable-area;
|
|
612
|
-
}
|
|
613
|
-
.app-sidebar-header__menu {
|
|
614
|
-
top: $top-buttons-spacing;
|
|
615
|
-
right: $clickable-area + $top-buttons-spacing; // left of the close button
|
|
616
|
-
background-color: transparent;
|
|
617
|
-
position: absolute;
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
// sidebar without figure
|
|
624
|
-
&:not(.app-sidebar-header--with-figure) {
|
|
625
|
-
// align the menu with the close button
|
|
626
|
-
.app-sidebar-header__menu {
|
|
627
|
-
position: absolute;
|
|
628
|
-
top: $top-buttons-spacing;
|
|
629
|
-
right: $top-buttons-spacing + $clickable-area;
|
|
630
|
-
}
|
|
631
|
-
// increase the padding to not overlap the menu
|
|
632
|
-
.app-sidebar-header__desc {
|
|
633
|
-
padding-right: #{$clickable-area * 2 + $top-buttons-spacing};
|
|
634
|
-
|
|
635
|
-
&.app-sidebar-header__desc--without-actions {
|
|
636
|
-
padding-right: #{$clickable-area + $top-buttons-spacing};
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
// the container with the figure and the description
|
|
642
|
-
.app-sidebar-header__info {
|
|
643
|
-
display: flex;
|
|
644
|
-
flex-direction: column;
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
// header background
|
|
648
|
-
&__figure {
|
|
649
|
-
width: 100%;
|
|
650
|
-
height: 250px;
|
|
651
|
-
max-height: 250px;
|
|
652
|
-
background-repeat: no-repeat;
|
|
653
|
-
background-position: center;
|
|
654
|
-
background-size: contain;
|
|
655
|
-
&--with-action {
|
|
656
|
-
cursor: pointer;
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
// description
|
|
661
|
-
&__desc {
|
|
662
|
-
position: relative;
|
|
663
|
-
display: flex;
|
|
664
|
-
flex-direction: row;
|
|
665
|
-
justify-content: center;
|
|
666
|
-
padding: #{$desc-vertical-padding} #{$top-buttons-spacing} #{$desc-vertical-padding} #{$desc-vertical-padding / 2};
|
|
667
|
-
|
|
668
|
-
// custom overrides
|
|
669
|
-
&--with-tertiary-action {
|
|
670
|
-
padding-left: 0;
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
&--editable .app-sidebar-header__maintitle-form,
|
|
674
|
-
&--with-subtitle--editable .app-sidebar-header__maintitle-form {
|
|
675
|
-
margin-top: -2px;
|
|
676
|
-
margin-bottom: -2px;
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
&--with-subtitle--editable .app-sidebar-header__subtitle {
|
|
680
|
-
margin-top: -2px;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
.app-sidebar-header__tertiary-actions {
|
|
684
|
-
display: flex;
|
|
685
|
-
height: $clickable-area;
|
|
686
|
-
width: $clickable-area;
|
|
687
|
-
justify-content: center;
|
|
688
|
-
flex: 0 0 auto;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
// titles
|
|
692
|
-
.app-sidebar-header__title-container {
|
|
693
|
-
flex: 1 1 auto;
|
|
694
|
-
display: flex;
|
|
695
|
-
flex-direction: column;
|
|
696
|
-
justify-content: center;
|
|
697
|
-
min-width: 0;
|
|
698
|
-
|
|
699
|
-
// main title
|
|
700
|
-
.app-sidebar-header__maintitle {
|
|
701
|
-
padding: 0;
|
|
702
|
-
min-height: 30px;
|
|
703
|
-
font-size: 20px;
|
|
704
|
-
line-height: $desc-title-height;
|
|
705
|
-
|
|
706
|
-
// Needs 'deep' as the link is generated by the linkify directive
|
|
707
|
-
&::v-deep .linkified {
|
|
708
|
-
cursor: pointer;
|
|
709
|
-
text-decoration: underline;
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
.app-sidebar-header__maintitle,
|
|
714
|
-
.app-sidebar-header__subtitle {
|
|
715
|
-
overflow: hidden;
|
|
716
|
-
width: 100%;
|
|
717
|
-
margin: 0;
|
|
718
|
-
white-space: nowrap;
|
|
719
|
-
text-overflow: ellipsis;
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
// subtitle
|
|
723
|
-
.app-sidebar-header__subtitle {
|
|
724
|
-
padding: 0;
|
|
725
|
-
opacity: $opacity_normal;
|
|
726
|
-
font-size: var(--default-font-size);
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
.app-sidebar-header__maintitle-form {
|
|
730
|
-
display: flex;
|
|
731
|
-
margin-left: -7.5px;
|
|
732
|
-
& .icon-confirm {
|
|
733
|
-
margin: 0;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
input.app-sidebar-header__maintitle-input {
|
|
737
|
-
flex: 1 1 auto;
|
|
738
|
-
margin: 0;
|
|
739
|
-
padding: $desc-input-padding;
|
|
740
|
-
font-size: 20px;
|
|
741
|
-
font-weight: bold;
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
// favourite
|
|
747
|
-
.app-sidebar-header__star {
|
|
748
|
-
display: block;
|
|
749
|
-
width: $clickable-area;
|
|
750
|
-
height: $clickable-area;
|
|
751
|
-
padding: $icon-margin;
|
|
752
|
-
}
|
|
753
|
-
// main menu
|
|
754
|
-
.app-sidebar-header__menu {
|
|
755
|
-
height: $clickable-area;
|
|
756
|
-
width: $clickable-area;
|
|
757
|
-
border-radius: $clickable-area / 2;
|
|
758
|
-
background-color: $action-background-hover;
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
// sidebar description slot
|
|
763
|
-
&__description {
|
|
764
|
-
display: flex;
|
|
765
|
-
align-items: center;
|
|
766
|
-
margin: 0 10px;
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
.slide-right-leave-active,
|
|
772
|
-
.slide-right-enter-active {
|
|
773
|
-
transition-duration: var(--animation-quick);
|
|
774
|
-
transition-property: max-width, min-width;
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
.slide-right-enter-to,
|
|
778
|
-
.slide-right-leave {
|
|
779
|
-
min-width: $sidebar-min-width;
|
|
780
|
-
max-width: $sidebar-max-width;
|
|
781
|
-
}
|
|
782
|
-
|
|
783
|
-
.slide-right-enter,
|
|
784
|
-
.slide-right-leave-to {
|
|
785
|
-
min-width: 0 !important;
|
|
786
|
-
max-width: 0 !important;
|
|
787
|
-
}
|
|
788
|
-
</style>
|
|
789
|
-
|
|
790
|
-
<style lang="scss">
|
|
791
|
-
// ! slots specific designs, cannot be scoped
|
|
792
|
-
// if any button inside the description slot, increase visual padding
|
|
793
|
-
.app-sidebar-header__description {
|
|
794
|
-
button, .button,
|
|
795
|
-
input[type='button'],
|
|
796
|
-
input[type='submit'],
|
|
797
|
-
input[type='reset'] {
|
|
798
|
-
padding: 6px 22px;
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
</style>
|