fix: 修复了确认对话框操作的变量在点击时被重置的bug

This commit is contained in:
Fridayssheep
2026-02-11 15:16:42 +08:00
parent 21bea797e4
commit ba6ec56cee
6 changed files with 36 additions and 17 deletions

View File

@@ -1310,15 +1310,19 @@ function openTerminalInNewTab() {
// ATX actions
async function handlePowerShort() {
console.log('[ConsoleView] Handling power short press')
try {
await atxApi.power('short')
const res = await atxApi.power('short')
console.log('[ConsoleView] Power short API result:', res)
await systemStore.fetchAtxState()
} catch {
} catch (e) {
console.error('[ConsoleView] Power short API failed:', e)
// ATX action failed
}
}
async function handlePowerLong() {
console.log('[ConsoleView] Handling power long press')
try {
await atxApi.power('long')
await systemStore.fetchAtxState()