1、更新遮罩问题修改

This commit is contained in:
2025-07-04 18:47:30 +08:00
parent 605c73d0fc
commit a61f2bcbad
10 changed files with 125 additions and 90 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 113 KiB

View File

@ -5,6 +5,7 @@
"directories": {
"output": "out"
},
"asar": true,
"files": [
"**/*",
@ -48,7 +49,10 @@
}
]
},
"extraMetadata": {
"buildTimestamp": 0
},
"releaseInfo": {
"releaseNotes":""
"releaseNotes": ""
}
}

View File

@ -1,87 +1,89 @@
'use strict';
"use strict";
const { logger } = require('ee-core/log');
const {windowService} = require("../service/window");
const { logger } = require("ee-core/log");
const { windowService } = require("../service/window");
/**
* SystemController 获取系统基本信息
* @class
*/
class WindowController {
// 添加会话窗口
async addSession(args,event) {
return await windowService.addSession(args,event);
}
// 修改会话信息
async editSession(args,event) {
return await windowService.editSession(args,event);
}
// 启动会话
async startSession(args,event) {
return await windowService.startSession(args,event);
}
// 获取所有会话信息
async getSessions(args,event) {
return await windowService.getSessions(args,event);
}
// 根据分区id查询会话信息
async getSessionByPartitionId(args,event) {
return await windowService.getSessionByPartitionId(args,event);
}
// 设置会话窗口位置
async setWindowLocation(args,event) {
return await windowService.setWindowLocation(args,event);
}
//隐藏会话窗口
async hiddenSession(args,event) {
return await windowService.hiddenSession(args,event);
}
//显示会话窗口
async showSession(args,event) {
return await windowService.showSession(args,event);
}
//关闭会话窗口
async closeSession(args,event) {
return await windowService.closeSession(args,event);
}
//刷新会话
async refreshSession(args,event) {
return await windowService.refreshSession(args,event);
}
//删除会话窗口
async deleteSession(args,event) {
return await windowService.deleteSession(args,event);
}
//获取窗口代理配置信息
async getProxyInfo(args,event) {
return await windowService.getProxyInfo(args,event);
}
//获取全局代理配置信息
async getGlobalProxyInfo(args,event) {
return await windowService.getGlobalProxyInfo(args,event);
}
//修改窗口代理配置信息
async editProxyInfo(args,event) {
return await windowService.editProxyInfo(args,event);
}
//修改全局代理配置信息
async editGlobalProxyInfo(args,event) {
return await windowService.editGlobalProxyInfo(args,event);
}
//关闭全局代理密码验证
async closeGlobalProxyPasswordVerification(args,event) {
return await windowService.closeGlobalProxyPasswordVerification(args,event);
}
//修改窗口代理配置信息(多属性一次性修改)
async saveProxyInfo(args,event) {
return await windowService.saveProxyInfo(args,event);
}
//打开当前会话控制台
async openSessionDevTools(args,event) {
return await windowService.openSessionDevTools(args,event);
}
// 添加会话窗口
async addSession(args, event) {
return await windowService.addSession(args, event);
}
// 修改会话信息
async editSession(args, event) {
return await windowService.editSession(args, event);
}
// 启动会话
async startSession(args, event) {
return await windowService.startSession(args, event);
}
// 获取所有会话信息
async getSessions(args, event) {
return await windowService.getSessions(args, event);
}
// 根据分区id查询会话信息
async getSessionByPartitionId(args, event) {
return await windowService.getSessionByPartitionId(args, event);
}
// 设置会话窗口位置
async setWindowLocation(args, event) {
return await windowService.setWindowLocation(args, event);
}
//隐藏会话窗口
async hiddenSession(args, event) {
return await windowService.hiddenSession(args, event);
}
//显示会话窗口
async showSession(args, event) {
return await windowService.showSession(args, event);
}
//关闭会话窗口
async closeSession(args, event) {
return await windowService.closeSession(args, event);
}
//刷新会话
async refreshSession(args, event) {
return await windowService.refreshSession(args, event);
}
//删除会话窗口
async deleteSession(args, event) {
return await windowService.deleteSession(args, event);
}
//获取窗口代理配置信息
async getProxyInfo(args, event) {
return await windowService.getProxyInfo(args, event);
}
//获取全局代理配置信息
async getGlobalProxyInfo(args, event) {
return await windowService.getGlobalProxyInfo(args, event);
}
//修改窗口代理配置信息
async editProxyInfo(args, event) {
return await windowService.editProxyInfo(args, event);
}
//修改全局代理配置信息
async editGlobalProxyInfo(args, event) {
return await windowService.editGlobalProxyInfo(args, event);
}
//关闭全局代理密码验证
async closeGlobalProxyPasswordVerification(args, event) {
return await windowService.closeGlobalProxyPasswordVerification(
args,
event
);
}
//修改窗口代理配置信息(多属性一次性修改)
async saveProxyInfo(args, event) {
return await windowService.saveProxyInfo(args, event);
}
//打开当前会话控制台
async openSessionDevTools(args, event) {
return await windowService.openSessionDevTools(args, event);
}
}
WindowController.toString = () => '[class WindowController]';
WindowController.toString = () => "[class WindowController]";
module.exports = WindowController;

View File

@ -238,12 +238,12 @@ const initializeTableData = async () => {
enName: "DeepSeek Translate",
otherArgs: `{"apiUrl": "https://api.deepseek.com/api/v1/translate","apiKey": "","secretKey": ""}`,
},
{
name: "youDao",
zhName: "有道翻译",
enName: "Youdao Translate",
otherArgs: `{"apiUrl": "https://openapi.youdao.com/api","appId": "","apiKey": ""}`,
},
// {
// name: "youDao",
// zhName: "有道翻译",
// enName: "Youdao Translate",
// otherArgs: `{"apiUrl": "https://openapi.youdao.com/api","appId": "","apiKey": ""}`,
// },
{
name: "tengXun",
zhName: "腾讯翻译",

View File

@ -257,9 +257,11 @@ class WindowService {
});
return { status: true, message: "操作成功" };
} catch (err) {
logger.error("hiddenSession:", err);
return { status: false, message: `操作失败:${err.message}` };
}
}
async showSession(args, event) {
const { platform, partitionId } = args;
try {

View File

@ -1,5 +1,8 @@
// update.js
const { autoUpdater } = require("electron-updater");
const {
app
} = require("electron");
autoUpdater.autoDownload = false;
autoUpdater.autoInstallOnAppQuit = false;

View File

@ -54,7 +54,7 @@ const winControl = async (action) => {
onMounted(async () => {
const res = await ipc.invoke(ipcApiRoute.getRouteList, {});
if (res.status&& res.data) {
const desiredOrder = ['deepl', 'deepseek', 'tengXun', 'youDao'];
const desiredOrder = ['deepl', 'deepseek', 'tengXun'];
let orderedRoutes = []; // 存储排序后的结果

View File

@ -48,8 +48,9 @@
</template>
<script setup>
import { ref, computed, onMounted } from 'vue';
import { ref, computed, onMounted,watch,defineProps } from 'vue';
import { ipc } from "@/utils/ipcRenderer"
import { ipcApiRoute } from "@/api"
// 更新状态管理
const showUpdateOverlay = ref(false);
@ -120,13 +121,36 @@ const closeError = () => {
currentStage.value = '';
};
// 监听主进程事件
onMounted(() => {
ipc.on('update-available', (event, info) => {
const updateAvailable = async (event, info) => {
await ipc.invoke(ipcApiRoute.hiddenSession, {})
// console.log('updateAvailable', info)
updateInfo.value = info;
currentStage.value = 'update-available';
showUpdateOverlay.value = true;
});
}
// const props=defineProps(['updated'])
// watch(
// () => props.updated, // <--- Watch a getter function that returns the prop's value
// async (newVal, oldVal) => {
// console.log('newVal:', newVal, 'oldVal:', oldVal);
// if (newVal) {
// showUpdateOverlay.value = true;
// await ipc.invoke(ipcApiRoute.hiddenSession, {})
// } else {
// showUpdateOverlay.value = false; // Add logic to hide when updated is false
// }
// },
// { immediate: true } // Optional: Run the watcher immediately on component mount
// );
// 监听主进程事件
onMounted(() => {
ipc.on('update-available',updateAvailable);
ipc.on('download-progress', (event, progressData) => {
progress.value = progressData.percent;