Add window pinning

This commit is contained in:
2025-05-12 19:59:40 +08:00
parent 0710f0c9b0
commit e0b9a376cb
11 changed files with 1183 additions and 138 deletions

View File

@@ -158,6 +158,11 @@ export const useConfigStore = defineStore('config', () => {
: TabType.TabTypeSpaces;
}
// 切换窗口置顶状态
function toggleAlwaysOnTop() {
updateConfig('alwaysOnTop', val => !val);
}
// 重置为默认配置
async function resetToDefaults() {
try {
@@ -197,6 +202,9 @@ export const useConfigStore = defineStore('config', () => {
toggleTabIndent: () => updateConfig('enableTabIndent', val => !val),
increaseTabSize: () => adjustTabSize(1),
decreaseTabSize: () => adjustTabSize(-1),
toggleTabType
toggleTabType,
// 窗口置顶操作
toggleAlwaysOnTop
};
});