提交 aa4a66cc authored 作者: caicai's avatar caicai

1

上级 4aeaecd6
......@@ -85,9 +85,6 @@ npm run electron:generate-icons
2. package.json
`
修改版本号:package.json里=》"version": "1.0.0"
feidao_latest.exe -》 表示当前最新
feidao_v1.0.0.exe =》 表示第几版本
上传到oss: /resources/application/windows/feidao_latest.exe
`
3. 打包window版时,有签名配置的情况下,如果报错:Error: spawn EPERM,
......@@ -97,8 +94,8 @@ npm run electron:generate-icons
#### package.json
`
"homepage": "https://feidao-tools.oss-cn-shenzhen.aliyuncs.com/resources/application/linux",
"author": "Guangzhou Zaofu Technology Co., Ltd. <service@fei-dao.com> (https://www.fei-dao.com/)",
"homepage": "https://XXXX/linux",
"author": "GXXXX XXXX Co., Ltd. <service@XXXX.com> (https://XXXX.com/)",
`
#### vue.config.js
......@@ -107,7 +104,7 @@ npm run electron:generate-icons
"icon": './build/icons',
"category":"Education",
desktop:{
icon: 'feidao'
icon: 'menudock'
},
"target": [
"AppImage",
......
build/icons/1024x1024.png

89.6 KB | W: | H:

build/icons/1024x1024.png

75.8 KB | W: | H:

build/icons/1024x1024.png
build/icons/1024x1024.png
build/icons/1024x1024.png
build/icons/1024x1024.png
  • 2-up
  • Swipe
  • Onion skin
build/icons/128x128.png

4.6 KB | W: | H:

build/icons/128x128.png

6.8 KB | W: | H:

build/icons/128x128.png
build/icons/128x128.png
build/icons/128x128.png
build/icons/128x128.png
  • 2-up
  • Swipe
  • Onion skin
build/icons/16x16.png

514 Bytes | W: | H:

build/icons/16x16.png

651 Bytes | W: | H:

build/icons/16x16.png
build/icons/16x16.png
build/icons/16x16.png
build/icons/16x16.png
  • 2-up
  • Swipe
  • Onion skin
build/icons/24x24.png

878 Bytes | W: | H:

build/icons/24x24.png

1.0 KB | W: | H:

build/icons/24x24.png
build/icons/24x24.png
build/icons/24x24.png
build/icons/24x24.png
  • 2-up
  • Swipe
  • Onion skin
build/icons/256x256.png

9.5 KB | W: | H:

build/icons/256x256.png

14.4 KB | W: | H:

build/icons/256x256.png
build/icons/256x256.png
build/icons/256x256.png
build/icons/256x256.png
  • 2-up
  • Swipe
  • Onion skin
build/icons/32x32.png

1.1 KB | W: | H:

build/icons/32x32.png

1.5 KB | W: | H:

build/icons/32x32.png
build/icons/32x32.png
build/icons/32x32.png
build/icons/32x32.png
  • 2-up
  • Swipe
  • Onion skin
build/icons/48x48.png

1.8 KB | W: | H:

build/icons/48x48.png

2.3 KB | W: | H:

build/icons/48x48.png
build/icons/48x48.png
build/icons/48x48.png
build/icons/48x48.png
  • 2-up
  • Swipe
  • Onion skin
build/icons/512x512.png

19.5 KB | W: | H:

build/icons/512x512.png

32.0 KB | W: | H:

build/icons/512x512.png
build/icons/512x512.png
build/icons/512x512.png
build/icons/512x512.png
  • 2-up
  • Swipe
  • Onion skin
build/icons/64x64.png

2.3 KB | W: | H:

build/icons/64x64.png

3.2 KB | W: | H:

build/icons/64x64.png
build/icons/64x64.png
build/icons/64x64.png
build/icons/64x64.png
  • 2-up
  • Swipe
  • Onion skin
No preview for this file type
build/icons/icon.ico

352.6 KB | W: | H:

build/icons/icon.ico

352.6 KB | W: | H:

build/icons/icon.ico
build/icons/icon.ico
build/icons/icon.ico
build/icons/icon.ico
  • 2-up
  • Swipe
  • Onion skin
......@@ -6,7 +6,7 @@
"homepage": "/",
"author": "Guangzhou Menu Technology Co., Ltd. <service@sei-tpo.com> (https://www.zei-dao.com/)",
"scripts": {
"serve": "vue-cli-service serve --mode web --enable-transparent-visuals --disable-gpu",
"serve": "vue-cli-service serve --mode web --enable-transparent-visuals",
"build": "vue-cli-service build",
"build:web": "vue-cli-service build --mode web",
"test:unit": "vue-cli-service test:unit",
......
public/app.ico

12.8 KB | W: | H:

public/app.ico

352.6 KB | W: | H:

public/app.ico
public/app.ico
public/app.ico
public/app.ico
  • 2-up
  • Swipe
  • Onion skin
public/favicon.ico

1.4 KB | W: | H:

public/favicon.ico

352.6 KB | W: | H:

public/favicon.ico
public/favicon.ico
public/favicon.ico
public/favicon.ico
  • 2-up
  • Swipe
  • Onion skin
......@@ -8,7 +8,7 @@
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<body style="background-color:rgba(255,255,255,0);">
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
......
public/logo.png

4.1 KB | W: | H:

public/logo.png

3.2 KB | W: | H:

public/logo.png
public/logo.png
public/logo.png
public/logo.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -4,6 +4,7 @@ const fs = require('fs');
const { exec, execSync } = require('child_process');
import SoftList from '../plugins/softList';
import categoryPlugin from '../plugins/category';
import softListPlugin from '../plugins/softList';
class IpcEvents {
create (appManager) {
......@@ -13,6 +14,7 @@ class IpcEvents {
this.store = this.windowManager.mainWindow.store;
this.softList = new SoftList(this.windowManager.mainWindow)
this.categoryPlugin = new categoryPlugin(this.windowManager.mainWindow)
this.softListPlugin = new softListPlugin(this.windowManager.mainWindow)
/* 翻译器函数
Translator function */
......@@ -99,15 +101,15 @@ class IpcEvents {
this.windowManager.mainWindow.win.setBounds({
// x: ( Number(displayWH.width) - 419)/2,
x:0,
y: ( Number(displayWH.height) - 100),
width: 1074,
height: 100
y: ( Number(displayWH.height) - 74),
width: displayWH.width,
height: 74
}, true);
this.store.set("currentMode", "modeUXue");
}
}
]
template = template.filter(v => v.str != currentMode)
// template = template.filter(v => v.str != currentMode)
const menu = Menu.buildFromTemplate(template)
menu.popup(BrowserWindow.fromWebContents(event.sender))
});
......@@ -120,7 +122,7 @@ class IpcEvents {
// 获取app列表
ipcMain.on("getApps", (e, data) => {
let apps = this.store.get("apps");
let apps = this.store.get("apps8");
this.store.set("currentMode", "modeJianYue");
e.sender.send("appsList", apps)
})
......@@ -146,10 +148,10 @@ class IpcEvents {
}else if(imagePath && imagePath.indexOf('.svg') > 0) {
src = this.softList.svgToBase64(imagePath);
}
let apps = this.store.get("apps");
let apps = this.store.get("apps8");
apps[index].icon = src || imagePath;
this.store.set("apps", apps);
this.store.set("apps8", apps);
e.sender.send("base64Info", {url:src,index});
} catch (error) {
console.error(error)
......@@ -158,7 +160,7 @@ class IpcEvents {
// 移动app列表
ipcMain.on("moveSoft", (e, {appname, addFiles})=>{
let appList = this.store.get("apps");
let appList = this.store.get("apps8");
let addFile = addFiles[0]; //某个拖拽文件
let targetIndex = appList.findIndex(v => v.name == appname);
let resIndex = appList.findIndex(v => v.name == addFile.shortName);
......@@ -188,7 +190,7 @@ class IpcEvents {
}
// 刷新渲染进程app列表
e.sender.send('appsList_update', appList);
this.store.set("apps", appList);
this.store.set("apps8", appList);
}
})
......@@ -338,6 +340,11 @@ class IpcEvents {
let { cate,soft } = data;
this.categoryPlugin.removeSoft({cate,soft, sender:e.sender})
})
ipcMain.on("getAppListOfMain", (e, data) => {
// 获取app列表
this.softListPlugin.getList({sender:e.sender});
})
}
}
......
......@@ -6,7 +6,7 @@ class category {
// 重置列表
resetList() {
this.store.set('category',[
this.store.set("categorys6",[
{
name:'备课资源',
id:'bk001',
......@@ -34,7 +34,7 @@ class category {
getList () {
// console.log('获取分类列表')
this.mainWindow.win.webContents.send('getMsg', '获取分类列表-mainprocess')
let categoryList = this.store.get('category');
let categoryList = this.store.get("categorys6");
// this.mainWindow.win.webContents.send("categoryList", categoryList);
return categoryList;
}
......@@ -42,7 +42,7 @@ class category {
/* 新增分类 */
addCategory({name, sender}) {
if(name == undefined) return;
let categoryList = this.store.get('category');
let categoryList = this.store.get("categorys6");
name = name.trim();
let hasIn = categoryList.findIndex(v => v.name == name);
if(hasIn != -1) return;
......@@ -53,14 +53,14 @@ class category {
softIds:[]
};
categoryList.unshift(category);
this.store.set('category', categoryList);
this.store.set("categorys6", categoryList);
sender.send("add-category", category);
this.mainWindow.win.webContents.send("add-category", category);
}
// 获取分类详情
getCategory(id) {
let categoryList = this.store.get('category');
let categoryList = this.store.get("categorys6");
let hasIn = categoryList.findIndex(v => v.id == id);
if(hasIn == -1) return null;
return categoryList[hasIn]
......@@ -68,42 +68,42 @@ class category {
/* 更新分类列表 */
updateCategory({id, detail, sender}) {
let categoryList = this.store.get('category');
let categoryList = this.store.get("categorys6");
let hasIn = categoryList.findIndex(v => v.id == id);
// console.log('hasIn', hasIn)
if(hasIn == -1) return null;
categoryList[hasIn] = detail;
this.store.set('category', categoryList);
this.store.set("categorys6", categoryList);
sender.send('change-category',{detail,id});
this.mainWindow.main.webContents.send("category-list", categoryList);
}
// 更新分类下的软件列表
updateSoftList({id, detail, sender}) {
let categoryList = this.store.get('category');
let categoryList = this.store.get("categorys6");
let hasIn = categoryList.findIndex(v => v.id == id);
// console.log('hasIn', hasIn)
if(hasIn == -1) return null;
categoryList[hasIn] = detail;
this.store.set('category', categoryList);
this.store.set("categorys6", categoryList);
sender.send('remove-soft',{detail,id});
this.mainWindow.main.webContents.send("category-list", categoryList);
}
/* 修改分类名称 */
updateName({name, detail, sender}) {
let categoryList = this.store.get('category');
let categoryList = this.store.get("categorys6");
let id = detail.id;
let hasIn = categoryList.findIndex(v => v.id == id);
// console.log('hasIn-updateName', hasIn)
if(hasIn == -1) return null;
categoryList[hasIn].name = name;
this.store.set('category', categoryList);
this.store.set("categorys6", categoryList);
sender.send('update-category-name',{detail,id,name});
}
......@@ -145,7 +145,7 @@ class category {
}
getSoftDetail(softId) {
let appList = this.store.get('apps');
let appList = this.store.get("apps8");
let targetIndex = appList.findIndex(v => v.id == softId);
if(targetIndex==-1) return null;
return appList[targetIndex];
......
......@@ -9,21 +9,21 @@ class SoftList {
}
/* 获取app列表 */
getList () {
// console.log('获取app列表')
getList ({sender} = {}) {
this.mainWindow.win.webContents.send('getMsg', '获取app列表-mainprocess')
let appsList = this.store.get('apps');
let appsList = this.store.get("apps8");
if(appsList && appsList.length > 0) {
// 已有app列表
// console.log('apps-length', appsList.length)
this.mainWindow.win.webContents.send("appsList", appsList);
sender && sender.send("appsList", appsList);
return;
}
if (process.platform === 'linux') {
// 当前是Linux平台
console.log('当前是Linux平台')
this.mainWindow.win.webContents.send('getMsg', '当前是Linux平台')
this.getLinuxList();
this.getLinuxList({sender});
} else if (process.platform === 'darwin') {
// 当前是macOS平台
console.log('当前是macOS平台')
......@@ -126,7 +126,7 @@ class SoftList {
return icon;
}
/* 获取linux 快捷方式 列表 */
getLinuxList() {
getLinuxList({sender}) {
exec('ls /usr/share/applications/*.desktop', (error, stdout, stderr) => {
if (error) {
// console.error(`exec error: ${error}`);
......@@ -221,8 +221,10 @@ class SoftList {
searchIcon:true,
};
})
this.store.set('apps', newApps);
// this.mainWindow.win.webContents.send("appsList", newApps);
this.store.set("apps8", newApps);
this.mainWindow.win.webContents.send("appsList", newApps);
console.log('sender',sender)
if(sender && sender.send) sender.send("appsList", newApps);
} catch (error) {
console.error(error)
}
......@@ -278,7 +280,7 @@ class SoftList {
};
});
let newarr = apps.filter(v => !!v.name)
this.store.set('apps', newarr);
this.store.set("apps8", newarr);
this.mainWindow.win.webContents.send("appsList", newarr)
});
}
......@@ -335,12 +337,12 @@ class SoftList {
}
updatePath({index, path, name}) {
let appsList = this.store.get('apps');
let appsList = this.store.get("apps8");
let currentApp = appsList[index];
if(currentApp && currentApp.name == name) {
appsList[index].icon = path;
appsList[index].searchIcon = true;
this.store.set('apps', appsList);
this.store.set("apps8", appsList);
}
}
......
......@@ -7,9 +7,9 @@ import SoftList from '../plugins/softList';
const store = new Store({
defaults: {
apps: [], //app列表
"apps8": [], //app列表
//分类
category: [
"categorys6": [
{
name:'备课资源',
id:'bk001',
......@@ -34,7 +34,7 @@ const store = new Store({
},
});
store.clear(); //清空
// store.clear(); //清空
export const windowsCfg = {
id: '', //唯一id
......@@ -44,7 +44,7 @@ export const windowsCfg = {
minWidth: '', //最小宽度
minHeight: '', //最小高度
route: '', // 页面路由URL '/manage?id=123'
resizable: true, //是否支持调整窗口大小
resizable: false, //是否支持调整窗口大小
maximize: false, //是否最大化
data: null, //数据
isMultiWindow: false, //是否支持多开窗口 (如果为false,当窗体存在,再次创建不会新建一个窗体 只focus显示即可,,如果为true,即使窗体存在,也可以新建一个)
......@@ -101,11 +101,11 @@ class MainWindow {
height: wh[1],
// autoHideMenuBar: true,
// titleBarStyle: "hidden",
// backgroundColor: '#00000000', //透明颜色
// backgroundColor: '#1affff1a', //透明颜色
// transparent: true,
resizable: true,
minimizable: true,
maximizable: true,
resizable: false,
minimizable: false,
maximizable: false,
frame: false,
show: false,
fullscreen:false,
......@@ -167,6 +167,7 @@ class MainWindow {
if(args.minHeight) opt.minHeight = args.minHeight;
if(args.x != undefined) opt.x = args.x;
if(args.y != undefined) opt.y = args.y;
if(args.backgroundColor != undefined) opt.backgroundColor = args.backgroundColor;
if(args.isMainWin) {
// opt.transparent = true;
// opt.backgroundColor = '#10000000'
......@@ -289,8 +290,8 @@ class MainWindow {
this.setAboutPanel()
// 监听事件
this.listen()
// 读取Linux系统中已经安装的软件
// 不预先读取
if(args.isMainWin) this.softList.getList();
}
......
......@@ -18,6 +18,6 @@ export default {
padding: 30px 20px 18px;
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);
border-radius: 20px 20px 20px 20px;
border-radius: 20px;
}
</style>
\ No newline at end of file
......@@ -43,15 +43,22 @@ export default {
cursor: pointer;
flex-shrink: 0;
margin-right: 15px;
// margin-right: 8px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
padding-top: 10px;
// padding-bottom: 10px;
box-sizing: border-box;
// max-width: 110px;
width: 110px;
height: 110px;
border-radius: 12px 12px 12px 12px;
// width: calc(33.3% - 6px);
&:nth-child(3n) {
margin-right: 0;
}
&:hover {
background: rgba(57, 157, 249, 0.1);
}
......
......@@ -77,7 +77,8 @@ export default {
computed: {
fourList() {
if(!this.groupList) return [];
let hasSoft = this.groupList.filter(v => v.softList && v.softList.length > 0);
// let hasSoft = this.groupList.filter(v => v.softList && v.softList.length > 0);
let hasSoft = this.groupList;
if(hasSoft.length < 4 && hasSoft.length > 0) {
hasSoft = hasSoft.concat( new Array( 4 - hasSoft.length).fill({}) )
......@@ -133,7 +134,7 @@ export default {
position: relative;
display: flex;
align-items: center;
height: 100px;
height: 72px;
flex-shrink: 0;
padding: 0 20px 0 6px;
width: 240px;
......@@ -164,66 +165,91 @@ export default {
display: flex;
flex-direction: column;
justify-content: center;
height: 98px;
height: 72px;
margin-left: 40px;
background-size: 100%;
background-size: contain;
// background-size: 100%;
background-position: center;
background-repeat: no-repeat;
width: 710px;
// background-image: url(~@/assets/bgc/3.png);
&.active_1 {
background-image: url(~@/assets/U_1.png);
}
&.active_2 {
background-image: url(~@/assets/U_2.png);
}
&.active_3 {
background-image: url(~@/assets/U_3.png);
}
&.active_4 {
background-image: url(~@/assets/U_4.png);
}
// background-image: url(~@/assets/U_1.png);
// background-image: url(~@/assets/bgc/2.png);
}
// &.active_2 {
// // background-image: url(~@/assets/U_2.png);
// background-image: url(~@/assets/U_2.png);
// }
// &.active_3 {
// // background-image: url(~@/assets/U_3.png);
// background-image: url(~@/assets/U_3.png);
// }
// &.active_4 {
// // background-image: url(~@/assets/U_4.png);
// background-image: url(~@/assets/U_4.png);
// }
// background: linear-gradient(180deg, rgba(255,255,255,0) 45%, rgba(255,255,255,0.01) 55%, rgba(255,255,255,0) 100%);
}
.tab_group {
display: flex;
align-items: center;
height: 40px;
padding: 0 60px 0 30px;
height: 30px;
// padding: 0 90px 0 80px;
padding: 0 50px;
text-align: center;
background-image: url(~@/assets/bgc/1.png);
background-repeat: no-repeat;
background-size: contain;
background-position:40px -5px;
}
.tab_item {
display: flex;
align-items: center;
justify-content: center;
padding-top: 6px;
width: 176px;
// padding-top: 6px;
// width: 176px;
// width: 132px;
flex: 1;
// border: 1px solid red;
cursor: pointer;
line-height: 1;
height: 100%;
background-image: url(~@/assets/bgc/3.png);
background-size: auto 52px;
background-position: -50px ;
background-repeat: repeat;
&.disable {
cursor: auto;
pointer-events: none;
}
&:nth-child(2) {
margin-left: 20px;
}
&:nth-child(3) {
margin-left: 10px;
}
// &:nth-child(2) {
// margin-left: 20px;
// }
// &:nth-child(3) {
// margin-left: 10px;
// }
.icon_size {
font-size: 24px;
font-size: 20px;
}
.tab_name {
padding-left: 8px;
font-size: 16px;
font-size: 12px;
font-weight: 500;
color: #A6B3CA;
}
&.active {
background-image: url(~@/assets/bgc/2.png);
background-position: bottom;
background-size: auto 48px;
background-repeat: no-repeat;
.tab_name {
font-size: 18px;
font-size: 14px;
color: #FFFFFF;
}
.icon_size {
font-size: 26px;
font-size: 22px;
}
}
}
......
......@@ -56,7 +56,7 @@ export default {
setTimeout(() => {
// 提前创建,后续显示
this.createAppWin();
}, 10000);
}, 100);
});
},
methods: {
......@@ -78,15 +78,14 @@ export default {
this.ipcRenderer.send("window-new", {
title: "管理页面",
route: "/manage",
// width: width * 0.6,
width: 1200,
height: height * 0.7,
// backgroundColor: "#f9f9f9",
resizable: true,
// width: 600,
height: 700,
backgroundColor: "#DBE4F6",
resizable: false,
modal: false,
// x: mainX,
x: 0,
y: mainY - height * 0.7,
y: mainY - 700 -6,
webType:'appManage',
visible: 'hide'
});
......@@ -321,7 +320,7 @@ export default {
// background: #fff;
&.uMode {
height: 100px;
height: 74px;
}
// img {
// width: 50px;
......
......@@ -116,8 +116,12 @@ export default {
setTimeout(() => {
this.getAppList();
this.getCategoryList();
}, 10)
}, 100)
// this.$nextTick(() => {
// setTimeout(() => {
// this.ipcRenderer.send("getAppListOfMain");
// },1000);
// });
},
methods: {
toggleExpand() {
......
......@@ -79,7 +79,7 @@ module.exports = {
"icon": './build/icons',
"category":"Education",
desktop:{
icon: 'feidao'
icon: 'menudock'
},
"target": [
"AppImage",
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论