PAGE LOADING
diff --git a/resources/assets/js/App.vue b/resources/assets/js/App.vue
index eed60a9a0..4be9c24bc 100755
--- a/resources/assets/js/App.vue
+++ b/resources/assets/js/App.vue
@@ -19,9 +19,6 @@
-
-
-
@@ -44,7 +41,7 @@ import NetworkException from "./components/NetworkException";
import GuidePage from "./components/GuidePage";
import TaskOperation from "./pages/manage/components/TaskOperation";
import {mapState} from "vuex";
-import {languageType} from "./language";
+import {languageName} from "./language";
export default {
components: {TaskOperation, NetworkException, PreviewImageState, RightBottom, FloatSpinner, GuidePage},
@@ -53,7 +50,6 @@ export default {
return {
routePath: null,
searchInter: null,
- iframes: [],
}
},
@@ -61,8 +57,6 @@ export default {
this.electronEvents();
this.eeuiEvents();
this.otherEvents();
- this.synchThemeLanguage();
- this.synchAppTheme();
},
mounted() {
@@ -80,11 +74,7 @@ export default {
},
computed: {
- ...mapState(['ws', 'themeMode', 'themeIsDark', 'windowOrientation']),
-
- isSoftware() {
- return this.$Electron || this.$isEEUiApp;
- },
+ ...mapState(['ws', 'themeConf', 'windowOrientation']),
},
watch: {
@@ -108,7 +98,6 @@ export default {
userId: {
handler() {
this.$store.dispatch("websocketConnection");
- this.synchUserToken();
//
if (this.userId > 0) {
if (this.$isEEUiApp) {
@@ -143,6 +132,13 @@ export default {
}
})
}
+ //
+ window.localStorage.setItem("__system:userId__", this.userId)
+ window.localStorage.setItem("__system:userToken__", this.userToken)
+ $A.storageByIframe({
+ userId: this.userId,
+ userToken: this.userToken,
+ })
},
immediate: true
},
@@ -187,10 +183,6 @@ export default {
this.$store.dispatch("audioStop", true)
}
},
-
- themeIsDark() {
- this.synchThemeLanguage();
- }
},
methods: {
@@ -226,42 +218,12 @@ export default {
});
},
- synchUserToken() {
- if (this.isSoftware) {
- this.iframes = this.iframes.filter(({key}) => key != 'synchUserToken')
- this.iframes.push({
- key: 'synchUserToken',
- url: $A.apiUrl(`../setting/userinfo?userid=${this.userId}&token=${this.userToken}`)
- })
- }
- },
-
autoTheme() {
- if (this.themeMode === "auto") {
+ if (this.themeConf === "auto") {
this.$store.dispatch("synchTheme")
}
},
- synchThemeLanguage() {
- if (this.isSoftware) {
- this.iframes = this.iframes.filter(({key}) => key != 'synchThemeLanguage')
- this.iframes.push({
- key: 'synchThemeLanguage',
- url: $A.apiUrl(`../setting/theme_language?theme=${this.themeIsDark ? 'dark' : 'light'}&language=${languageType}`)
- })
- }
- this.synchAppTheme()
- },
-
- synchAppTheme() {
- if (this.$isEEUiApp) {
- $A.eeuiAppSendMessage({
- action: 'updateTheme',
- themeName: this.themeIsDark ? 'dark' : 'light',
- });
- }
- },
-
windowSizeListener() {
const windowWidth = $A(window).width(),
windowHeight = $A(window).height(),
@@ -315,10 +277,7 @@ export default {
this.$Electron.registerMsgListener('browserWindowFocus', _ => {
this.$store.state.windowActive = true;
})
- this.iframes.push({
- key: 'manifest',
- url: $A.apiUrl("../manifest")
- })
+ $A.loadIframe($A.apiUrl("../manifest")).catch(_ => {})
$A.bindScreenshotKey(this.$store.state.cacheKeyboard);
//
this.$Electron.sendMessage('setMenuLanguage', {
@@ -422,7 +381,7 @@ export default {
},
otherEvents() {
- if (!this.isSoftware) {
+ if (!this.$isSoftware) {
// 非客户端监听窗口激活
const hiddenProperty = 'hidden' in document ? 'hidden' : 'webkitHidden' in document ? 'webkitHidden' : 'mozHidden' in document ? 'mozHidden' : null;
const visibilityChangeEvent = hiddenProperty.replace(/hidden/i, 'visibilitychange');
diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js
index 512d27ec1..492c3c6d6 100644
--- a/resources/assets/js/app.js
+++ b/resources/assets/js/app.js
@@ -2,7 +2,7 @@ const isElectron = !!(window && window.process && window.process.type);
const isEEUiApp = window && window.navigator && /eeui/i.test(window.navigator.userAgent);
import microappInit from "./microapp"
-import {switchLanguage as $L, setLanguage, getLanguage} from "./language";
+import {switchLanguage as $L} from "./language";
import './functions/common'
import './functions/eeui'
@@ -147,6 +147,7 @@ $A.isMainElectron = false;
$A.isSubElectron = false;
$A.isEEUiApp = isEEUiApp;
$A.isElectron = isElectron;
+$A.isSoftware = isEEUiApp || isElectron;
$A.openLog = false;
if (isElectron) {
$A.Electron = electron;
@@ -192,6 +193,7 @@ Vue.prototype.$Platform = $A.Platform;
Vue.prototype.$isMainElectron = $A.isMainElectron;
Vue.prototype.$isSubElectron = $A.isSubElectron;
Vue.prototype.$isEEUiApp = $A.isEEUiApp;
+Vue.prototype.$isSoftware = $A.isSoftware;
Vue.config.productionTip = false;
Vue.mixin(mixin)
diff --git a/resources/assets/js/components/AceEditor.vue b/resources/assets/js/components/AceEditor.vue
index d756dc494..48d7b74c8 100644
--- a/resources/assets/js/components/AceEditor.vue
+++ b/resources/assets/js/components/AceEditor.vue
@@ -294,11 +294,11 @@ export default {
}
},
computed: {
- ...mapState(['themeIsDark']),
+ ...mapState(['themeName']),
editTheme() {
if (this.theme == 'auto') {
- if (this.themeIsDark) {
+ if (this.themeName === 'dark') {
return "dracula-dark"
} else {
return "chrome"
diff --git a/resources/assets/js/components/Drawio.vue b/resources/assets/js/components/Drawio.vue
index 411dec1b5..400f372a5 100644
--- a/resources/assets/js/components/Drawio.vue
+++ b/resources/assets/js/components/Drawio.vue
@@ -37,7 +37,7 @@
diff --git a/resources/views/storage.blade.php b/resources/views/storage.blade.php
new file mode 100755
index 000000000..5831446c4
--- /dev/null
+++ b/resources/views/storage.blade.php
@@ -0,0 +1,21 @@
+