@oxygen-cms/ui 1.6.1 → 1.6.2
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
package/src/components/App.vue
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div style="height: 100%;">
|
|
3
|
-
<!-- <transition name="slide-left" mode="out-in">-->
|
|
4
3
|
<router-view @logout="signOut">
|
|
5
4
|
<template #main-navigation>
|
|
6
|
-
<
|
|
5
|
+
<MainMenu :items="mainMenuItems" />
|
|
7
6
|
</template>
|
|
8
7
|
</router-view>
|
|
9
|
-
<!-- </transition>-->
|
|
10
8
|
</div>
|
|
11
9
|
</template>
|
|
12
10
|
|
|
13
11
|
<script>
|
|
14
12
|
import AuthApi from "../AuthApi";
|
|
13
|
+
import MainMenu from "./MainMenu.vue";
|
|
15
14
|
export default {
|
|
16
15
|
name: "App",
|
|
16
|
+
components: {MainMenu},
|
|
17
17
|
props: {
|
|
18
18
|
appTitle: { type: String, required: true },
|
|
19
19
|
defaultRouteTitle: { type: String, required: true },
|
|
20
|
+
mainMenuItems: { type: Object, required: true },
|
|
20
21
|
impersonating: {
|
|
21
22
|
type: Boolean,
|
|
22
23
|
default: false
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
<script>
|
|
85
85
|
import {FetchBuilder} from "../api";
|
|
86
86
|
import Internationalize from "../Internationalize";
|
|
87
|
-
import UAParser from 'ua-parser-js';
|
|
87
|
+
import { UAParser } from 'ua-parser-js';
|
|
88
88
|
import AuthApi from "../AuthApi";
|
|
89
89
|
import {getApiRoot} from "../CrudApi";
|
|
90
90
|
|
|
@@ -134,7 +134,7 @@ export default {
|
|
|
134
134
|
}
|
|
135
135
|
},
|
|
136
136
|
vuePathToURL(path) {
|
|
137
|
-
return getApiHost() + this.legacyPrefix + path;
|
|
137
|
+
return getApiHost() + this.legacyPrefix.replace(/^\//, '') + path;
|
|
138
138
|
},
|
|
139
139
|
// We detect when the iframe url changes, and update our window accordingly...
|
|
140
140
|
onNavigated(newURL) {
|
package/src/main.js
CHANGED
|
@@ -28,7 +28,6 @@ export default class OxygenUI {
|
|
|
28
28
|
this.authenticatedRoutes = []
|
|
29
29
|
this.unauthenticatedRoutes = []
|
|
30
30
|
this.mainMenuItems = {}
|
|
31
|
-
this.rootComponents = { App, MainMenu }
|
|
32
31
|
this.beforeMountHooks = []
|
|
33
32
|
}
|
|
34
33
|
|
|
@@ -110,11 +109,13 @@ export default class OxygenUI {
|
|
|
110
109
|
|
|
111
110
|
this.app = new this.Vue({
|
|
112
111
|
router: router,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
112
|
+
render: (h) => h(App, {
|
|
113
|
+
props: {
|
|
114
|
+
appTitle: document.title,
|
|
115
|
+
defaultRouteTitle: 'Administration Panel',
|
|
116
|
+
mainMenuItems: this.mainMenuItems
|
|
117
|
+
}
|
|
118
|
+
}),
|
|
118
119
|
store
|
|
119
120
|
});
|
|
120
121
|
|