Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gitcode_dev
quicker
提交
f1d3d7e1
quicker
项目概览
gitcode_dev
/
quicker
上一次同步 接近 2 年
通知
6
Star
2
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
quicker
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
f1d3d7e1
编写于
1月 14, 2022
作者:
璃白.
🌻
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'feature/ding' into 'master'
Feature/ding See merge request weixin_43881430/quicker!3
上级
f9f92df6
0fbe6a3c
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
171 addition
and
95 deletion
+171
-95
package.json
package.json
+2
-2
src/main/browsers/login.js
src/main/browsers/login.js
+6
-4
src/main/browsers/main.js
src/main/browsers/main.js
+7
-5
src/main/common/config.js
src/main/common/config.js
+2
-2
src/main/common/listener.js
src/main/common/listener.js
+13
-3
src/main/index.js
src/main/index.js
+1
-0
src/renderer/App.vue
src/renderer/App.vue
+30
-14
src/renderer/assets/common/constans.js
src/renderer/assets/common/constans.js
+3
-2
src/renderer/assets/common/utils.js
src/renderer/assets/common/utils.js
+11
-3
src/renderer/pages/plugins/index.vue
src/renderer/pages/plugins/index.vue
+3
-2
src/renderer/pages/quick-apps/app-list.vue
src/renderer/pages/quick-apps/app-list.vue
+3
-9
src/renderer/pages/quick-apps/components/app.vue
src/renderer/pages/quick-apps/components/app.vue
+1
-1
src/renderer/pages/search-bowser/index.vue
src/renderer/pages/search-bowser/index.vue
+1
-1
src/renderer/pages/search/index.vue
src/renderer/pages/search/index.vue
+10
-2
src/renderer/pages/search/subpages/dev.vue
src/renderer/pages/search/subpages/dev.vue
+1
-1
src/renderer/pages/search/subpages/market.vue
src/renderer/pages/search/subpages/market.vue
+18
-13
src/renderer/pages/search/subpages/plugin.vue
src/renderer/pages/search/subpages/plugin.vue
+1
-1
src/renderer/pages/search/subpages/settings.vue
src/renderer/pages/search/subpages/settings.vue
+44
-25
src/renderer/store/modules/main.js
src/renderer/store/modules/main.js
+13
-4
static/plugins/demo/deep.html
static/plugins/demo/deep.html
+1
-1
未找到文件。
package.json
浏览文件 @
f1d3d7e1
{
{
"name"
:
"Quicker"
,
"name"
:
"Quicker"
,
"version"
:
"0.0.
2
"
,
"version"
:
"0.0.
4
"
,
"author"
:
"libai"
,
"author"
:
"libai"
,
"description"
:
"An electron-vue project"
,
"description"
:
"An electron-vue project"
,
"license"
:
null
,
"license"
:
null
,
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
"build"
:
{
"build"
:
{
"asar"
:
true
,
"asar"
:
true
,
"productName"
:
"Quicker"
,
"productName"
:
"Quicker"
,
"appId"
:
"com.
muwoo.rubick
"
,
"appId"
:
"com.
layyback.quicker
"
,
"compression"
:
"maximum"
,
"compression"
:
"maximum"
,
"directories"
:
{
"directories"
:
{
"output"
:
"build"
"output"
:
"build"
...
...
src/main/browsers/login.js
浏览文件 @
f1d3d7e1
...
@@ -61,20 +61,22 @@ module.exports = () => {
...
@@ -61,20 +61,22 @@ module.exports = () => {
});
});
};
};
let
createWindow
=
()
=>
{
let
createWindow
=
mainWindow
=>
{
console
.
log
(
"
create window
"
);
console
.
log
(
"
create window
"
);
session
.
defaultSession
.
cookies
session
.
defaultSession
.
cookies
.
get
({
.
get
({
url
:
url
url
:
url
})
})
.
then
((
cookies
,
err
)
=>
{
.
then
((
cookies
,
err
)
=>
{
console
.
log
(
"
cookies
"
,
cookies
);
//
console.log("cookies", cookies);
});
});
win
=
new
BrowserWindow
({
win
=
new
BrowserWindow
({
frame
:
true
,
frame
:
true
,
autoHideMenuBar
:
true
,
autoHideMenuBar
:
true
,
title
:
false
,
title
:
false
,
parent
:
mainWindow
,
modal
:
true
,
width
:
460
,
width
:
460
,
height
:
400
,
height
:
400
,
show
:
false
,
show
:
false
,
...
@@ -103,7 +105,7 @@ module.exports = () => {
...
@@ -103,7 +105,7 @@ module.exports = () => {
});
});
// 打包后,失焦隐藏
// 打包后,失焦隐藏
win
.
on
(
"
blur
"
,
()
=>
{
win
.
on
(
"
blur
"
,
()
=>
{
// win.hid
e();
win
.
clos
e
();
});
});
win
.
webContents
.
on
(
"
did-stop-loading
"
,
()
=>
{
win
.
webContents
.
on
(
"
did-stop-loading
"
,
()
=>
{
win
.
webContents
.
insertCSS
(
win
.
webContents
.
insertCSS
(
...
@@ -120,7 +122,7 @@ module.exports = () => {
...
@@ -120,7 +122,7 @@ module.exports = () => {
.quicker_loading { height: 100vh; }
.quicker_loading { height: 100vh; }
`
`
);
);
win
.
openDevTools
()
win
.
openDevTools
()
;
win
.
show
();
win
.
show
();
});
});
};
};
...
...
src/main/browsers/main.js
浏览文件 @
f1d3d7e1
...
@@ -15,13 +15,14 @@ module.exports = () => {
...
@@ -15,13 +15,14 @@ module.exports = () => {
:
`file://
${
__dirname
}
/index.html`
;
:
`file://
${
__dirname
}
/index.html`
;
win
=
new
BrowserWindow
({
win
=
new
BrowserWindow
({
height
:
82
,
// client_height
height
:
74
,
// client_height
useContentSize
:
true
,
useContentSize
:
true
,
resizable
:
true
,
resizable
:
true
,
width
:
920
,
width
:
920
,
frame
:
false
,
frame
:
false
,
// backgroundColor: "#fff",
title
:
"
拉比克
"
,
title
:
"
拉比克
"
,
show
:
fals
e
,
show
:
tru
e
,
skipTaskbar
:
true
,
skipTaskbar
:
true
,
webPreferences
:
{
webPreferences
:
{
webSecurity
:
false
,
webSecurity
:
false
,
...
@@ -50,12 +51,13 @@ module.exports = () => {
...
@@ -50,12 +51,13 @@ module.exports = () => {
}
}
);
);
win
.
once
(
"
ready-to-show
"
,
()
=>
win
.
show
());
//
win.once("ready-to-show", () => win.show());
win
.
on
(
"
closed
"
,
()
=>
{
win
.
on
(
"
closed
"
,
()
=>
{
win
=
undefined
;
win
=
undefined
;
});
});
win
.
on
(
"
blur
"
,
()
=>
{
win
.
on
(
"
blur
"
,
()
=>
{
// win.hide();
const
childWindows
=
win
.
getChildWindows
();
if
(
!
childWindows
.
length
)
win
.
hide
();
});
});
};
};
...
...
src/main/common/config.js
浏览文件 @
f1d3d7e1
...
@@ -12,7 +12,7 @@ const defaultConfigForAnyPlatform = {
...
@@ -12,7 +12,7 @@ const defaultConfigForAnyPlatform = {
shortCut
:
{
shortCut
:
{
showAndHidden
:
"
Option+R
"
,
showAndHidden
:
"
Option+R
"
,
separate
:
"
Ctrl+D
"
,
separate
:
"
Ctrl+D
"
,
quit
:
"
Shift+Escape
"
quit
:
"
Shift+Escape
"
,
},
},
common
:
{
common
:
{
start
:
true
,
start
:
true
,
...
@@ -63,7 +63,7 @@ global.opConfig = {
...
@@ -63,7 +63,7 @@ global.opConfig = {
)
{
)
{
opConfig
.
config
=
defaultConfig
[
platform
];
opConfig
.
config
=
defaultConfig
[
platform
];
fs
.
writeFileSync
(
configPath
,
JSON
.
stringify
(
opConfig
.
config
));
fs
.
writeFileSync
(
configPath
,
JSON
.
stringify
(
opConfig
.
config
));
}
}
return
opConfig
.
config
;
return
opConfig
.
config
;
}
catch
(
e
)
{
}
catch
(
e
)
{
opConfig
.
config
=
defaultConfig
[
platform
];
opConfig
.
config
=
defaultConfig
[
platform
];
...
...
src/main/common/listener.js
浏览文件 @
f1d3d7e1
...
@@ -62,6 +62,7 @@ class Listener {
...
@@ -62,6 +62,7 @@ class Listener {
registerShortCut
(
mainWindow
)
{
registerShortCut
(
mainWindow
)
{
const
config
=
global
.
opConfig
.
get
();
const
config
=
global
.
opConfig
.
get
();
globalShortcut
.
unregisterAll
();
globalShortcut
.
unregisterAll
();
this
.
registerQuitPluginShortCut
(
mainWindow
)
// 注册偏好快捷键
// 注册偏好快捷键
globalShortcut
.
register
(
config
.
perf
.
shortCut
.
showAndHidden
,
()
=>
{
globalShortcut
.
register
(
config
.
perf
.
shortCut
.
showAndHidden
,
()
=>
{
const
{
x
,
y
}
=
screen
.
getCursorScreenPoint
();
const
{
x
,
y
}
=
screen
.
getCursorScreenPoint
();
...
@@ -124,7 +125,8 @@ class Listener {
...
@@ -124,7 +125,8 @@ class Listener {
this
.
setAutoLogin
();
this
.
setAutoLogin
();
this
.
colorPicker
();
this
.
colorPicker
();
this
.
initPlugin
();
this
.
initPlugin
(
mainWindow
);
this
.
registerQuitPluginShortCut
(
mainWindow
)
this
.
lockScreen
();
this
.
lockScreen
();
this
.
separate
();
this
.
separate
();
this
.
initCapture
();
this
.
initCapture
();
...
@@ -217,7 +219,9 @@ class Listener {
...
@@ -217,7 +219,9 @@ class Listener {
console
.
log
(
"
win
"
,
win
);
console
.
log
(
"
win
"
,
win
);
if
(
win
===
null
||
win
===
undefined
)
{
if
(
win
===
null
||
win
===
undefined
)
{
login
.
createWindow
();
login
.
createWindow
(
mainWindow
);
}
else
{
win
.
show
();
}
}
});
});
}
}
...
@@ -303,12 +307,18 @@ class Listener {
...
@@ -303,12 +307,18 @@ class Listener {
});
});
}
}
initPlugin
()
{
initPlugin
(
mainWindow
)
{
ipcMain
.
on
(
"
optionPlugin
"
,
(
e
,
args
)
=>
{
ipcMain
.
on
(
"
optionPlugin
"
,
(
e
,
args
)
=>
{
this
.
optionPlugin
=
args
;
this
.
optionPlugin
=
args
;
});
});
}
}
registerQuitPluginShortCut
(
mainWindow
)
{
globalShortcut
.
register
(
"
Esc
"
,
()
=>
{
mainWindow
.
webContents
.
send
(
"
quitPlugin
"
);
});
}
lockScreen
()
{
lockScreen
()
{
// 锁屏
// 锁屏
ipcMain
.
on
(
"
lock-screen
"
,
()
=>
{
ipcMain
.
on
(
"
lock-screen
"
,
()
=>
{
...
...
src/main/index.js
浏览文件 @
f1d3d7e1
...
@@ -29,6 +29,7 @@ class initApp {
...
@@ -29,6 +29,7 @@ class initApp {
this
.
onReady
();
this
.
onReady
();
this
.
onRunning
();
this
.
onRunning
();
this
.
onQuit
();
this
.
onQuit
();
// main.registerQuitPluginShortCut()
}
}
}
}
...
...
src/renderer/App.vue
浏览文件 @
f1d3d7e1
<
template
>
<
template
>
<div
id=
"app"
@
mousedown=
"drag"
>
<div
id=
"app"
@
mousedown=
"drag"
>
<a-layout
id=
"components-layout"
>
<a-layout
id=
"components-layout"
:class=
"[
{ mac: isMac }]"
>
<div
v-if=
"!searchType"
class=
"rubick-select"
>
<div
v-if=
"!searchType"
class=
"rubick-select"
>
<div
v-if=
"selected"
class=
"tag-container"
>
<div
v-if=
"selected"
class=
"tag-container"
>
<template
v-if=
"isWebview"
>
<template
v-if=
"isWebview"
>
...
@@ -39,9 +39,7 @@
...
@@ -39,9 +39,7 @@
<a-input
<a-input
id=
"search"
id=
"search"
:placeholder=
"
:placeholder=
"
subPlaceHolder && selected && selected.key === 'plugin-container'
subPlaceHolder && selected ? subPlaceHolder : 'Hello, Quicker'
? subPlaceHolder
: 'Hello, Quicker'
"
"
@
mousedown.stop=
"dragWhenInput"
@
mousedown.stop=
"dragWhenInput"
class=
"main-input"
class=
"main-input"
...
@@ -91,7 +89,7 @@
...
@@ -91,7 +89,7 @@
:src=
"userInfo.UserAvatar"
:src=
"userInfo.UserAvatar"
alt=
""
alt=
""
/>
/>
<a-icon
v-else
class=
"icon-more"
type=
"
m
ore"
/>
<a-icon
v-else
class=
"icon-more"
type=
"
appst
ore"
/>
</div>
</div>
</div>
</div>
</a-input>
</a-input>
...
@@ -157,7 +155,7 @@
...
@@ -157,7 +155,7 @@
</template>
</template>
<
script
>
<
script
>
import
quickApps
from
"
./pages/quick-apps/app-list.vue
"
;
import
quickApps
from
"
./pages/quick-apps/app-list.vue
"
;
import
{
mapActions
,
mapMutations
,
mapState
}
from
"
vuex
"
;
import
{
mapActions
,
mapMutations
,
mapState
,
mapGetters
}
from
"
vuex
"
;
import
{
ipcRenderer
,
remote
,
clipboard
}
from
"
electron
"
;
import
{
ipcRenderer
,
remote
,
clipboard
}
from
"
electron
"
;
import
{
import
{
getWindowHeight
,
getWindowHeight
,
...
@@ -188,10 +186,18 @@ export default {
...
@@ -188,10 +186,18 @@ export default {
pluginInfo
:
pluginInfo
pluginInfo
:
pluginInfo
});
});
};
};
// document.addEventListener("keydown", e => {
// console.log(e);
// if (e.keyCode === 27) {
// this.closeTag();
// this.changeMode("view");
// }
// });
},
},
mounted
()
{
mounted
()
{
ipcRenderer
.
on
(
"
init-rubick
"
,
this
.
closeTag
);
ipcRenderer
.
on
(
"
init-rubick
"
,
this
.
closeTag
);
ipcRenderer
.
on
(
"
new-window
"
,
this
.
newWindow
);
ipcRenderer
.
on
(
"
new-window
"
,
this
.
newWindow
);
ipcRenderer
.
on
(
"
quitPlugin
"
,
this
.
quitPlugin
);
// 超级面板打开插件
// 超级面板打开插件
ipcRenderer
.
on
(
"
superPanel-openPlugin
"
,
(
e
,
args
)
=>
{
ipcRenderer
.
on
(
"
superPanel-openPlugin
"
,
(
e
,
args
)
=>
{
this
.
closeTag
();
this
.
closeTag
();
...
@@ -369,11 +375,14 @@ export default {
...
@@ -369,11 +375,14 @@ export default {
return
`<div>
${
result
[
0
]}
</div>`
;
return
`<div>
${
result
[
0
]}
</div>`
;
}
}
},
},
quitPlugin
()
{
this
.
closeTag
();
this
.
changeMode
(
"
view
"
);
},
checkNeedInit
(
e
)
{
checkNeedInit
(
e
)
{
// 如果搜索栏无内容,且按了删除键,则清空 tag
// 如果搜索栏无内容,且按了删除键,则清空 tag
if
(
this
.
searchValue
===
""
&&
e
.
keyCode
===
8
)
{
if
(
this
.
searchValue
===
""
&&
e
.
keyCode
===
8
)
{
this
.
closeTag
();
this
.
quitPlugin
();
this
.
changeMode
(
"
view
"
);
}
}
},
},
changePath
({
key
})
{
changePath
({
key
})
{
...
@@ -394,7 +403,7 @@ export default {
...
@@ -394,7 +403,7 @@ export default {
});
});
this
.
setHideOnBlur
(
true
);
this
.
setHideOnBlur
(
true
);
ipcRenderer
.
send
(
"
changeWindowSize-rubick
"
,
{
ipcRenderer
.
send
(
"
changeWindowSize-rubick
"
,
{
height
:
getWindowHeight
([])
height
:
getWindowHeight
([]
,
this
.
dingApp
)
});
});
if
(
this
.
$router
.
history
.
current
.
fullPath
!==
"
/home
"
)
{
if
(
this
.
$router
.
history
.
current
.
fullPath
!==
"
/home
"
)
{
// 该if是为了避免跳转到相同路由而报错。
// 该if是为了避免跳转到相同路由而报错。
...
@@ -488,6 +497,10 @@ export default {
...
@@ -488,6 +497,10 @@ export default {
"
userInfo
"
,
"
userInfo
"
,
"
pluginLoading
"
"
pluginLoading
"
]),
]),
...
mapGetters
(
"
main
"
,
[
"
dingApp
"
]),
isMac
()
{
return
commonConst
.
macOS
();
},
isWebview
()
{
isWebview
()
{
return
this
.
pluginInfo
.
subType
===
"
webview
"
;
return
this
.
pluginInfo
.
subType
===
"
webview
"
;
},
},
...
@@ -540,7 +553,7 @@ body {
...
@@ -540,7 +553,7 @@ body {
}
}
#app {
#app {
padding:
10
px;
padding:
6
px;
box-sizing: border-box;
box-sizing: border-box;
}
}
...
@@ -548,6 +561,9 @@ body {
...
@@ -548,6 +561,9 @@ body {
overflow: auto;
overflow: auto;
// margin-top: 14px;
// margin-top: 14px;
background: #fff;
background: #fff;
&.mac {
-webkit-app-region: drag;
}
::-webkit-scrollbar {
::-webkit-scrollbar {
width: 0;
width: 0;
}
}
...
@@ -605,14 +621,13 @@ body {
...
@@ -605,14 +621,13 @@ body {
border: none;
border: none;
box-shadow: none;
box-shadow: none;
}
}
.options {
.options {
position: absolute;
position: absolute;
top:
82
px;
top:
78
px;
left: 0;
left: 0;
width: 100%;
width: 100%;
z-index: 99;
z-index: 99;
max-height: calc(~"100vh -
9
6px"); // client_height
max-height: calc(~"100vh -
8
6px"); // client_height
overflow: auto;
overflow: auto;
padding: 0 14px;
padding: 0 14px;
box-sizing: border-box;
box-sizing: border-box;
...
@@ -630,7 +645,7 @@ body {
...
@@ -630,7 +645,7 @@ body {
}
}
}
}
.rubick-select-subMenu {
.rubick-select-subMenu {
-webkit-app-region: drag;
//
-webkit-app-region: drag;
background: #eee;
background: #eee;
height: 50px;
height: 50px;
padding-left: 200px;
padding-left: 200px;
...
@@ -667,6 +682,7 @@ body {
...
@@ -667,6 +682,7 @@ body {
font-size: 26px;
font-size: 26px;
font-weight: bold;
font-weight: bold;
cursor: pointer;
cursor: pointer;
color: #999;
}
}
.loading {
.loading {
position: absolute;
position: absolute;
...
...
src/renderer/assets/common/constans.js
浏览文件 @
f1d3d7e1
const
WINDOW_MAX_HEIGHT
=
800
;
const
WINDOW_MAX_HEIGHT
=
800
;
const
WINDOW_MIN_HEIGHT
=
82
;
// client_height
const
WINDOW_MIN_HEIGHT
=
74
;
// client_height
const
WINDOW_MIN_HEIGHT_WITH_APP
=
126
;
// client_height
const
PRE_ITEM_HEIGHT
=
60
;
const
PRE_ITEM_HEIGHT
=
60
;
const
SYSTEM_PLUGINS
=
[
const
SYSTEM_PLUGINS
=
[
...
@@ -55,4 +56,4 @@ const SYSTEM_PLUGINS = [
...
@@ -55,4 +56,4 @@ const SYSTEM_PLUGINS = [
const
APP_FINDER_PATH
=
process
.
platform
===
'
darwin
'
?
[
'
/System/Applications
'
,
'
/Applications
'
,
'
/System/Library/PreferencePanes
'
]
:
[];
const
APP_FINDER_PATH
=
process
.
platform
===
'
darwin
'
?
[
'
/System/Applications
'
,
'
/Applications
'
,
'
/System/Library/PreferencePanes
'
]
:
[];
export
{
WINDOW_MAX_HEIGHT
,
WINDOW_MIN_HEIGHT
,
PRE_ITEM_HEIGHT
,
SYSTEM_PLUGINS
,
APP_FINDER_PATH
};
export
{
WINDOW_MAX_HEIGHT
,
WINDOW_MIN_HEIGHT
,
WINDOW_MIN_HEIGHT_WITH_APP
,
PRE_ITEM_HEIGHT
,
SYSTEM_PLUGINS
,
APP_FINDER_PATH
};
src/renderer/assets/common/utils.js
浏览文件 @
f1d3d7e1
import
{
import
{
WINDOW_MAX_HEIGHT
,
WINDOW_MAX_HEIGHT
,
WINDOW_MIN_HEIGHT
,
WINDOW_MIN_HEIGHT
,
WINDOW_MIN_HEIGHT_WITH_APP
,
PRE_ITEM_HEIGHT
,
PRE_ITEM_HEIGHT
,
SYSTEM_PLUGINS
SYSTEM_PLUGINS
}
from
"
./constans
"
;
}
from
"
./constans
"
;
...
@@ -22,9 +23,10 @@ const store = new Store();
...
@@ -22,9 +23,10 @@ const store = new Store();
getApp
.
init
();
getApp
.
init
();
const
fileLists
=
getApp
.
fileLists
;
const
fileLists
=
getApp
.
fileLists
;
function
getWindowHeight
(
searchList
)
{
function
getWindowHeight
(
searchList
,
dingAppList
=
[]
)
{
if
(
!
searchList
)
return
WINDOW_MAX_HEIGHT
;
if
(
!
searchList
)
return
WINDOW_MAX_HEIGHT
;
if
(
!
searchList
.
length
)
return
WINDOW_MIN_HEIGHT
;
if
(
!
searchList
.
length
)
return
dingAppList
.
length
?
WINDOW_MIN_HEIGHT_WITH_APP
:
WINDOW_MIN_HEIGHT
;
return
searchList
.
length
*
PRE_ITEM_HEIGHT
+
WINDOW_MIN_HEIGHT
+
5
>
return
searchList
.
length
*
PRE_ITEM_HEIGHT
+
WINDOW_MIN_HEIGHT
+
5
>
WINDOW_MAX_HEIGHT
WINDOW_MAX_HEIGHT
?
WINDOW_MAX_HEIGHT
?
WINDOW_MAX_HEIGHT
...
@@ -51,6 +53,11 @@ function existOrNot(path) {
...
@@ -51,6 +53,11 @@ function existOrNot(path) {
});
});
}
}
function
isMdFile
(
str
)
{
if
(
!
str
)
return
false
;
return
/
\.
md$/i
.
test
(
str
);
}
const
appPath
=
getLocalDataFile
();
const
appPath
=
getLocalDataFile
();
async
function
downloadZip
(
downloadRepoUrl
,
name
)
{
async
function
downloadZip
(
downloadRepoUrl
,
name
)
{
...
@@ -208,5 +215,6 @@ export {
...
@@ -208,5 +215,6 @@ export {
downloadZip
,
downloadZip
,
downloadZipFromGitCode
,
downloadZipFromGitCode
,
fileLists
,
fileLists
,
debounce
debounce
,
isMdFile
};
};
src/renderer/pages/plugins/index.vue
浏览文件 @
f1d3d7e1
...
@@ -39,6 +39,8 @@ export default {
...
@@ -39,6 +39,8 @@ export default {
};
};
},
},
mounted
()
{
mounted
()
{
this
.
setSubPlaceHolder
(
"
按 Esc 键退出插件
"
);
// this.setSubPlaceHolder("按 ⌫ 键退出插件");
this
.
webview
=
document
.
querySelector
(
"
webview
"
);
this
.
webview
=
document
.
querySelector
(
"
webview
"
);
// if (!this.webview) return;
// if (!this.webview) return;
this
.
webview
.
addEventListener
(
"
dom-ready
"
,
()
=>
{
this
.
webview
.
addEventListener
(
"
dom-ready
"
,
()
=>
{
...
@@ -53,7 +55,6 @@ export default {
...
@@ -53,7 +55,6 @@ export default {
pluginLoading
:
false
pluginLoading
:
false
});
});
});
});
this
.
setSubPlaceHolder
(
"
Hello, Quicker
"
);
this
.
webview
.
addEventListener
(
"
ipc-message
"
,
event
=>
{
this
.
webview
.
addEventListener
(
"
ipc-message
"
,
event
=>
{
if
(
event
.
channel
===
"
insertCSS
"
)
{
if
(
event
.
channel
===
"
insertCSS
"
)
{
this
.
webview
.
addEventListener
(
"
dom-ready
"
,
()
=>
{
this
.
webview
.
addEventListener
(
"
dom-ready
"
,
()
=>
{
...
@@ -172,6 +173,6 @@ export default {
...
@@ -172,6 +173,6 @@ export default {
<
style
lang=
"less"
>
<
style
lang=
"less"
>
#webview {
#webview {
width: 100%;
width: 100%;
height: calc(~"100vh -
8
4px");
height: calc(~"100vh -
7
4px");
}
}
</
style
>
</
style
>
src/renderer/pages/quick-apps/app-list.vue
浏览文件 @
f1d3d7e1
...
@@ -35,13 +35,14 @@
...
@@ -35,13 +35,14 @@
<
script
>
<
script
>
import
app
from
"
./components/app.vue
"
;
import
app
from
"
./components/app.vue
"
;
import
{
shell
,
ipcRenderer
}
from
"
electron
"
;
import
{
shell
,
ipcRenderer
}
from
"
electron
"
;
import
{
mapState
,
mapMutations
,
mapActions
}
from
"
vuex
"
;
import
{
mapState
,
mapMutations
,
mapActions
,
mapGetters
}
from
"
vuex
"
;
export
default
{
export
default
{
components
:
{
components
:
{
app
app
},
},
computed
:
{
computed
:
{
...
mapState
(
"
main
"
,
[
"
mode
"
,
"
installs
"
,
"
userInfo
"
,
"
devPlugins
"
]),
...
mapState
(
"
main
"
,
[
"
mode
"
,
"
installs
"
,
"
userInfo
"
,
"
devPlugins
"
]),
...
mapGetters
(
"
main
"
,
[
"
dingApp
"
]),
isEditMode
()
{
isEditMode
()
{
return
this
.
mode
===
"
edit
"
;
return
this
.
mode
===
"
edit
"
;
},
},
...
@@ -55,13 +56,6 @@ export default {
...
@@ -55,13 +56,6 @@ export default {
url
:
"
https://yre5673znb.feishu.cn/docs/doccnMnLv3iZ3epFvjXprnPum3b
"
,
url
:
"
https://yre5673znb.feishu.cn/docs/doccnMnLv3iZ3epFvjXprnPum3b
"
,
icon
:
"
https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg95.699pic.com%2Felement%2F40053%2F1100.png_860.png%21%2Ffw%2F562&refer=http%3A%2F%2Fimg95.699pic.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642577880&t=84032418744ad3e05d175dd6dd309c99
"
icon
:
"
https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg95.699pic.com%2Felement%2F40053%2F1100.png_860.png%21%2Ffw%2F562&refer=http%3A%2F%2Fimg95.699pic.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642577880&t=84032418744ad3e05d175dd6dd309c99
"
};
};
},
dingApp
()
{
return
[
...
this
.
devPlugins
.
filter
(
plugin
=>
{
return
plugin
.
ding
===
true
;
})
];
}
}
},
},
created
()
{
created
()
{
...
@@ -85,7 +79,7 @@ export default {
...
@@ -85,7 +79,7 @@ export default {
// alert(123)
// alert(123)
if
(
!
this
.
isHome
)
return
;
if
(
!
this
.
isHome
)
return
;
ipcRenderer
.
send
(
"
changeWindowSize-rubick
"
,
{
ipcRenderer
.
send
(
"
changeWindowSize-rubick
"
,
{
height
:
this
.
dingApp
.
length
?
126
:
82
height
:
this
.
dingApp
.
length
?
126
:
74
});
});
},
},
helpDoc
()
{
helpDoc
()
{
...
...
src/renderer/pages/quick-apps/components/app.vue
浏览文件 @
f1d3d7e1
...
@@ -40,7 +40,7 @@ export default {
...
@@ -40,7 +40,7 @@ export default {
bottom: -10px;
bottom: -10px;
transition: all 0.3s;
transition: all 0.3s;
box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.1);
box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.1);
-webkit-app-region: no-drag;
//
-webkit-app-region: no-drag;
z-index: 2;
z-index: 2;
}
}
.app_name {
.app_name {
...
...
src/renderer/pages/search-bowser/index.vue
浏览文件 @
f1d3d7e1
...
@@ -149,7 +149,7 @@ export default {
...
@@ -149,7 +149,7 @@ export default {
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
webview {
webview {
height: calc(~"100vh -
84
px");
height: calc(~"100vh -
112
px");
width: 100%;
width: 100%;
}
}
.ant-tabs {
.ant-tabs {
...
...
src/renderer/pages/search/index.vue
浏览文件 @
f1d3d7e1
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<a-menu
:selectedKeys=
"current"
mode=
"horizontal"
@
select=
"changePath"
>
<a-menu
:selectedKeys=
"current"
mode=
"horizontal"
@
select=
"changePath"
>
<a-menu-item
key=
"market"
>
<a-menu-item
key=
"market"
>
<a-icon
type=
"appstore"
/>
<a-icon
type=
"appstore"
/>
<a-badge
:dot=
"showUpdateBadge"
>
插件
中心
</a-badge>
<a-badge
:dot=
"showUpdateBadge"
>
插件
市场
</a-badge>
</a-menu-item>
</a-menu-item>
<a-menu-item
key=
"plugin"
>
<a-menu-item
key=
"plugin"
>
<a-icon
type=
"heart"
/>
<a-icon
type=
"heart"
/>
...
@@ -31,7 +31,11 @@ export default {
...
@@ -31,7 +31,11 @@ export default {
name
:
"
search
"
,
name
:
"
search
"
,
methods
:
{
methods
:
{
...
mapActions
(
"
main
"
,
[
"
onSearch
"
,
"
showMainUI
"
]),
...
mapActions
(
"
main
"
,
[
"
onSearch
"
,
"
showMainUI
"
]),
...
mapMutations
(
"
main
"
,
[
"
commonUpdate
"
,
"
changeMode
"
]),
...
mapMutations
(
"
main
"
,
[
"
commonUpdate
"
,
"
changeMode
"
,
"
setSubPlaceHolder
"
]),
changePath
({
key
})
{
changePath
({
key
})
{
this
.
$router
.
push
({
path
:
`/home/
${
key
}
`
});
this
.
$router
.
push
({
path
:
`/home/
${
key
}
`
});
this
.
commonUpdate
({
this
.
commonUpdate
({
...
@@ -44,6 +48,10 @@ export default {
...
@@ -44,6 +48,10 @@ export default {
}
}
}
}
},
},
mounted
()
{
this
.
setSubPlaceHolder
(
"
按 Esc 键退出
"
);
// this.setSubPlaceHolder("按 ⌫ 键退出");
},
computed
:
{
computed
:
{
...
mapState
(
"
main
"
,
[
...
mapState
(
"
main
"
,
[
"
showMain
"
,
"
showMain
"
,
...
...
src/renderer/pages/search/subpages/dev.vue
浏览文件 @
f1d3d7e1
...
@@ -142,7 +142,7 @@ export default {
...
@@ -142,7 +142,7 @@ export default {
<
style
lang
=
"
less
"
>
<
style
lang
=
"
less
"
>
.
dev
-
container
{
.
dev
-
container
{
height
:
calc
(
~
'
100vh - 11
0px
'
);
// height: calc(~'100vh - 8
0px');
width
:
100
%
;
width
:
100
%
;
.
ant
-
menu
-
item
{
.
ant
-
menu
-
item
{
height
:
60
px
!
important
;
height
:
60
px
!
important
;
...
...
src/renderer/pages/search/subpages/market.vue
浏览文件 @
f1d3d7e1
...
@@ -112,7 +112,8 @@ import api from "../../../assets/api";
...
@@ -112,7 +112,8 @@ import api from "../../../assets/api";
import
{
mapActions
,
mapMutations
,
mapState
}
from
"
vuex
"
;
import
{
mapActions
,
mapMutations
,
mapState
}
from
"
vuex
"
;
import
marked
from
"
marked
"
;
import
marked
from
"
marked
"
;
import
{
shell
}
from
"
electron
"
;
import
{
shell
}
from
"
electron
"
;
import
path
from
"
path
"
;
import
axios
from
"
axios
"
;
import
{
isMdFile
}
from
"
../../../assets/common/utils
"
;
const
rendererMD
=
new
marked
.
Renderer
();
const
rendererMD
=
new
marked
.
Renderer
();
export
default
{
export
default
{
...
@@ -129,24 +130,28 @@ export default {
...
@@ -129,24 +130,28 @@ export default {
this
.
getPlugins
();
this
.
getPlugins
();
// this.bannerList = bannerRes.result;
// this.bannerList = bannerRes.result;
},
},
methods
:
{
methods
:
{
getPlugins
()
{
getPlugins
()
{
api
.
getPlugins
().
then
(
async
({
data
:
res
})
=>
{
api
.
getPlugins
().
then
(
async
({
data
:
res
})
=>
{
res
.
forEach
(
async
plugin
=>
{
res
.
forEach
(
async
plugin
=>
{
const
pluginItem
=
await
this
.
getPluginDetail
(
plugin
);
const
pluginItem
=
await
this
.
getPluginDetail
(
plugin
.
name
);
this
.
pluginList
.
push
(
pluginItem
);
this
.
pluginList
.
push
(
pluginItem
);
});
});
});
});
},
},
async
getPluginDetail
(
plugin
)
{
async
getPluginDetail
(
name
)
{
const
{
const
{
data
:
{
version
,
pluginName
,
description
,
logo
}
data
:
plugin
}
=
await
api
.
getPluginDetail
(
plugin
.
name
);
}
=
await
api
.
getPluginDetail
(
name
);
plugin
.
pluginName
=
pluginName
;
if
(
plugin
.
detail
&&
isMdFile
(
plugin
.
detail
))
{
plugin
.
description
=
description
;
const
{
readme
}
=
await
axios
.
get
(
plugin
.
version
=
version
;
`https://gitlab.com/layyback/quicker-market/-/raw/master/plugins/
${
plugin
.
name
}
/
${
plugin
.
detail
}
`
plugin
.
logo
=
`https://gitlab.com/layyback/quicker-market/-/raw/master/plugins/
${
plugin
.
name
}
/
${
logo
}
`
;
);
plugin
.
readme
=
readme
;
}
else
{
plugin
.
readme
=
plugin
.
detail
;
}
plugin
.
logo
=
`https://gitlab.com/layyback/quicker-market/-/raw/master/plugins/
${
plugin
.
name
}
/
${
plugin
.
logo
}
`
;
// plugin.logo = `https://gitcode.net/weixin_43881430/quicker-market/-/raw/master/plugins/${plugin.name}/${logo}`;
// plugin.logo = `https://gitcode.net/weixin_43881430/quicker-market/-/raw/master/plugins/${plugin.name}/${logo}`;
plugin
.
downloadUrl
=
`https://gitlab.com/api/v4/projects/layyback%2Fquicker-market/repository/archive.zip?path=plugins%2F
${
plugin
.
name
}
`
;
plugin
.
downloadUrl
=
`https://gitlab.com/api/v4/projects/layyback%2Fquicker-market/repository/archive.zip?path=plugins%2F
${
plugin
.
name
}
`
;
// plugin.downloadUrl =
// plugin.downloadUrl =
...
@@ -180,8 +185,6 @@ export default {
...
@@ -180,8 +185,6 @@ export default {
plugin
=>
plugin
.
name
===
item
.
name
&&
plugin
.
type
===
"
prod
"
plugin
=>
plugin
.
name
===
item
.
name
&&
plugin
.
type
===
"
prod
"
);
);
if
(
!
plugin
)
return
"
download
"
;
if
(
!
plugin
)
return
"
download
"
;
console
.
log
(
plugin
,
item
);
if
(
plugin
&&
plugin
.
version
!==
item
.
version
)
{
if
(
plugin
&&
plugin
.
version
!==
item
.
version
)
{
this
.
changeUpdateBadge
(
true
);
this
.
changeUpdateBadge
(
true
);
return
"
update
"
;
return
"
update
"
;
...
@@ -227,7 +230,9 @@ export default {
...
@@ -227,7 +230,9 @@ export default {
smartypants
:
false
smartypants
:
false
});
});
try
{
try
{
return
marked
(
this
.
currentSelect
.
detail
);
console
.
log
(
123
,
this
.
currentSelect
);
return
marked
(
this
.
currentSelect
.
readme
);
}
catch
(
e
)
{
}
catch
(
e
)
{
return
"
暂无描述信息
"
;
return
"
暂无描述信息
"
;
}
}
...
...
src/renderer/pages/search/subpages/plugin.vue
浏览文件 @
f1d3d7e1
...
@@ -142,7 +142,7 @@ export default {
...
@@ -142,7 +142,7 @@ export default {
<
style
lang
=
"
less
"
>
<
style
lang
=
"
less
"
>
.
dev
-
container
{
.
dev
-
container
{
height
:
calc
(
~
"
100vh - 1
10
px
"
);
height
:
calc
(
~
"
100vh - 1
24
px
"
);
overflow
:
auto
;
overflow
:
auto
;
.
dev
-
detail
{
.
dev
-
detail
{
display
:
flex
;
display
:
flex
;
...
...
src/renderer/pages/search/subpages/settings.vue
浏览文件 @
f1d3d7e1
...
@@ -37,12 +37,17 @@
...
@@ -37,12 +37,17 @@
<div
<div
class=
"value"
class=
"value"
tabIndex=
"-1"
tabIndex=
"-1"
@
click=
"shortCutChange = true"
@
keyup=
"e => changeShortCut(e, 'showAndHidden')"
@
keyup=
"e => changeShortCut(e, 'showAndHidden')"
>
>
{{ config.perf.shortCut.showAndHidden }}
{{
shortCutChange
? "输入快捷组合键"
: config.perf.shortCut.showAndHidden
}}
</div>
</div>
</div>
</div>
<div
class=
"settings-item-li"
>
<
!-- <
div class="settings-item-li">
<div class="label">插件分离快捷键</div>
<div class="label">插件分离快捷键</div>
<div
<div
class="value"
class="value"
...
@@ -51,8 +56,8 @@
...
@@ -51,8 +56,8 @@
>
>
{{ config.perf.shortCut.separate }}
{{ config.perf.shortCut.separate }}
</div>
</div>
</div>
</div>
-->
<div
class=
"settings-item-li"
>
<
!-- <
div class="settings-item-li">
<div class="label">返回主界面</div>
<div class="label">返回主界面</div>
<div
<div
class="value"
class="value"
...
@@ -61,14 +66,15 @@
...
@@ -61,14 +66,15 @@
>
>
{{ config.perf.shortCut.quit }}
{{ config.perf.shortCut.quit }}
</div>
</div>
</div>
</div>
-->
</div>
</div>
<div
class=
"setting-item"
>
<div
class=
"setting-item"
>
<div
class=
"title"
>
通用
</div>
<div
class=
"title"
>
通用
</div>
<div
class=
"settings-item-li"
>
<div
class=
"settings-item-li"
>
<div
class=
"label"
>
开机启动
</div>
<div
class=
"label"
>
开机启动
</div>
<a-switch
<a-switch
v-model:checked=
"config.perf.common.start"
:default-checked=
"config.perf.common.start"
@
change=
"changeStart"
checked-children=
"开"
checked-children=
"开"
un-checked-children=
"关"
un-checked-children=
"关"
></a-switch>
></a-switch>
...
@@ -76,7 +82,8 @@
...
@@ -76,7 +82,8 @@
<div
class=
"settings-item-li"
>
<div
class=
"settings-item-li"
>
<div
class=
"label"
>
空格执行
</div>
<div
class=
"label"
>
空格执行
</div>
<a-switch
<a-switch
v-model:checked=
"config.perf.common.space"
:default-checked=
"config.perf.common.space"
@
change=
"changeSpace"
checked-children=
"开"
checked-children=
"开"
un-checked-children=
"关"
un-checked-children=
"关"
></a-switch>
></a-switch>
...
@@ -87,7 +94,8 @@
...
@@ -87,7 +94,8 @@
<div
class=
"settings-item-li"
>
<div
class=
"settings-item-li"
>
<div
class=
"label"
>
搜索启动应用
&
文件
</div>
<div
class=
"label"
>
搜索启动应用
&
文件
</div>
<a-switch
<a-switch
v-model:checked=
"config.perf.local.search"
:default-checked=
"config.perf.local.search"
@
change=
"changeSearch"
checked-children=
"开"
checked-children=
"开"
un-checked-children=
"关"
un-checked-children=
"关"
></a-switch>
></a-switch>
...
@@ -184,6 +192,7 @@ export default {
...
@@ -184,6 +192,7 @@ export default {
currentSelect
:
[
3
],
currentSelect
:
[
3
],
config
:
{
...
opConfig
.
get
()
},
config
:
{
...
opConfig
.
get
()
},
signLoading
:
false
,
signLoading
:
false
,
shortCutChange
:
false
,
examples
:
[
examples
:
[
{
{
title
:
"
快捷键 「 Alt + W」 关键字 「 微信」
"
,
title
:
"
快捷键 「 Alt + W」 关键字 「 微信」
"
,
...
@@ -210,6 +219,18 @@ export default {
...
@@ -210,6 +219,18 @@ export default {
created
()
{},
created
()
{},
methods
:
{
methods
:
{
...
mapMutations
(
"
main
"
,
[
"
setUserInfo
"
]),
...
mapMutations
(
"
main
"
,
[
"
setUserInfo
"
]),
changeStart
(
v
)
{
this
.
config
.
perf
.
common
.
start
=
v
;
this
.
saveConfig
();
},
changeSpace
(
v
)
{
this
.
config
.
perf
.
common
.
space
=
v
;
this
.
saveConfig
();
},
changeSearch
(
v
)
{
this
.
config
.
perf
.
local
.
search
=
v
;
this
.
saveConfig
();
},
login
()
{
login
()
{
this
.
signLoading
=
true
;
this
.
signLoading
=
true
;
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -224,27 +245,30 @@ export default {
...
@@ -224,27 +245,30 @@ export default {
ipcRenderer
.
send
(
"
logout
"
);
ipcRenderer
.
send
(
"
logout
"
);
},
},
changeShortCut
(
e
,
key
)
{
changeShortCut
(
e
,
key
)
{
let
change
=
false
;
//
let change = false;
if
(
e
.
altKey
&&
e
.
keyCode
!==
18
)
{
if
(
e
.
altKey
&&
e
.
keyCode
!==
18
)
{
const
compose
=
`Option+
${
keycodes
[
e
.
keyCode
].
toUpperCase
()}
`
;
const
compose
=
`Option+
${
keycodes
[
e
.
keyCode
].
toUpperCase
()}
`
;
this
.
config
.
perf
.
shortCut
[
key
]
=
compose
;
this
.
config
.
perf
.
shortCut
[
key
]
=
compose
;
change
=
true
;
//
change = true;
}
}
if
(
e
.
ctrlKey
&&
e
.
keyCode
!==
17
)
{
if
(
e
.
ctrlKey
&&
e
.
keyCode
!==
17
)
{
const
compose
=
`Ctrl+
${
keycodes
[
e
.
keyCode
].
toUpperCase
()}
`
;
const
compose
=
`Ctrl+
${
keycodes
[
e
.
keyCode
].
toUpperCase
()}
`
;
this
.
config
.
perf
.
shortCut
[
key
]
=
compose
;
this
.
config
.
perf
.
shortCut
[
key
]
=
compose
;
change
=
true
;
//
change = true;
}
}
if
(
e
.
shiftKey
&&
e
.
keyCode
!==
16
)
{
if
(
e
.
shiftKey
&&
e
.
keyCode
!==
16
)
{
const
compose
=
`Shift+
${
keycodes
[
e
.
keyCode
].
toUpperCase
()}
`
;
const
compose
=
`Shift+
${
keycodes
[
e
.
keyCode
].
toUpperCase
()}
`
;
this
.
config
.
perf
.
shortCut
[
key
]
=
compose
;
this
.
config
.
perf
.
shortCut
[
key
]
=
compose
;
change
=
true
;
//
change = true;
}
}
if
(
e
.
metaKey
&&
e
.
keyCode
!==
93
)
{
if
(
e
.
metaKey
&&
e
.
keyCode
!==
93
)
{
const
compose
=
`Command+
${
keycodes
[
e
.
keyCode
].
toUpperCase
()}
`
;
const
compose
=
`Command+
${
keycodes
[
e
.
keyCode
].
toUpperCase
()}
`
;
this
.
config
.
perf
.
shortCut
[
key
]
=
compose
;
this
.
config
.
perf
.
shortCut
[
key
]
=
compose
;
change
=
true
;
//
change = true;
}
}
this
.
saveConfig
();
this
.
config
=
{
...
opConfig
.
get
()
};
this
.
shortCutChange
=
false
;
},
},
addConfig
()
{
addConfig
()
{
this
.
config
.
global
.
push
({
this
.
config
.
global
.
push
({
...
@@ -279,17 +303,12 @@ export default {
...
@@ -279,17 +303,12 @@ export default {
},
},
changeGlobalValue
(
index
,
value
)
{
changeGlobalValue
(
index
,
value
)
{
this
.
$set
(
this
.
config
.
global
[
index
],
"
value
"
,
value
);
this
.
$set
(
this
.
config
.
global
[
index
],
"
value
"
,
value
);
}
},
},
saveConfig
()
{
watch
:
{
opConfig
.
set
(
"
perf
"
,
this
.
config
.
perf
);
config
:
{
opConfig
.
set
(
"
superPanel
"
,
this
.
config
.
superPanel
);
deep
:
true
,
opConfig
.
set
(
"
global
"
,
this
.
config
.
global
);
handler
()
{
ipcRenderer
.
send
(
"
re-register
"
);
opConfig
.
set
(
"
perf
"
,
this
.
config
.
perf
);
opConfig
.
set
(
"
superPanel
"
,
this
.
config
.
superPanel
);
opConfig
.
set
(
"
global
"
,
this
.
config
.
global
);
ipcRenderer
.
send
(
"
re-register
"
);
}
}
}
}
}
};
};
...
@@ -298,7 +317,7 @@ export default {
...
@@ -298,7 +317,7 @@ export default {
<
style
lang=
"less"
>
<
style
lang=
"less"
>
@import "../../../assets/style/varable.less";
@import "../../../assets/style/varable.less";
.pg-settings {
.pg-settings {
height: calc(~"100vh - 12
8
px");
height: calc(~"100vh - 12
0
px");
overflow: auto;
overflow: auto;
.dev-detail {
.dev-detail {
height: 100%;
height: 100%;
...
...
src/renderer/store/modules/main.js
浏览文件 @
f1d3d7e1
...
@@ -172,6 +172,16 @@ const state = {
...
@@ -172,6 +172,16 @@ const state = {
})()
})()
};
};
const
getters
=
{
dingApp
(
state
,
getters
)
{
return
[
...
state
.
devPlugins
.
filter
(
plugin
=>
{
return
plugin
.
ding
===
true
;
})
];
}
};
const
mutations
=
{
const
mutations
=
{
changeMode
(
state
,
val
)
{
changeMode
(
state
,
val
)
{
state
.
mode
=
val
;
state
.
mode
=
val
;
...
@@ -280,7 +290,7 @@ const actions = {
...
@@ -280,7 +290,7 @@ const actions = {
/**
/**
* @param {Object} payload payload.filePath为配置文件的绝对路径。payload.value为搜索栏文字值。
* @param {Object} payload payload.filePath为配置文件的绝对路径。payload.value为搜索栏文字值。
*/
*/
async
onSearch
({
commit
},
payload
)
{
async
onSearch
({
commit
,
getters
},
payload
)
{
if
(
state
.
selected
&&
state
.
selected
.
key
!==
"
plugin-container
"
)
{
if
(
state
.
selected
&&
state
.
selected
.
key
!==
"
plugin-container
"
)
{
commit
(
"
commonUpdate
"
,
{
searchValue
:
""
});
commit
(
"
commonUpdate
"
,
{
searchValue
:
""
});
return
;
return
;
...
@@ -442,7 +452,7 @@ const actions = {
...
@@ -442,7 +452,7 @@ const actions = {
options
options
});
});
ipcRenderer
.
send
(
"
changeWindowSize-rubick
"
,
{
ipcRenderer
.
send
(
"
changeWindowSize-rubick
"
,
{
height
:
getWindowHeight
(
state
.
options
)
height
:
getWindowHeight
(
state
.
options
,
getters
.
dingApp
)
});
});
},
},
async
downloadPlugin
({
commit
},
payload
)
{
async
downloadPlugin
({
commit
},
payload
)
{
...
@@ -510,8 +520,6 @@ const actions = {
...
@@ -510,8 +520,6 @@ const actions = {
if
(
index
!==
-
1
)
{
if
(
index
!==
-
1
)
{
devPlugins
[
index
]
=
pluginConfig
;
devPlugins
[
index
]
=
pluginConfig
;
}
}
console
.
log
(
111
,
devPlugins
);
commit
(
"
commonUpdate
"
,
{
commit
(
"
commonUpdate
"
,
{
devPlugins
:
devPlugins
devPlugins
:
devPlugins
});
});
...
@@ -580,6 +588,7 @@ const actions = {
...
@@ -580,6 +588,7 @@ const actions = {
export
default
{
export
default
{
namespaced
:
true
,
namespaced
:
true
,
state
,
state
,
getters
,
mutations
,
mutations
,
actions
actions
};
};
static/plugins/demo/deep.html
浏览文件 @
f1d3d7e1
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
text-decoration
:
none
;
text-decoration
:
none
;
cursor
:
pointer
;
cursor
:
pointer
;
position
:
relative
;
position
:
relative
;
border-bottom
:
1px
dashed
;
border-bottom
:
1px
dashed
#fc5531
;
padding-bottom
:
2px
;
padding-bottom
:
2px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
color
:
inherit
;
color
:
inherit
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录