fix: 修复锁定屏幕和退出登录小部件,位置在 user-dropdown 时,使用快捷键唤出两个模态窗

This commit is contained in:
hiss
2026-07-23 14:44:32 +08:00
parent 294e9f2966
commit e6a23479ee
2 changed files with 23 additions and 11 deletions

View File

@@ -212,13 +212,6 @@ const enableLockScreenShortcutKey = computed(() => {
return showLockInDropdown.value && globalLockScreenShortcutKey.value;
});
const enableShortcutKey = computed(() => {
return (
(showLockInDropdown.value || showLogoutInDropdown.value) &&
preferences.shortcutKeys.enable
);
});
function handleOpenLock() {
lockModalApi.open();
}
@@ -269,7 +262,7 @@ async function handleLocaleChange(event: Event, value: 'en-US' | 'zh-CN') {
openPopover.value = false;
}
if (enableShortcutKey.value) {
if (preferences.shortcutKeys.enable) {
const keys = useMagicKeys();
const logoutKey = keys['Alt+KeyQ'];
const lockKey = keys['Alt+KeyL'];