fix:UI优化

This commit is contained in:
ASLant committed 2025-11-12 15:26:15 +08:00
1 parent 5cecba8f09
commit 006af729fd
3 files changed
+26 -6

No files matched your search

+6 -5
View File
@@ -1,6 +1,6 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "UPX GUI",
"productName": "UPX加壳脱壳",
"version": "1.0.0",
"identifier": "top.aslant.upxgui",
"build": {
@@ -13,7 +13,7 @@
"windows": [
{
"label": "main",
"title": "UPX GUI",
"title": "UPX加壳脱壳",
"width": 1000,
"height": 800,
"minWidth": 900,
@@ -45,7 +45,8 @@
"core:window:allow-show",
"dialog:allow-open",
"dialog:allow-save",
"shell:allow-execute"
"shell:allow-execute",
"shell:allow-open"
]
}
]
@@ -80,8 +81,8 @@
"headerImage": null
}
},
"shortDescription": "UPX 可视化工具",
"longDescription": "一个基于 Tauri 的 UPX 可视化加壳脱壳工具,支持文件压缩和解压",
"shortDescription": "UPX加壳脱壳GUI",
"longDescription": "基于 Tauri2.0 的 UPX 可视化加壳脱壳工具,支持文件压缩和解压",
"copyright": "Copyright © 2025",
"license": "MIT",
"category": "Utility"
+1 -1
View File
@@ -12,7 +12,7 @@
<div id="titlebar" class="h-10 bg-white border-b border-gray-200 flex items-center justify-between px-4">
<div data-tauri-drag-region class="flex items-center space-x-3 flex-1 h-full">
<div class="w-2 h-2 rounded-full bg-blue-500 breathing-light"></div>
<span class="text-gray-700 text-xs font-medium select-none">UPX 可视化工具</span>
<span id="app-title" class="text-gray-700 text-xs font-medium select-none cursor-pointer hover:text-blue-600 transition-colors" title="访问 GitHub 仓库">UPX-加壳脱壳</span>
<span id="upx-version" class="text-gray-400 text-xs select-none"></span>
</div>
<div class="flex items-center space-x-1">
+19
View File
@@ -22,6 +22,7 @@ const settingsModal = document.getElementById('settings-modal');
const settingsBtn = document.getElementById('settings-btn');
const closeSettingsBtn = document.getElementById('close-settings');
const refreshIconBtn = document.getElementById('refresh-icon-btn');
const appTitle = document.getElementById('app-title');
// 窗口控制按钮
const minimizeBtn = document.getElementById('titlebar-minimize');
@@ -33,6 +34,7 @@ document.addEventListener('DOMContentLoaded', async () => {
initWindowControls();
initOperationButtons();
initCompressionLevelSlider();
initTitleClick();
preventRefresh();
await setupDragAndDrop();
@@ -95,6 +97,23 @@ function initWindowControls() {
});
}
// 标题点击事件
function initTitleClick() {
appTitle.addEventListener('click', async (e) => {
// 阻止事件冒泡,避免触发拖动
e.stopPropagation();
try {
// 使用 Tauri 的 shell 插件打开 URL
const { open } = window.__TAURI__.shell;
await open('https://github.com/Y-ASLant/UPX-GUI');
addLog('已在浏览器中打开 GitHub 仓库', 'info');
} catch (error) {
addLog(`打开链接失败: ${error}`, 'error');
}
});
}
// 操作按钮初始化
function initOperationButtons() {
// 刷新图标缓存按钮