diff --git a/src/main/common/api.js b/src/main/common/api.js
index e500634..231e456 100644
--- a/src/main/common/api.js
+++ b/src/main/common/api.js
@@ -32,7 +32,7 @@ export default {
return arg
},
setExpendHeight({height}, mainWindow) {
- mainWindow.setSize(788, height || 60);
+ mainWindow.setSize(800, height || 60);
},
db: {
put({data}) {
diff --git a/src/main/common/common.js b/src/main/common/common.js
index 4add339..15a6dc3 100644
--- a/src/main/common/common.js
+++ b/src/main/common/common.js
@@ -33,7 +33,7 @@ export default function init(mainWindow) {
});
ipcMain.on('changeWindowSize-rubick', (event, arg) => {
- mainWindow.setSize(arg.width || 788, arg.height);
+ mainWindow.setSize(arg.width || 800, arg.height);
});
mainWindow.on('blur', () => {
diff --git a/src/main/index.js b/src/main/index.js
index ec29a51..a29bd62 100644
--- a/src/main/index.js
+++ b/src/main/index.js
@@ -22,7 +22,7 @@ function createWindow () {
mainWindow = new BrowserWindow({
height: 60,
useContentSize: true,
- width: 788,
+ width: 800,
frame: false,
title: '拉比克',
webPreferences: {
diff --git a/src/renderer/assets/common/utils.js b/src/renderer/assets/common/utils.js
index 1238e95..71316a2 100644
--- a/src/renderer/assets/common/utils.js
+++ b/src/renderer/assets/common/utils.js
@@ -44,8 +44,8 @@ function mkdirFolder(name) {
});
}
-function downloadFunc(downloadRepoUrl, name, gitUrl) {
- const targetGit = gitUrl ? gitUrl : `github:clouDr-f2e/${name}`;
+function downloadFunc(downloadRepoUrl, name) {
+ const targetGit = downloadRepoUrl ? downloadRepoUrl : `github:clouDr-f2e/${name}`;
const plugin_path = path.join(__static, './plugins');
return new Promise(async (resolve, reject) => {
@@ -107,10 +107,34 @@ function mergePlugins(plugins) {
]
}
+function find(p) {
+ try {
+ let result;
+ const fileList = fs.readdirSync(p);
+ for (let i = 0; i < fileList.length; i++) {
+ let thisPath = p + "/" + fileList[i];
+ const data = fs.statSync(thisPath);
+
+ if (data.isFile() && fileList[i] === 'plugin.json') {
+ result = path.join(thisPath, '../');
+ return result;
+ }
+ if (data.isDirectory()) {
+ result = find(thisPath);
+ }
+ }
+ return result;
+ } catch (e) {
+ console.log(e);
+ }
+
+}
+
export {
getWindowHeight,
searchKeyValues,
downloadFunc,
sysFile,
mergePlugins,
+ find,
}
diff --git a/src/renderer/pages/search/index.vue b/src/renderer/pages/search/index.vue
index c83a42e..e19f8e3 100644
--- a/src/renderer/pages/search/index.vue
+++ b/src/renderer/pages/search/index.vue
@@ -15,7 +15,7 @@
开发者