mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-04-26 09:20:18 +08:00
refactor: 修改开发工具打开模式为分离,优化调试体验;更新ThemeToggle组件样式;删除不再使用的IPC和Node示例代码
This commit is contained in:
@@ -71,7 +71,7 @@ async function createWindow() {
|
|||||||
if (VITE_DEV_SERVER_URL) { // #298
|
if (VITE_DEV_SERVER_URL) { // #298
|
||||||
win.loadURL(VITE_DEV_SERVER_URL)
|
win.loadURL(VITE_DEV_SERVER_URL)
|
||||||
// Open devTool if the app is not packaged
|
// Open devTool if the app is not packaged
|
||||||
win.webContents.openDevTools()
|
win.webContents.openDevTools({mode:'detach'})
|
||||||
} else {
|
} else {
|
||||||
win.loadFile(indexHtml)
|
win.loadFile(indexHtml)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="flex items-center justify-between rounded-2xl border border-slate-200/80 bg-white/70 px-4 py-3 text-sm font-medium text-slate-600 shadow-sm transition hover:border-brand/40 hover:bg-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40 dark:border-slate-800/70 dark:bg-slate-900/60 dark:text-slate-300"
|
class="flex items-center justify-between rounded-2xl border border-slate-200/80 bg-white/70 px-4 py-3 text-sm font-medium text-slate-600 shadow-sm transition hover:border-brand/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40 dark:border-slate-800/70 dark:bg-slate-900/60 dark:text-slate-300"
|
||||||
:aria-pressed="isDark" @click="toggle">
|
:aria-pressed="isDark" @click="toggle">
|
||||||
<span class="flex items-center gap-2">
|
<span class="flex items-center gap-2">
|
||||||
<i class="fas" :class="isDark ? 'fa-moon text-amber-200' : 'fa-sun text-amber-400'"></i>
|
<i class="fas" :class="isDark ? 'fa-moon text-amber-200' : 'fa-sun text-amber-400'"></i>
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
window.ipcRenderer.on('main-process-message', (_event, ...args) => {
|
|
||||||
console.log('[Receive Main-process message]:', ...args)
|
|
||||||
})
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
import { lstat } from 'node:fs/promises'
|
|
||||||
import { cwd } from 'node:process'
|
|
||||||
|
|
||||||
lstat(cwd()).then(stats => {
|
|
||||||
console.log('[fs.lstat]', stats)
|
|
||||||
}).catch(err => {
|
|
||||||
console.error(err)
|
|
||||||
})
|
|
||||||
Reference in New Issue
Block a user