⬆️ 升级 electron 到 26

This commit is contained in:
muwoo
2023-08-22 13:52:47 +08:00
parent 6e5a08b9d8
commit d2d94c13b7
21 changed files with 199 additions and 196 deletions

View File

@@ -1,16 +1,16 @@
const {remote} = require("electron");
const remote = require('@electron/remote');
window.market = {
getLocalPlugins() {
return remote.getGlobal("LOCAL_PLUGINS").getLocalPlugins();
return remote.getGlobal('LOCAL_PLUGINS').getLocalPlugins();
},
downloadPlugin(plugin) {
return remote.getGlobal("LOCAL_PLUGINS").downloadPlugin(plugin);
return remote.getGlobal('LOCAL_PLUGINS').downloadPlugin(plugin);
},
deletePlugin(plugin) {
return remote.getGlobal("LOCAL_PLUGINS").deletePlugin(plugin);
return remote.getGlobal('LOCAL_PLUGINS').deletePlugin(plugin);
},
refreshPlugin(plugin) {
return remote.getGlobal("LOCAL_PLUGINS").refreshPlugin(plugin);
return remote.getGlobal('LOCAL_PLUGINS').refreshPlugin(plugin);
},
};

View File

@@ -69,6 +69,7 @@ init();
}
.main-container {
-webkit-app-region: no-drag;
display: flex;
align-items: flex-start;
background: var(--color-body-bg);

View File

@@ -1,11 +1,8 @@
import { createI18n } from 'vue-i18n';
import messages from './langs';
const { remote } = window.require('electron');
const remote = window.require('@electron/remote');
const { perf } = remote.getGlobal('OP_CONFIG').get();
console.log(messages);
console.log(perf);
// 2. Create i18n instance with options
const i18n = createI18n({
legacy: false,

View File

@@ -7,7 +7,7 @@ import './assets/ant-reset.less';
import 'ant-design-vue/dist/antd.variable.min.css';
import registerI18n from './languages/i18n';
const { remote } = window.require('electron');
const remote = window.require('@electron/remote');
const { perf } = remote.getGlobal('OP_CONFIG').get();

View File

@@ -121,7 +121,7 @@ import { message } from 'ant-design-vue';
const { ipcRenderer } = window.require('electron');
const { remote } = window.require('electron');
const remote = window.require('@electron/remote');
const fs = window.require('fs');
const md = new MarkdownIt();

View File

@@ -243,7 +243,8 @@ import UserInfo from './user-info';
import { useI18n } from 'vue-i18n';
const { locale, t } = useI18n();
const { remote, ipcRenderer } = window.require('electron');
const { ipcRenderer } = window.require('electron');
const remote = window.require('@electron/remote');
const examples = [
{

View File

@@ -139,7 +139,8 @@ import debounce from 'lodash.debounce';
import service from '../../assets/service';
const { remote, ipcRenderer } = window.require('electron');
const { ipcRenderer } = window.require('electron');
const remote = window.require('@electron/remote');
const state = reactive({
custom: {},