mirror of
https://github.com/rubickCenter/rubick
synced 2025-12-16 23:54:19 +08:00
⬆️ 升级 electron 到 26
This commit is contained in:
@@ -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);
|
||||
},
|
||||
};
|
||||
|
||||
@@ -69,6 +69,7 @@ init();
|
||||
}
|
||||
|
||||
.main-container {
|
||||
-webkit-app-region: no-drag;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
background: var(--color-body-bg);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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 = [
|
||||
{
|
||||
|
||||
@@ -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: {},
|
||||
|
||||
Reference in New Issue
Block a user