diff --git a/.eslintrc.js b/.eslintrc.js index add9b49..92e596d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -4,17 +4,23 @@ module.exports = { node: true, }, extends: [ - "plugin:vue/vue3-essential", - "eslint:recommended", - "@vue/typescript/recommended", - "@vue/prettier", - "@vue/prettier/@typescript-eslint", + 'plugin:vue/vue3-essential', + 'eslint:recommended', + '@vue/typescript/recommended', + '@vue/prettier', + '@vue/prettier/@typescript-eslint', ], parserOptions: { ecmaVersion: 2020, }, rules: { - "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", - "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", + 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + 'prettier/prettier': [ + 'warn', + { + singleQuote: true, + }, + ], }, }; diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..e82c5f0 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,19 @@ +{ + "tabWidth": 2, + "useTabs": false, + "semi": true, + "singleQuote": true, + "jsxSingleQuote": true, + "trailingComma": "es5", + "bracketSpacing": true, + "jsxBracketSameLine": false, + "arrowParens": "always", + "printWidth": 80, + "embeddedLanguageFormatting": "auto", + "htmlWhitespaceSensitivity": "ignore", + "preserve": "preserve", + "insertPragma": false, + "quoteProps": "as-needed", + "requirePragma": false, + "endOfLine": "auto" +} \ No newline at end of file diff --git a/feature/src/views/installed/index.vue b/feature/src/views/installed/index.vue index 40ae992..f5184a4 100644 --- a/feature/src/views/installed/index.vue +++ b/feature/src/views/installed/index.vue @@ -15,7 +15,7 @@ @click="currentSelect = [index]" v-for="(plugin, index) in localPlugins" > - +
{{ plugin.pluginName }} @@ -63,18 +63,25 @@ - {{ cmd.label || cmd }} + + {{ cmd.label || cmd }} + +
@@ -89,13 +96,15 @@ + \ No newline at end of file diff --git a/package.json b/package.json index 9a57452..5e96d1f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubick", - "version": "2.0.7", + "version": "2.0.8", "author": "muwoo <2424880409@qq.com>", "private": true, "scripts": { @@ -57,7 +57,7 @@ "eslint-plugin-vue": "^7.0.0", "less": "^3.0.4", "less-loader": "^5.0.0", - "prettier": "^2.2.1", + "prettier": "^2.8.4", "typescript": "~4.1.5", "vue-cli-plugin-electron-builder": "~2.1.1", "worker-plugin": "^5.0.1" diff --git a/src/main/browsers/runner.ts b/src/main/browsers/runner.ts index c9a7990..f75ae9a 100644 --- a/src/main/browsers/runner.ts +++ b/src/main/browsers/runner.ts @@ -38,6 +38,12 @@ export default () => { const createView = (plugin, window: BrowserWindow) => { let pluginIndexPath = plugin.tplPath || plugin.indexPath; + // 再尝试去找 + if (plugin.name === "rubick-system-feature" && !pluginIndexPath) { + pluginIndexPath = commonConst.dev() + ? "http://localhost:8081/#/" + : `file://${__static}/feature/index.html`; + } if (!pluginIndexPath) { const pluginPath = path.resolve(baseDir, "node_modules", plugin.name); pluginIndexPath = `file://${path.join(pluginPath, "./", plugin.main)}`; diff --git a/src/main/index.ts b/src/main/index.ts index d773a7b..7b0f8a5 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -38,7 +38,6 @@ class App { this.onQuit(); } } - beforeReady() { // 系统托盘 if (commonConst.macOS()) { @@ -55,7 +54,6 @@ class App { createWindow() { this.windowCreator.init(); } - onReady() { const readyFunction = () => { this.createWindow(); diff --git a/src/renderer/App.vue b/src/renderer/App.vue index bfdf44d..409f563 100644 --- a/src/renderer/App.vue +++ b/src/renderer/App.vue @@ -35,14 +35,14 @@ - -