Rename product to Lingma Proxy
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8"/>
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
||||
<link rel="icon" type="image/png" href="/favicon.png"/>
|
||||
<title>lingma-proxy-desktop</title>
|
||||
<title>Lingma Proxy</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -6,7 +6,7 @@ import Models from './views/Models.vue'
|
||||
import Requests from './views/Requests.vue'
|
||||
import Settings from './views/Settings.vue'
|
||||
import { EventsOff, EventsOn } from '../wailsjs/runtime'
|
||||
import { ClearLogs, GetLogs, GetStatus, HideWindow, MinimizeWindow } from '../wailsjs/go/main/App.js'
|
||||
import { ClearLogs, ForceQuitApp, GetLogs, GetStatus, HideWindow, MinimizeWindow } from '../wailsjs/go/main/App.js'
|
||||
import lingmaIcon from './assets/images/lingma-icon.png'
|
||||
|
||||
const currentTab = ref('dashboard')
|
||||
@@ -105,6 +105,17 @@ async function copyEndpoint() {
|
||||
handleNotice('已复制接口地址:' + value)
|
||||
}
|
||||
|
||||
async function forceQuitApp() {
|
||||
const confirmed = window.confirm('确定要停止代理并退出应用吗?')
|
||||
if (!confirmed) return
|
||||
showToast('正在停止代理并退出应用...')
|
||||
try {
|
||||
await ForceQuitApp()
|
||||
} catch (e) {
|
||||
addLog('error', '退出应用失败:' + (e.message || String(e)))
|
||||
}
|
||||
}
|
||||
|
||||
function safeEventsOn(name, handler) {
|
||||
try {
|
||||
EventsOn(name, handler)
|
||||
@@ -215,7 +226,7 @@ onUnmounted(() => {
|
||||
</span>
|
||||
<span>
|
||||
<strong>灵码代理</strong>
|
||||
<small>IPC Proxy</small>
|
||||
<small>Proxy</small>
|
||||
</span>
|
||||
</button>
|
||||
|
||||
@@ -260,6 +271,9 @@ onUnmounted(() => {
|
||||
<button class="icon-button" type="button" :title="themeTitle()" @click="toggleTheme">
|
||||
<i class="bi" :class="themeIcon()" aria-hidden="true"></i>
|
||||
</button>
|
||||
<button class="icon-button danger-icon-button" type="button" title="停止代理并退出应用" @click="forceQuitApp">
|
||||
<i class="bi bi-power" aria-hidden="true"></i>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
||||
@@ -1289,6 +1289,17 @@ button {
|
||||
border: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.danger-icon-button {
|
||||
color: #b42318;
|
||||
background: rgba(254, 226, 226, 0.72);
|
||||
border-color: rgba(220, 38, 38, 0.24);
|
||||
}
|
||||
|
||||
.danger-icon-button:hover {
|
||||
color: #991b1b;
|
||||
background: rgba(254, 202, 202, 0.88);
|
||||
}
|
||||
|
||||
.primary-button:hover,
|
||||
.secondary-button:hover,
|
||||
.ghost-button:hover,
|
||||
@@ -1963,6 +1974,17 @@ button:disabled {
|
||||
background: rgba(30, 41, 59, 0.66);
|
||||
}
|
||||
|
||||
:root[data-theme='dark'] .danger-icon-button {
|
||||
color: #fecaca;
|
||||
border-color: rgba(248, 113, 113, 0.32);
|
||||
background: rgba(127, 29, 29, 0.42);
|
||||
}
|
||||
|
||||
:root[data-theme='dark'] .danger-icon-button:hover {
|
||||
color: #fff1f2;
|
||||
background: rgba(153, 27, 27, 0.62);
|
||||
}
|
||||
|
||||
:root[data-theme='dark'] .strip-actions {
|
||||
background: rgba(15, 23, 42, 0.78);
|
||||
}
|
||||
|
||||
2
desktop/frontend/wailsjs/go/main/App.d.ts
vendored
2
desktop/frontend/wailsjs/go/main/App.d.ts
vendored
@@ -7,6 +7,8 @@ export function ClearLogs():Promise<void>;
|
||||
|
||||
export function ClearRequests():Promise<void>;
|
||||
|
||||
export function ForceQuitApp():Promise<void>;
|
||||
|
||||
export function GetConfig():Promise<service.Config>;
|
||||
|
||||
export function GetDetectionInfo():Promise<main.DetectionInfo>;
|
||||
|
||||
@@ -10,6 +10,10 @@ export function ClearRequests() {
|
||||
return window['go']['main']['App']['ClearRequests']();
|
||||
}
|
||||
|
||||
export function ForceQuitApp() {
|
||||
return window['go']['main']['App']['ForceQuitApp']();
|
||||
}
|
||||
|
||||
export function GetConfig() {
|
||||
return window['go']['main']['App']['GetConfig']();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user