Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
testMenu
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡芬
testMenu
Commits
1c51b652
提交
1c51b652
authored
4月 10, 2023
作者:
caicai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
显示所有应用
上级
87f609d4
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
56 行增加
和
19 行删除
+56
-19
app.js
src/main/events/app.js
+18
-0
ipc.js
src/main/events/ipc.js
+1
-2
index.js
src/main/index.js
+1
-1
softList.js
src/main/plugins/softList.js
+4
-3
box.vue
src/renderer/components/Appbox/box.vue
+1
-1
one.vue
src/renderer/components/Dockmode/one.vue
+19
-3
main.js
src/renderer/main.js
+2
-0
Home.vue
src/renderer/views/Home.vue
+2
-1
index.vue
src/renderer/views/manage/index.vue
+8
-8
没有找到文件。
src/main/events/app.js
浏览文件 @
1c51b652
...
@@ -6,11 +6,29 @@ class AppEvents {
...
@@ -6,11 +6,29 @@ class AppEvents {
this
.
windowManager
=
appManager
.
windowManager
this
.
windowManager
=
appManager
.
windowManager
app
.
on
(
'activate'
,
()
=>
{
app
.
on
(
'activate'
,
()
=>
{
console
.
log
(
'
\
n app activate!'
,
new
Date
().
getTime
()
)
if
(
this
.
windowManager
.
mainWindow
.
win
===
null
)
{
if
(
this
.
windowManager
.
mainWindow
.
win
===
null
)
{
console
.
log
(
'Main window is null!'
)
console
.
log
(
'Main window is null!'
)
}
}
})
})
app
.
on
(
'browser-window-blur'
,
()
=>
{
console
.
log
(
'
\
n app browser-window-blur!'
,
new
Date
().
getTime
()
)
})
app
.
on
(
'browser-window-focus'
,
()
=>
{
console
.
log
(
'app browser-window-focus!'
,
new
Date
().
getTime
()
)
})
app
.
on
(
'continue-activit'
,
()
=>
{
console
.
log
(
'
\
n app continue-activit!'
,
new
Date
().
getTime
()
)
})
app
.
on
(
'did-become-active'
,
()
=>
{
console
.
log
(
'
\
n app did-become-active!'
,
new
Date
().
getTime
()
)
})
/* 在Electron加载前需要进行初始化
/* 在Electron加载前需要进行初始化
Before electron app is ready, we should initial */
Before electron app is ready, we should initial */
app
.
on
(
'ready'
,
async
()
=>
{
app
.
on
(
'ready'
,
async
()
=>
{
...
...
src/main/events/ipc.js
浏览文件 @
1c51b652
...
@@ -108,7 +108,6 @@ class IpcEvents {
...
@@ -108,7 +108,6 @@ class IpcEvents {
// 获取app列表
// 获取app列表
ipcMain
.
on
(
"getApps"
,
(
e
,
data
)
=>
{
ipcMain
.
on
(
"getApps"
,
(
e
,
data
)
=>
{
let
apps
=
this
.
store
.
get
(
"apps"
);
let
apps
=
this
.
store
.
get
(
"apps"
);
// console.log(apps)
this
.
store
.
set
(
"currentMode"
,
"modeJianYue"
);
this
.
store
.
set
(
"currentMode"
,
"modeJianYue"
);
e
.
sender
.
send
(
"appsList"
,
apps
)
e
.
sender
.
send
(
"appsList"
,
apps
)
})
})
...
@@ -140,7 +139,7 @@ class IpcEvents {
...
@@ -140,7 +139,7 @@ class IpcEvents {
this
.
store
.
set
(
"apps"
,
apps
);
this
.
store
.
set
(
"apps"
,
apps
);
e
.
sender
.
send
(
"base64Info"
,
{
url
:
src
,
index
});
e
.
sender
.
send
(
"base64Info"
,
{
url
:
src
,
index
});
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
error
)
}
}
})
})
...
...
src/main/index.js
浏览文件 @
1c51b652
...
@@ -11,7 +11,7 @@ import { protocol } from 'electron'
...
@@ -11,7 +11,7 @@ import { protocol } from 'electron'
//热加载
//热加载
try
{
try
{
require
(
'electron-reloader'
)(
module
);
//
require('electron-reloader')(module);
}
catch
{}
}
catch
{}
// Scheme must be registered before the app is ready
// Scheme must be registered before the app is ready
...
...
src/main/plugins/softList.js
浏览文件 @
1c51b652
...
@@ -40,7 +40,7 @@ class SoftList {
...
@@ -40,7 +40,7 @@ class SoftList {
const
iconPaths
=
stdout
.
toString
().
split
(
'
\
n'
).
filter
(
path
=>
path
&&
path
.
trim
()
!==
''
);
const
iconPaths
=
stdout
.
toString
().
split
(
'
\
n'
).
filter
(
path
=>
path
&&
path
.
trim
()
!==
''
);
return
iconPaths
;
return
iconPaths
;
}
catch
(
error
)
{
}
catch
(
error
)
{
//
console.error(`命令执行失败: ${error}`);
console
.
error
(
`命令执行失败:
${
error
}
`
);
return
null
;
return
null
;
}
}
}
}
...
@@ -50,6 +50,7 @@ class SoftList {
...
@@ -50,6 +50,7 @@ class SoftList {
let
locolorIcon
=
''
;
let
locolorIcon
=
''
;
let
hiMax
=
0
;
let
hiMax
=
0
;
let
loMax
=
0
;
let
loMax
=
0
;
if
(
!
iconList
)
return
icon
;
iconList
.
forEach
(
v
=>
{
iconList
.
forEach
(
v
=>
{
if
(
v
&&
typeof
v
==
'string'
&&
v
.
indexOf
(
'/hicolor/'
)
>
0
)
{
if
(
v
&&
typeof
v
==
'string'
&&
v
.
indexOf
(
'/hicolor/'
)
>
0
)
{
let
str
=
v
.
replace
(
'/usr/share/icons/hicolor/'
,
''
)
let
str
=
v
.
replace
(
'/usr/share/icons/hicolor/'
,
''
)
...
@@ -150,7 +151,7 @@ class SoftList {
...
@@ -150,7 +151,7 @@ class SoftList {
this
.
store
.
set
(
'apps'
,
newApps
);
this
.
store
.
set
(
'apps'
,
newApps
);
this
.
mainWindow
.
win
.
webContents
.
send
(
"appsList"
,
newApps
);
this
.
mainWindow
.
win
.
webContents
.
send
(
"appsList"
,
newApps
);
}
catch
(
error
)
{
}
catch
(
error
)
{
//
console.error(error)
console
.
error
(
error
)
}
}
});
});
}
}
...
@@ -283,7 +284,7 @@ class SoftList {
...
@@ -283,7 +284,7 @@ class SoftList {
src
=
`data:image/png;base64,
${
imageBase64
}
`
;
src
=
`data:image/png;base64,
${
imageBase64
}
`
;
src
=
src
.
replace
(
/
[\r\n]
/g
,
''
);
src
=
src
.
replace
(
/
[\r\n]
/g
,
''
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
error
)
}
}
return
src
;
return
src
;
}
}
...
...
src/renderer/components/Appbox/box.vue
浏览文件 @
1c51b652
...
@@ -15,7 +15,7 @@ export default {
...
@@ -15,7 +15,7 @@ export default {
display: flex;
display: flex;
flex-wrap: wrap;
flex-wrap: wrap;
margin-top: 24px;
margin-top: 24px;
padding: 30px
4
0px 18px;
padding: 30px
2
0px 18px;
background: linear-gradient(180deg, #FFFFFF 0%, rgba(255,255,255,0.5) 100%);
background: linear-gradient(180deg, #FFFFFF 0%, rgba(255,255,255,0.5) 100%);
box-shadow: 0px 4px 4px 0px rgba(10,78,141,0.1);
box-shadow: 0px 4px 4px 0px rgba(10,78,141,0.1);
border-radius: 20px 20px 20px 20px;
border-radius: 20px 20px 20px 20px;
...
...
src/renderer/components/Dockmode/one.vue
浏览文件 @
1c51b652
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
:data-appname=
"appItem.name"
:data-appname=
"appItem.name"
class=
"app_item"
class=
"app_item"
@
click=
"tapApp(appItem)"
>
@
click=
"tapApp(appItem)"
>
<img
:src=
"appItem.icon"
alt=
""
class=
"img"
v-if=
"appItem.icon && appItem.icon.indexOf('.png') == -1"
>
<img
:src=
"appItem.icon"
alt=
""
class=
"img"
v-if=
"appItem.icon && appItem.icon.indexOf('.png') == -1"
>
<span
class=
"app_name"
>
{{
appItem
.
name
}}
</span>
<span
class=
"app_name"
>
{{
appItem
.
name
}}
</span>
</div>
</div>
</div>
</div>
<div
v-if=
"mode === 'modeJianYue'"
class=
"group1_wrap"
>
<div
v-if=
"mode === 'modeJianYue'"
class=
"group1_wrap"
>
...
@@ -149,6 +149,7 @@ export default {
...
@@ -149,6 +149,7 @@ export default {
}
}
}
}
.app_item {
.app_item {
position: relative;
margin: 0 4px;
margin: 0 4px;
flex-shrink: 0;
flex-shrink: 0;
width: 36px;
width: 36px;
...
@@ -159,10 +160,15 @@ export default {
...
@@ -159,10 +160,15 @@ export default {
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
font-size: 10px;
font-size: 10px;
overflow: hidden;
//
overflow: hidden;
text-align: left;
text-align: left;
cursor: pointer;
cursor: pointer;
flex-wrap: wrap;
flex-wrap: wrap;
&:hover {
.app_name {
display: block;
}
}
}
}
.img {
.img {
flex-shrink: 0;
flex-shrink: 0;
...
@@ -170,8 +176,18 @@ export default {
...
@@ -170,8 +176,18 @@ export default {
// width: 36px;
// width: 36px;
}
}
.app_name {
.app_name {
display: none;
position: absolute;
top: -10px;
left: -20px;
border-radius: 4px;
padding:4px;
width: max-content;
background-color: #333;
word-break: normal;
font-size: 14px;
font-size: 14px;
color: #fff;
color: #fff;
z-index: 99;
}
}
.yun_img {
.yun_img {
width: 58px;
width: 58px;
...
...
src/renderer/main.js
浏览文件 @
1c51b652
...
@@ -42,6 +42,7 @@ import {
...
@@ -42,6 +42,7 @@ import {
Tabs
,
Tabs
,
TabPane
,
TabPane
,
Tree
,
Tree
,
Tooltip
,
Upload
,
Upload
,
Dialog
,
Dialog
,
Breadcrumb
,
Breadcrumb
,
...
@@ -76,6 +77,7 @@ Vue.use(RouterTab);
...
@@ -76,6 +77,7 @@ Vue.use(RouterTab);
Vue
.
use
(
ace
);
Vue
.
use
(
ace
);
Vue
.
use
(
componentsInstall
)
Vue
.
use
(
componentsInstall
)
Vue
.
use
(
Tooltip
);
Vue
.
use
(
Button
);
Vue
.
use
(
Button
);
Vue
.
use
(
Col
);
Vue
.
use
(
Col
);
Vue
.
use
(
Drawer
);
Vue
.
use
(
Drawer
);
...
...
src/renderer/views/Home.vue
浏览文件 @
1c51b652
...
@@ -178,6 +178,7 @@ export default {
...
@@ -178,6 +178,7 @@ export default {
this
.
appList
.
forEach
((
item
,
index
)
=>
{
this
.
appList
.
forEach
((
item
,
index
)
=>
{
// console.log(item.icon)
// console.log(item.icon)
if
(
item
.
icon
&&
item
.
icon
.
indexOf
(
"data:image/png"
)
==
-
1
)
{
if
(
item
.
icon
&&
item
.
icon
.
indexOf
(
"data:image/png"
)
==
-
1
)
{
// console.log('getBase64', index)
this
.
ipcRenderer
.
send
(
"getBase64"
,
{
imagePath
:
item
.
icon
,
index
});
this
.
ipcRenderer
.
send
(
"getBase64"
,
{
imagePath
:
item
.
icon
,
index
});
}
}
});
});
...
@@ -186,7 +187,7 @@ export default {
...
@@ -186,7 +187,7 @@ export default {
this
.
ipcRenderer
.
on
(
"appsList_update"
,
(
event
,
list
)
=>
{
this
.
ipcRenderer
.
on
(
"appsList_update"
,
(
event
,
list
)
=>
{
console
.
log
(
"刷新app列表"
,
list
);
console
.
log
(
"刷新app列表"
,
list
);
//
this.appList = list;
this
.
appList
=
list
;
// this.getPinyin();
// this.getPinyin();
});
});
...
...
src/renderer/views/manage/index.vue
浏览文件 @
1c51b652
...
@@ -71,21 +71,21 @@ export default {
...
@@ -71,21 +71,21 @@ export default {
methods
:
{
methods
:
{
getAppList
()
{
getAppList
()
{
//获取app列表
//获取app列表
console
.
log
(
'getAppList'
)
console
.
log
(
'getAppList
2
'
)
this
.
ipcRenderer
.
send
(
"getApps"
);
this
.
ipcRenderer
.
send
(
"getApps"
);
},
},
ipcOn
()
{
ipcOn
()
{
// 获取到app列表
// 获取到app列表
this
.
ipcRenderer
.
on
(
"appsList"
,
(
event
,
list
)
=>
{
this
.
ipcRenderer
.
on
(
"appsList"
,
(
event
,
list
)
=>
{
console
.
log
(
"获取到app列表"
,
list
);
console
.
log
(
"获取到app列表
2
"
,
list
);
this
.
listObj
.
lastest
=
list
;
this
.
listObj
.
lastest
=
list
;
this
.
appList
=
list
;
this
.
appList
=
list
;
this
.
appList
.
forEach
((
item
,
index
)
=>
{
//
this.appList.forEach((item, index) => {
// console.log(item.icon)
//
// console.log(item.icon)
if
(
item
.
icon
&&
item
.
icon
.
indexOf
(
"data:image/png"
)
==
-
1
)
{
//
if (item.icon && item.icon.indexOf("data:image/png") == -1) {
this
.
ipcRenderer
.
send
(
"getBase64"
,
{
imagePath
:
item
.
icon
,
index
});
//
this.ipcRenderer.send("getBase64", { imagePath: item.icon, index });
}
//
}
});
//
});
// this.getPinyin();
// this.getPinyin();
});
});
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论