@enso-ui/menus 4.0.11 → 4.0.15
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/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<
|
|
12
|
-
<
|
|
2
|
+
<div class="level is-mobile"
|
|
3
|
+
v-if="canAccess('system.menus.organize')">
|
|
4
|
+
<div class="level-left">
|
|
5
|
+
<div class="level-item">
|
|
6
|
+
{{ i18n('Organize Menus') }}
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="level-right">
|
|
10
|
+
<div class="level-item">
|
|
11
|
+
<core-menu-organizer>
|
|
12
|
+
<template #default="{ bindings, events }">
|
|
13
13
|
<vue-switch class="is-medium"
|
|
14
14
|
v-bind="bindings"
|
|
15
15
|
v-on="events"/>
|
|
16
|
-
</
|
|
17
|
-
</
|
|
16
|
+
</template>
|
|
17
|
+
</core-menu-organizer>
|
|
18
18
|
</div>
|
|
19
|
-
</
|
|
20
|
-
</
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
23
|
<script>
|
|
@@ -52,7 +52,9 @@ export default {
|
|
|
52
52
|
|
|
53
53
|
components: { EnsoForm, Fa },
|
|
54
54
|
|
|
55
|
-
inject: [
|
|
55
|
+
inject: [
|
|
56
|
+
'errorHandler', 'http', 'i18n', 'route', 'routerErrorHandler', 'toastr',
|
|
57
|
+
],
|
|
56
58
|
|
|
57
59
|
data: () => ({
|
|
58
60
|
ready: false,
|
|
@@ -60,7 +62,7 @@ export default {
|
|
|
60
62
|
|
|
61
63
|
methods: {
|
|
62
64
|
writeConfig() {
|
|
63
|
-
|
|
65
|
+
this.http.post(this.route('system.roles.writeConfig', this.$refs.form.routeParam('role')))
|
|
64
66
|
.then(({ data }) => this.toastr.success(data.message))
|
|
65
67
|
.catch(this.errorHandler);
|
|
66
68
|
},
|
package/src/bulma/register.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import Vue from 'vue';
|
|
2
1
|
import App from '@enso-ui/ui/src/core/app';
|
|
3
2
|
import MenuOrganizer from './components/settings/MenuOrganizer.vue';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
App.registerSettingsItem('setting-menu-organizer', 400);
|
|
4
|
+
App.registerSettingsItem('setting-menu-organizer', MenuOrganizer, 400);
|
|
@@ -4,7 +4,7 @@ import { mapState, mapMutations } from 'vuex';
|
|
|
4
4
|
export default {
|
|
5
5
|
name: 'Menus',
|
|
6
6
|
|
|
7
|
-
inject: ['errorHandler', 'route'],
|
|
7
|
+
inject: ['errorHandler', 'http', 'route'],
|
|
8
8
|
|
|
9
9
|
props: {
|
|
10
10
|
menus: {
|
|
@@ -73,7 +73,7 @@ export default {
|
|
|
73
73
|
this.$emit('extend', this.el.scrollHeight);
|
|
74
74
|
},
|
|
75
75
|
persist() {
|
|
76
|
-
|
|
76
|
+
this.http.put(this.route('system.menus.organize'), { menus: this.menus })
|
|
77
77
|
.catch(this.errorHandler);
|
|
78
78
|
},
|
|
79
79
|
},
|
|
@@ -91,7 +91,7 @@ export default {
|
|
|
91
91
|
itemKey: 'name',
|
|
92
92
|
},
|
|
93
93
|
organizeEvents: {
|
|
94
|
-
|
|
94
|
+
'update:modelValue': this.organize,
|
|
95
95
|
end: this.persist,
|
|
96
96
|
},
|
|
97
97
|
});
|