@afeefa/vue-app 0.0.302 → 0.0.303
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.
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.303
|
package/package.json
CHANGED
package/src-admin/AfeefaAdmin.js
CHANGED
@@ -7,6 +7,7 @@ import { eventBusPlugin } from '@a-vue/plugins/event-bus/EventBusPlugin'
|
|
7
7
|
import { hasOptionsPlugin } from '@a-vue/plugins/has-options/HasOptionsPlugin'
|
8
8
|
import { timeout } from '@a-vue/utils/timeout'
|
9
9
|
import Vue from 'vue'
|
10
|
+
import VueShortKey from 'vue-shortkey'
|
10
11
|
|
11
12
|
import { adminConfig } from './config/AdminConfig'
|
12
13
|
import routeConfigPlugin from './config/routing'
|
@@ -100,6 +101,7 @@ export class AfeefaAdmin {
|
|
100
101
|
// plugins
|
101
102
|
Vue.use(hasOptionsPlugin)
|
102
103
|
Vue.use(eventBusPlugin)
|
104
|
+
Vue.use(VueShortKey)
|
103
105
|
|
104
106
|
// load auth resources
|
105
107
|
if (this._authService) {
|
@@ -6,7 +6,29 @@
|
|
6
6
|
@click="closeFloatingSidebars"
|
7
7
|
/>
|
8
8
|
|
9
|
-
<
|
9
|
+
<v-overlay
|
10
|
+
v-if="HelpPage && shortcutInfoVisible"
|
11
|
+
:opacity=".8"
|
12
|
+
fixed
|
13
|
+
@click="shortcutInfoVisible = false"
|
14
|
+
>
|
15
|
+
<component
|
16
|
+
:is="HelpPage"
|
17
|
+
v-if="HelpPage"
|
18
|
+
v-shortkey="['esc']"
|
19
|
+
@shortkey.native="shortcutInfoVisible = false"
|
20
|
+
@close="shortcutInfoVisible = false"
|
21
|
+
/>
|
22
|
+
</v-overlay>
|
23
|
+
|
24
|
+
<div
|
25
|
+
v-shortkey="{
|
26
|
+
help: ['ctrl', 'space'],
|
27
|
+
zen: ['ctrl', 'shift', 'z']
|
28
|
+
}"
|
29
|
+
class="main-layout"
|
30
|
+
@shortkey="handleShortkey"
|
31
|
+
>
|
10
32
|
<navigation-bar
|
11
33
|
:has="$has"
|
12
34
|
:class="{showDevSkin}"
|
@@ -88,6 +110,9 @@ export default class App extends Vue {
|
|
88
110
|
sidebarsFloating = false
|
89
111
|
hasFloatingInformationBar = false
|
90
112
|
|
113
|
+
shortcutInfoVisible = false
|
114
|
+
HelpPage = adminConfig.app.components.HelpPage || null
|
115
|
+
|
91
116
|
autoLogoutChannel = new BroadcastChannel('auth.autologout')
|
92
117
|
autoLogoutStartSeconds = 0
|
93
118
|
autoLogoutStartRemainingSeconds = 0
|
@@ -135,6 +160,14 @@ export default class App extends Vue {
|
|
135
160
|
this.$emit('appLoaded')
|
136
161
|
}
|
137
162
|
|
163
|
+
handleShortkey (event) {
|
164
|
+
if (event.srcKey === 'help') {
|
165
|
+
this.shortcutInfoVisible = !this.shortcutInfoVisible
|
166
|
+
} else {
|
167
|
+
sidebarService.toggleAll()
|
168
|
+
}
|
169
|
+
}
|
170
|
+
|
138
171
|
get autoLogoutMessage () {
|
139
172
|
return `Sie werden in ${this.autoLogoutRemainingSeconds} Sekunden abgemeldet.`
|
140
173
|
}
|
@@ -87,6 +87,19 @@ class SidebarService {
|
|
87
87
|
this.setRailInformation(true)
|
88
88
|
}
|
89
89
|
|
90
|
+
toggleAll () {
|
91
|
+
const visible = !this.navigation
|
92
|
+
this.setNavigation(visible)
|
93
|
+
|
94
|
+
if (this.information) {
|
95
|
+
if (this.mobile) {
|
96
|
+
this.setRailInformation(true)
|
97
|
+
} else {
|
98
|
+
this.setRailInformation(!visible)
|
99
|
+
}
|
100
|
+
}
|
101
|
+
}
|
102
|
+
|
90
103
|
get hasFloatingOverlay () {
|
91
104
|
if (!this.mobile) {
|
92
105
|
return false
|