@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,105 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
- @copyright Copyright (c) 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
3
|
-
-
|
|
4
|
-
- @author Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
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="app-settings"
|
|
25
|
-
v-click-outside="clickOutsideConfig"
|
|
26
|
-
:class="{ open }">
|
|
27
|
-
<div id="app-settings-header">
|
|
28
|
-
<button
|
|
29
|
-
class="settings-button"
|
|
30
|
-
type="button"
|
|
31
|
-
@click="toggleMenu">
|
|
32
|
-
{{ title }}
|
|
33
|
-
</button>
|
|
34
|
-
</div>
|
|
35
|
-
<transition name="slide-up">
|
|
36
|
-
<div v-show="open" id="app-settings-content">
|
|
37
|
-
<slot />
|
|
38
|
-
</div>
|
|
39
|
-
</transition>
|
|
40
|
-
</div>
|
|
41
|
-
</template>
|
|
42
|
-
|
|
43
|
-
<script>
|
|
44
|
-
import { directive as ClickOutside } from 'v-click-outside'
|
|
45
|
-
import { t } from '../../l10n'
|
|
46
|
-
import { excludeClickOutsideClasses } from '../../mixins'
|
|
47
|
-
|
|
48
|
-
export default {
|
|
49
|
-
directives: {
|
|
50
|
-
ClickOutside,
|
|
51
|
-
},
|
|
52
|
-
mixins: [
|
|
53
|
-
excludeClickOutsideClasses,
|
|
54
|
-
],
|
|
55
|
-
props: {
|
|
56
|
-
title: {
|
|
57
|
-
type: String,
|
|
58
|
-
required: false,
|
|
59
|
-
default: t('Settings'),
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
data() {
|
|
63
|
-
return {
|
|
64
|
-
open: false,
|
|
65
|
-
clickOutsideConfig: {
|
|
66
|
-
handler: this.closeMenu,
|
|
67
|
-
middleware: this.clickOutsideMiddleware,
|
|
68
|
-
},
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
methods: {
|
|
72
|
-
toggleMenu() {
|
|
73
|
-
this.open = !this.open
|
|
74
|
-
},
|
|
75
|
-
closeMenu() {
|
|
76
|
-
this.open = false
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
}
|
|
80
|
-
</script>
|
|
81
|
-
<style lang="scss" scoped>
|
|
82
|
-
#app-settings-content {
|
|
83
|
-
display: block;
|
|
84
|
-
padding: 10px;
|
|
85
|
-
background-color: var(--color-main-background);
|
|
86
|
-
/* restrict height of settings and make scrollable */
|
|
87
|
-
max-height: 300px;
|
|
88
|
-
overflow-y: auto;
|
|
89
|
-
box-sizing: border-box;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.slide-up-leave-active,
|
|
93
|
-
.slide-up-enter-active {
|
|
94
|
-
transition-duration: var(--animation-slow);
|
|
95
|
-
transition-property: max-height, padding;
|
|
96
|
-
overflow-y: hidden !important;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.slide-up-enter,
|
|
100
|
-
.slide-up-leave-to {
|
|
101
|
-
max-height: 0 !important;
|
|
102
|
-
padding: 0 10px !important;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
</style>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @copyright 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
3
|
-
*
|
|
4
|
-
* @author 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
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
|
-
import AppNavigationSettings from './AppNavigationSettings'
|
|
22
|
-
|
|
23
|
-
export default AppNavigationSettings
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
- @copyright Copyright (c) 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
3
|
-
-
|
|
4
|
-
- @author Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
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
|
-
<template>
|
|
23
|
-
<li class="app-navigation-spacer" />
|
|
24
|
-
</template>
|
|
25
|
-
|
|
26
|
-
<script>
|
|
27
|
-
export default {
|
|
28
|
-
name: 'AppNavigationSpacer',
|
|
29
|
-
}
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<style scoped>
|
|
33
|
-
.app-navigation-spacer {
|
|
34
|
-
flex-shrink: 0;
|
|
35
|
-
order: 1;
|
|
36
|
-
height: 22px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
</style>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
3
|
-
*
|
|
4
|
-
* @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
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
|
-
import AppNavigationSpacer from './AppNavigationSpacer'
|
|
22
|
-
|
|
23
|
-
export default AppNavigationSpacer
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
- @copyright Copyright (c) 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
3
|
-
-
|
|
4
|
-
- @author Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
5
|
-
- @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
6
|
-
- @author Marco Ambrosini <marcoambrosini@pm.me>
|
|
7
|
-
-
|
|
8
|
-
- @license GNU AGPL version 3 or any later version
|
|
9
|
-
-
|
|
10
|
-
- This program is free software: you can redistribute it and/or modify
|
|
11
|
-
- it under the terms of the GNU Affero General Public License as
|
|
12
|
-
- published by the Free Software Foundation, either version 3 of the
|
|
13
|
-
- License, or (at your option) any later version.
|
|
14
|
-
-
|
|
15
|
-
- This program is distributed in the hope that it will be useful,
|
|
16
|
-
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
17
|
-
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
18
|
-
- GNU Affero General Public License for more details.
|
|
19
|
-
-
|
|
20
|
-
- You should have received a copy of the GNU Affero General Public License
|
|
21
|
-
- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
22
|
-
-
|
|
23
|
-
-->
|
|
24
|
-
<template>
|
|
25
|
-
<a class="app-navigation-toggle"
|
|
26
|
-
href="#"
|
|
27
|
-
:aria-expanded="open ? 'true' : 'false'"
|
|
28
|
-
aria-controls="app-navigation-vue"
|
|
29
|
-
@click.prevent="toggleNavigation"
|
|
30
|
-
@keydown.space.exact.prevent="toggleNavigation" />
|
|
31
|
-
</template>
|
|
32
|
-
|
|
33
|
-
<script>
|
|
34
|
-
export default {
|
|
35
|
-
|
|
36
|
-
name: 'AppNavigationToggle',
|
|
37
|
-
|
|
38
|
-
props: {
|
|
39
|
-
open: {
|
|
40
|
-
type: Boolean,
|
|
41
|
-
required: true,
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
methods: {
|
|
46
|
-
toggleNavigation() {
|
|
47
|
-
this.$emit('update:open', !this.open)
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
}
|
|
51
|
-
</script>
|
|
52
|
-
|
|
53
|
-
<style scoped lang="scss">
|
|
54
|
-
@import '../../fonts/scss/iconfont-vue';
|
|
55
|
-
|
|
56
|
-
.app-navigation-toggle {
|
|
57
|
-
position: absolute;
|
|
58
|
-
top: 0;
|
|
59
|
-
right: 0;
|
|
60
|
-
margin-right: - $clickable-area;
|
|
61
|
-
width: $clickable-area;
|
|
62
|
-
height: $clickable-area;
|
|
63
|
-
padding: $icon-margin;
|
|
64
|
-
|
|
65
|
-
cursor: pointer;
|
|
66
|
-
opacity: 0.6;
|
|
67
|
-
|
|
68
|
-
font-size: $icon-size;
|
|
69
|
-
line-height: 17px;
|
|
70
|
-
@include iconfont('menu');
|
|
71
|
-
|
|
72
|
-
&:hover,
|
|
73
|
-
&:focus {
|
|
74
|
-
opacity: $opacity_full;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
</style>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
3
|
-
*
|
|
4
|
-
* @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
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
|
-
import AppNavigationToggle from './AppNavigationToggle'
|
|
22
|
-
|
|
23
|
-
export default AppNavigationToggle
|
|
24
|
-
export { AppNavigationToggle as AppNavigationSpacer }
|
|
@@ -1,331 +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
|
-
<docs>
|
|
23
|
-
Just nest the `AppSettingSections` component into `AppSettingsDialog`,
|
|
24
|
-
providing the section's title prop. You can put your settings within each
|
|
25
|
-
`AppSettingsSection` component.
|
|
26
|
-
|
|
27
|
-
```vue
|
|
28
|
-
<template>
|
|
29
|
-
<div>
|
|
30
|
-
<button @click="settingsOpen = true">Show Settings</button>
|
|
31
|
-
<AppSettingsDialog :open.sync="settingsOpen" >
|
|
32
|
-
<AppSettingsSection title="Example title 1">
|
|
33
|
-
Some example content
|
|
34
|
-
</AppSettingsSection>
|
|
35
|
-
<AppSettingsSection title="Example title 2">
|
|
36
|
-
Some more content
|
|
37
|
-
</AppSettingsSection>
|
|
38
|
-
</AppSettingsDialog>
|
|
39
|
-
</div>
|
|
40
|
-
</template>
|
|
41
|
-
|
|
42
|
-
<script>
|
|
43
|
-
export default {
|
|
44
|
-
data() {
|
|
45
|
-
return {
|
|
46
|
-
settingsOpen: false,
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
}
|
|
50
|
-
</script>
|
|
51
|
-
```
|
|
52
|
-
</docs>
|
|
53
|
-
|
|
54
|
-
<script>
|
|
55
|
-
import Modal from '../Modal'
|
|
56
|
-
import isMobile from '../../mixins/isMobile'
|
|
57
|
-
import debounce from 'debounce'
|
|
58
|
-
|
|
59
|
-
export default {
|
|
60
|
-
|
|
61
|
-
name: 'AppSettingsDialog',
|
|
62
|
-
|
|
63
|
-
components: {
|
|
64
|
-
Modal,
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
mixins: [isMobile],
|
|
68
|
-
|
|
69
|
-
props: {
|
|
70
|
-
/**
|
|
71
|
-
* Determines the open / closed state of the modal
|
|
72
|
-
*/
|
|
73
|
-
open: {
|
|
74
|
-
type: Boolean,
|
|
75
|
-
required: true,
|
|
76
|
-
},
|
|
77
|
-
/**
|
|
78
|
-
* Shows the navigation on desktop if true
|
|
79
|
-
*/
|
|
80
|
-
showNavigation: {
|
|
81
|
-
type: Boolean,
|
|
82
|
-
default: false,
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Selector for the popover container
|
|
87
|
-
*/
|
|
88
|
-
container: {
|
|
89
|
-
type: String,
|
|
90
|
-
default: 'body',
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
data() {
|
|
95
|
-
return {
|
|
96
|
-
selectedSection: '',
|
|
97
|
-
linkClicked: false,
|
|
98
|
-
addedScrollListener: false,
|
|
99
|
-
scroller: null,
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
computed: {
|
|
104
|
-
|
|
105
|
-
hasNavigation() {
|
|
106
|
-
if (this.isMobile || !this.showNavigation) {
|
|
107
|
-
return false
|
|
108
|
-
} else {
|
|
109
|
-
return true
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
settingsNavigationAriaLabel() {
|
|
114
|
-
return t('Settings navigation')
|
|
115
|
-
},
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
mounted() {
|
|
119
|
-
// Select first settings section
|
|
120
|
-
this.selectedSection = this.$slots.default[0].componentOptions.propsData.title
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
updated() {
|
|
124
|
-
// Check that the scroller element has been mounted
|
|
125
|
-
if (!this.$refs.settingsScroller) {
|
|
126
|
-
return
|
|
127
|
-
}
|
|
128
|
-
// Get the scroller element
|
|
129
|
-
this.scroller = this.$refs.settingsScroller
|
|
130
|
-
if (!this.addedScrollListener) {
|
|
131
|
-
this.scroller.addEventListener('scroll', this.handleScroll)
|
|
132
|
-
this.addedScrollListener = true
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
methods: {
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Builds the settings navigation menu
|
|
141
|
-
* @param {object} slots The default slots object passed from the render function.
|
|
142
|
-
* @returns {array} the navigation items
|
|
143
|
-
*/
|
|
144
|
-
getSettingsNavigation(slots) {
|
|
145
|
-
// Array of navigationitems strings
|
|
146
|
-
const navigationItems = slots.filter(vNode => vNode.componentOptions).map(vNode => vNode.componentOptions.propsData?.title)
|
|
147
|
-
// Check for the uniqueness of section titles
|
|
148
|
-
navigationItems.forEach((element, index) => {
|
|
149
|
-
const newArray = [...navigationItems]
|
|
150
|
-
newArray.splice(index, 1)
|
|
151
|
-
if (newArray.indexOf(element) !== -1) {
|
|
152
|
-
throw new Error(`Duplicate section title found: ${element}. Settings navigation sections must have unique section titles.`)
|
|
153
|
-
}
|
|
154
|
-
})
|
|
155
|
-
return navigationItems
|
|
156
|
-
},
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Scrolls the content to the selected settings section.absolute
|
|
160
|
-
* @param {string} item the name of the section
|
|
161
|
-
*/
|
|
162
|
-
handleSettingsNavigationClick(item) {
|
|
163
|
-
this.linkClicked = true
|
|
164
|
-
document.getElementById('settings-section_' + item.replace(/\s+/g, '')).scrollIntoView({
|
|
165
|
-
behavior: 'smooth',
|
|
166
|
-
inline: 'nearest',
|
|
167
|
-
})
|
|
168
|
-
this.selectedSection = item
|
|
169
|
-
setTimeout(() => {
|
|
170
|
-
this.linkClicked = false
|
|
171
|
-
}, 1000)
|
|
172
|
-
},
|
|
173
|
-
|
|
174
|
-
handleCloseModal() {
|
|
175
|
-
this.$emit('update:open', false)
|
|
176
|
-
// Remove scroll listener each time the modal is closed
|
|
177
|
-
this.scroller.removeEventListener('scroll', this.handleScroll)
|
|
178
|
-
this.addedScrollListener = false
|
|
179
|
-
this.scroller.scrollTop = 0
|
|
180
|
-
},
|
|
181
|
-
|
|
182
|
-
handleScroll() {
|
|
183
|
-
if (!this.linkClicked) {
|
|
184
|
-
this.unfocusNavigationItem()
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
|
|
188
|
-
// Remove selected section once the user starts scrolling
|
|
189
|
-
unfocusNavigationItem: debounce(function() {
|
|
190
|
-
this.selectedSection = ''
|
|
191
|
-
if (document.activeElement.className.includes('navigation-list__link')) {
|
|
192
|
-
document.activeElement.blur()
|
|
193
|
-
}
|
|
194
|
-
}, 300),
|
|
195
|
-
|
|
196
|
-
handleLinkKeydown(keyDownEvent, item) {
|
|
197
|
-
if (keyDownEvent.code === 'Enter') {
|
|
198
|
-
this.handleSettingsNavigationClick(item)
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
},
|
|
202
|
-
|
|
203
|
-
render(createElement) {
|
|
204
|
-
/**
|
|
205
|
-
* Build the navigation
|
|
206
|
-
* @returns {object} the navigation
|
|
207
|
-
*/
|
|
208
|
-
const createAppSettingsNavigation = () => {
|
|
209
|
-
if (this.hasNavigation) {
|
|
210
|
-
return [createElement('div', {
|
|
211
|
-
attrs: {
|
|
212
|
-
class: 'app-settings__navigation',
|
|
213
|
-
role: 'tablist',
|
|
214
|
-
'aria-label': this.settingsNavigationAriaLabel,
|
|
215
|
-
},
|
|
216
|
-
}, [createElement('ul', {
|
|
217
|
-
attrs: {
|
|
218
|
-
class: 'navigation-list',
|
|
219
|
-
role: 'tablist',
|
|
220
|
-
},
|
|
221
|
-
}, this.getSettingsNavigation(this.$slots.default).map(item => {
|
|
222
|
-
return createListElemtent(item)
|
|
223
|
-
}))])]
|
|
224
|
-
} else {
|
|
225
|
-
return []
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Build each list element in the navigation
|
|
231
|
-
* @param {object} item the navigation item
|
|
232
|
-
* @returns {object} the list element
|
|
233
|
-
*/
|
|
234
|
-
const createListElemtent = (item) => createElement('li', {}, [createElement('a', {
|
|
235
|
-
class: {
|
|
236
|
-
'navigation-list__link': true,
|
|
237
|
-
'navigation-list__link--active': item === this.selectedSection,
|
|
238
|
-
},
|
|
239
|
-
|
|
240
|
-
attrs: {
|
|
241
|
-
role: 'tab',
|
|
242
|
-
'aria-selected': item === this.selectedSection,
|
|
243
|
-
tabindex: '0',
|
|
244
|
-
},
|
|
245
|
-
|
|
246
|
-
on: {
|
|
247
|
-
click: () => this.handleSettingsNavigationClick(item),
|
|
248
|
-
keydown: () => this.handleLinkKeydown(event, item),
|
|
249
|
-
},
|
|
250
|
-
}, item)])
|
|
251
|
-
|
|
252
|
-
// Return value of the render function
|
|
253
|
-
if (this.open) {
|
|
254
|
-
return createElement('Modal', {
|
|
255
|
-
attrs: {
|
|
256
|
-
container: this.container,
|
|
257
|
-
},
|
|
258
|
-
on: {
|
|
259
|
-
close: () => { this.handleCloseModal() },
|
|
260
|
-
},
|
|
261
|
-
}, [
|
|
262
|
-
createElement('div', {
|
|
263
|
-
attrs: {
|
|
264
|
-
class: 'app-settings',
|
|
265
|
-
},
|
|
266
|
-
}, [...createAppSettingsNavigation(),
|
|
267
|
-
createElement('div', {
|
|
268
|
-
attrs: {
|
|
269
|
-
class: 'app-settings__content',
|
|
270
|
-
},
|
|
271
|
-
ref: 'settingsScroller',
|
|
272
|
-
}, this.$slots.default)]),
|
|
273
|
-
])
|
|
274
|
-
} else {
|
|
275
|
-
return undefined
|
|
276
|
-
}
|
|
277
|
-
},
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
</script>
|
|
281
|
-
|
|
282
|
-
<style lang="scss" scoped>
|
|
283
|
-
|
|
284
|
-
::v-deep .modal-wrapper .modal-container {
|
|
285
|
-
display: flex;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.app-settings {
|
|
289
|
-
display: flex;
|
|
290
|
-
width: 100%;
|
|
291
|
-
&__navigation {
|
|
292
|
-
min-width: 200px;
|
|
293
|
-
margin-right: 20px;
|
|
294
|
-
}
|
|
295
|
-
&__content {
|
|
296
|
-
max-width: 100vw;
|
|
297
|
-
overflow-y: auto;
|
|
298
|
-
overflow-x: hidden;
|
|
299
|
-
padding: 24px;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
.navigation-list {
|
|
304
|
-
height: 100%;
|
|
305
|
-
overflow-y: auto;
|
|
306
|
-
&__link {
|
|
307
|
-
display: block;
|
|
308
|
-
font-size: 16px;
|
|
309
|
-
height: $clickable-area;
|
|
310
|
-
margin: 4px;
|
|
311
|
-
line-height: $clickable-area;
|
|
312
|
-
border-radius: var(--border-radius-pill);
|
|
313
|
-
font-weight: bold;
|
|
314
|
-
padding: 0 20px;
|
|
315
|
-
cursor: pointer;
|
|
316
|
-
white-space: nowrap;
|
|
317
|
-
text-overflow: ellipsis;
|
|
318
|
-
overflow: hidden;
|
|
319
|
-
background-color: transparent;
|
|
320
|
-
border: none;
|
|
321
|
-
&:hover,
|
|
322
|
-
&:focus {
|
|
323
|
-
background-color: var(--color-background-hover);
|
|
324
|
-
}
|
|
325
|
-
&--active {
|
|
326
|
-
background-color: var(--color-primary-light) !important;
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
</style>
|