size调整
This commit is contained in:
+38
-21
@@ -1,13 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "soonworkerdisk",
|
"name": "discworker",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"author": "24kycj <1637269896@qq.com>",
|
"author": "24kycj <1637269896@qq.com>",
|
||||||
"description": "Cardsoon SoonWorkerDisk",
|
"description": "KaShu SoonWorkerDisk",
|
||||||
"homepage": "https://www.cardsoon.com/index.php/cn",
|
"homepage": "https://www.cardsoon.com/index.php/cn",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "./dist/electron/main.js",
|
"main": "./dist/electron/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node .electron-vue/build.js && electron-builder --arm64",
|
"build": "node .electron-vue/build.js && electron-builder",
|
||||||
|
"build:linux": "node .electron-vue/build.js && electron-builder --linux",
|
||||||
"build:dir": "node .electron-vue/build.js && electron-builder --dir",
|
"build:dir": "node .electron-vue/build.js && electron-builder --dir",
|
||||||
"build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",
|
"build:clean": "cross-env BUILD_TARGET=clean node .electron-vue/build.js",
|
||||||
"build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js",
|
"build:web": "cross-env BUILD_TARGET=web node .electron-vue/build.js",
|
||||||
@@ -22,31 +23,47 @@
|
|||||||
"postinstall": "npm run lint:fix"
|
"postinstall": "npm run lint:fix"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"productName": "soonworkerD",
|
"productName": "discworker",
|
||||||
"appId": "com.cardsoon.soonworkerD",
|
"appId": "com.kashu.soonworkerdisk",
|
||||||
"extraFiles": [
|
"extraFiles": [
|
||||||
{
|
{
|
||||||
"from": "User Templates",
|
"from": "./User Templates",
|
||||||
"to": "./User Templates"
|
"to": "."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"from": "cardsoonServer",
|
"from": "./cardsoonServer",
|
||||||
"to": "./CardsoonServer"
|
"to": "."
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"linux": {
|
|
||||||
"maintainer": "Jerry Xu <jerry79.xu@gmail.com>",
|
|
||||||
"category": "Utility",
|
|
||||||
"target": [
|
|
||||||
"AppImage",
|
|
||||||
"deb",
|
|
||||||
"rpm"
|
|
||||||
],
|
|
||||||
"icon": "public/images/favicon.svg"
|
|
||||||
},
|
|
||||||
"copyright": "Copyright@2023 cardsoon.com",
|
|
||||||
"directories": {
|
"directories": {
|
||||||
"output": "build"
|
"output": "build"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"dist/electron/**/*"
|
||||||
|
],
|
||||||
|
"dmg": {
|
||||||
|
"contents": [
|
||||||
|
{
|
||||||
|
"x": 410,
|
||||||
|
"y": 150,
|
||||||
|
"type": "link",
|
||||||
|
"path": "/Applications"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"x": 130,
|
||||||
|
"y": 150,
|
||||||
|
"type": "file"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"mac": {
|
||||||
|
"icon": "build/icons/icon.icns"
|
||||||
|
},
|
||||||
|
"win": {
|
||||||
|
"icon": "build/icons/icon.ico"
|
||||||
|
},
|
||||||
|
"linux": {
|
||||||
|
"icon": "build/icons"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -117,4 +134,4 @@
|
|||||||
"webpack-hot-middleware": "^2.22.2",
|
"webpack-hot-middleware": "^2.22.2",
|
||||||
"webpack-merge": "^4.1.3"
|
"webpack-merge": "^4.1.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>soonworkerdisk</title>
|
<title>DiscWorker V1.01</title>
|
||||||
<% if (htmlWebpackPlugin.options.nodeModules) { %>
|
<% if (htmlWebpackPlugin.options.nodeModules) { %>
|
||||||
<!-- Add `node_modules/` to global paths so `require` works properly in development -->
|
<!-- Add `node_modules/` to global paths so `require` works properly in development -->
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
+8
-14
@@ -1,4 +1,4 @@
|
|||||||
import { app, BrowserWindow, Menu, ipcMain } from 'electron'
|
import { app, BrowserWindow, Menu } from 'electron'
|
||||||
import '../renderer/store'
|
import '../renderer/store'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -10,9 +10,11 @@ if (process.env.NODE_ENV !== 'development') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let mainWindow
|
let mainWindow
|
||||||
const winURL = process.env.NODE_ENV === 'development' ? `http://localhost:9080` : `file://${__dirname}/index.html`
|
const winURL = process.env.NODE_ENV === 'development'
|
||||||
|
? `http://localhost:9080`
|
||||||
|
: `file://${__dirname}/index.html`
|
||||||
|
|
||||||
function createWindow() {
|
function createWindow () {
|
||||||
/**
|
/**
|
||||||
* Initial window options
|
* Initial window options
|
||||||
*/
|
*/
|
||||||
@@ -28,19 +30,11 @@ function createWindow() {
|
|||||||
contextIsolation: false
|
contextIsolation: false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
require('@electron/remote/main').initialize()
|
require("@electron/remote/main").initialize();
|
||||||
require('@electron/remote/main').enable(mainWindow.webContents)
|
require("@electron/remote/main").enable(mainWindow.webContents);
|
||||||
// 禁用默认菜单
|
// 禁用默认菜单
|
||||||
// Menu.setApplicationMenu(null);
|
Menu.setApplicationMenu(null);
|
||||||
// mainWindow.maximize()
|
// mainWindow.maximize()
|
||||||
// 设置快捷键
|
|
||||||
const menuTemplate = [{ label: '复制', role: 'copy' }, { label: '粘贴', role: 'paste' }, { type: 'separator' }, { label: '全选', role: 'selectall' }]
|
|
||||||
|
|
||||||
const menu = Menu.buildFromTemplate(menuTemplate)
|
|
||||||
|
|
||||||
ipcMain.on('show-context-menu', () => {
|
|
||||||
menu.popup(BrowserWindow.getFocusedWindow())
|
|
||||||
})
|
|
||||||
mainWindow.show()
|
mainWindow.show()
|
||||||
mainWindow.loadURL(winURL)
|
mainWindow.loadURL(winURL)
|
||||||
mainWindow.on('closed', () => {
|
mainWindow.on('closed', () => {
|
||||||
|
|||||||
@@ -104,41 +104,42 @@ const CDTypes = {
|
|||||||
6: 'BD_TL',
|
6: 'BD_TL',
|
||||||
7: 'BD_QL'
|
7: 'BD_QL'
|
||||||
}
|
}
|
||||||
|
const size = process.platform === 'linux' ? 1000 : 1024
|
||||||
const cd_types = [
|
const cd_types = [
|
||||||
{
|
{
|
||||||
value: 1,
|
value: 1,
|
||||||
label: 'CD 700MB',
|
label: 'CD 700MB',
|
||||||
size: 700 * 1024 * 1024
|
size: 700 * size * size
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 2,
|
value: 2,
|
||||||
label: 'DVD 4.7GB',
|
label: 'DVD 4.7GB',
|
||||||
size: 4.7 * 1024 * 1024 * 1024
|
size: 4.7 * size * size * size
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 3,
|
value: 3,
|
||||||
label: 'DVD_DL 8.5GB',
|
label: 'DVD_DL 8.5GB',
|
||||||
size: 8.5 * 1024 * 1024 * 1024
|
size: 8.5 * size * size * size
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 4,
|
value: 4,
|
||||||
label: 'BD 25GB',
|
label: 'BD 25GB',
|
||||||
size: 25 * 1024 * 1024 * 1024
|
size: 25 * size * size * size
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
label: 'BD_DL 50GB',
|
label: 'BD_DL 50GB',
|
||||||
size: 50 * 1024 * 1024 * 1024
|
size: 50 * size * size * size
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 6,
|
value: 6,
|
||||||
label: 'BD_TL 100GB',
|
label: 'BD_TL 100GB',
|
||||||
size: 100 * 1024 * 1024 * 1024
|
size: 100 * size * size * size
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 7,
|
value: 7,
|
||||||
label: 'BD_QL 128GB',
|
label: 'BD_QL 128GB',
|
||||||
size: 128 * 1024 * 1024 * 1024
|
size: 128 * size * size * size
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -515,6 +515,9 @@ export default {
|
|||||||
this.is_set_cddev = true
|
this.is_set_cddev = true
|
||||||
this.goSet('/manage?type=cddev')
|
this.goSet('/manage?type=cddev')
|
||||||
}
|
}
|
||||||
|
if (this.printer_info.cartridge_flag == 0) {
|
||||||
|
this.$store.commit('chat/setData', { name: 'printer_error', data: { type: 'error', notify: '请检查墨盒错误或墨盒未安装,否则作业将失败。' } })
|
||||||
|
}
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true
|
immediate: true
|
||||||
@@ -879,41 +882,42 @@ export default {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
clearTimeout(outTimer)
|
clearTimeout(outTimer)
|
||||||
that.currentRunVal = 0
|
that.currentRunVal = 0
|
||||||
|
const size = process.platform === 'linux' ? 1000 : 1024
|
||||||
let typeLists = [
|
let typeLists = [
|
||||||
{
|
{
|
||||||
value: 1,
|
value: 1,
|
||||||
label: 'CD 700MB',
|
label: 'CD 700MB',
|
||||||
size: 700 * 1024 * 1024
|
size: 700 * size * size
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 2,
|
value: 2,
|
||||||
label: 'DVD 4.7GB',
|
label: 'DVD 4.7GB',
|
||||||
size: 4.7 * 1024 * 1024 * 1024
|
size: 4.7 * size * size * size
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 3,
|
value: 3,
|
||||||
label: 'DVD_DL 8.5GB',
|
label: 'DVD_DL 8.5GB',
|
||||||
size: 8.5 * 1024 * 1024 * 1024
|
size: 8.5 * size * size * size
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 4,
|
value: 4,
|
||||||
label: 'BD 25GB',
|
label: 'BD 25GB',
|
||||||
size: 25 * 1024 * 1024 * 1024
|
size: 25 * size * size * size
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 5,
|
value: 5,
|
||||||
label: 'BD_DL 50GB',
|
label: 'BD_DL 50GB',
|
||||||
size: 50 * 1024 * 1024 * 1024
|
size: 50 * size * size * size
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 6,
|
value: 6,
|
||||||
label: 'BD_TL 100GB',
|
label: 'BD_TL 100GB',
|
||||||
size: 100 * 1024 * 1024 * 1024
|
size: 100 * size * size * size
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: 7,
|
value: 7,
|
||||||
label: 'BD_QL 128GB',
|
label: 'BD_QL 128GB',
|
||||||
size: 128 * 1024 * 1024 * 1024
|
size: 128 * size * size * size
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
let isBD = that.changeCD.req_info.strong_list.findIndex(item => parseInt(item.strong_type) > 3)
|
let isBD = that.changeCD.req_info.strong_list.findIndex(item => parseInt(item.strong_type) > 3)
|
||||||
@@ -1038,13 +1042,13 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 作业取消
|
// 作业取消
|
||||||
workCancel(e) {
|
workCancel(row) {
|
||||||
that.$store
|
that.$store
|
||||||
.dispatch('chat/websocketsend', {
|
.dispatch('chat/websocketsend', {
|
||||||
req_name: 'cancle_task',
|
req_name: 'cancle_task',
|
||||||
req_type: 1,
|
req_type: 1,
|
||||||
req_info: {
|
req_info: {
|
||||||
task_uuid: that.task_list[e].task_uuid
|
task_uuid: row.task_uuid
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@@ -1052,9 +1056,9 @@ export default {
|
|||||||
message: '取消成功',
|
message: '取消成功',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
})
|
})
|
||||||
that.task_list[e].task_status = 7
|
row.task_status = 7
|
||||||
if (that.task_list[e].ass_task && that.task_list[e].ass_task.length > 0) {
|
if (row.ass_task && row.ass_task.length > 0) {
|
||||||
that.task_list[e].ass_task.forEach((item) => {
|
row.ass_task.forEach((item) => {
|
||||||
item.task_status = 7
|
item.task_status = 7
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user