update
This commit is contained in:
@@ -213,6 +213,10 @@ const localAvailableInputs = computed(() => {
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="flex-grow p-6 flex flex-col gap-6 bg-background overflow-y-auto">
|
<div class="flex-grow p-6 flex flex-col gap-6 bg-background overflow-y-auto">
|
||||||
|
<!-- Alt Switch Hint -->
|
||||||
|
<p class="text-sm text-text-secondary italic mb-4">
|
||||||
|
{{ t('focusSwitcher.altSwitchHint', '提示:按下 Alt 键可在配置的输入源之间快速切换焦点。') }}
|
||||||
|
</p>
|
||||||
<!-- Top Row: Available & Configured -->
|
<!-- Top Row: Available & Configured -->
|
||||||
<div class="flex gap-6 flex-shrink-0 min-h-[300px]">
|
<div class="flex gap-6 flex-shrink-0 min-h-[300px]">
|
||||||
<!-- Available Inputs -->
|
<!-- Available Inputs -->
|
||||||
@@ -285,7 +289,7 @@ const localAvailableInputs = computed(() => {
|
|||||||
type="text"
|
type="text"
|
||||||
v-model="localItemConfigs[input.id].shortcut"
|
v-model="localItemConfigs[input.id].shortcut"
|
||||||
class="shortcut-input w-24 px-2 py-1 border border-border rounded bg-background text-foreground text-xs text-center flex-shrink-0 placeholder-text-alt italic"
|
class="shortcut-input w-24 px-2 py-1 border border-border rounded bg-background text-foreground text-xs text-center flex-shrink-0 placeholder-text-alt italic"
|
||||||
:placeholder="t('focusSwitcher.shortcutPlaceholder')"
|
:placeholder="t('focusSwitcher.shortcutPlaceholder', '例如 Alt+K')"
|
||||||
@keydown.prevent="captureShortcut($event, localItemConfigs[input.id])"
|
@keydown.prevent="captureShortcut($event, localItemConfigs[input.id])"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -663,6 +663,17 @@
|
|||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"saveFailed": "Failed to save sync target."
|
"saveFailed": "Failed to save sync target."
|
||||||
|
},
|
||||||
|
"timezone": {
|
||||||
|
"title": "Timezone Settings",
|
||||||
|
"selectLabel": "Select Timezone:",
|
||||||
|
"description": "Timestamps in notifications will be formatted according to this timezone.",
|
||||||
|
"success": {
|
||||||
|
"saved": "Timezone setting saved successfully."
|
||||||
|
},
|
||||||
|
"error": {
|
||||||
|
"saveFailed": "Failed to save timezone setting."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -907,7 +918,8 @@
|
|||||||
"confirmClose": "You have unsaved changes. Are you sure you want to close?",
|
"confirmClose": "You have unsaved changes. Are you sure you want to close?",
|
||||||
"shortcutPlaceholder": "e.g., Alt+K",
|
"shortcutPlaceholder": "e.g., Alt+K",
|
||||||
"shortcutSettings": "Shortcut Settings",
|
"shortcutSettings": "Shortcut Settings",
|
||||||
"noInputsAvailable": "No configurable inputs available"
|
"noInputsAvailable": "No configurable inputs available",
|
||||||
|
"altSwitchHint": "Hint: Press the Alt key to quickly switch focus between configured input sources."
|
||||||
},
|
},
|
||||||
"dockerManager": {
|
"dockerManager": {
|
||||||
"loading": "Loading Docker Containers...",
|
"loading": "Loading Docker Containers...",
|
||||||
|
|||||||
@@ -664,6 +664,17 @@
|
|||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"saveFailed": "保存同步目标失败。"
|
"saveFailed": "保存同步目标失败。"
|
||||||
|
},
|
||||||
|
"timezone": {
|
||||||
|
"title": "时区设置",
|
||||||
|
"selectLabel": "选择时区:",
|
||||||
|
"description": "通知中的时间戳将根据此时区进行格式化。",
|
||||||
|
"success": {
|
||||||
|
"saved": "时区设置已成功保存。"
|
||||||
|
},
|
||||||
|
"error": {
|
||||||
|
"saveFailed": "保存时区设置失败。"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -910,7 +921,8 @@
|
|||||||
"confirmClose": "有未保存的更改,确定要关闭吗?",
|
"confirmClose": "有未保存的更改,确定要关闭吗?",
|
||||||
"shortcutPlaceholder": "例如 Alt+K",
|
"shortcutPlaceholder": "例如 Alt+K",
|
||||||
"shortcutSettings": "快捷键设置",
|
"shortcutSettings": "快捷键设置",
|
||||||
"noInputsAvailable": "没有可配置的输入项"
|
"noInputsAvailable": "没有可配置的输入项",
|
||||||
|
"altSwitchHint": "提示:按下 Alt 键可在配置的输入源之间快速切换焦点。"
|
||||||
},
|
},
|
||||||
"dockerManager": {
|
"dockerManager": {
|
||||||
"loading": "正在加载 Docker 容器...",
|
"loading": "正在加载 Docker 容器...",
|
||||||
|
|||||||
@@ -440,10 +440,10 @@
|
|||||||
<hr class="border-border/50"> <!-- Separator -->
|
<hr class="border-border/50"> <!-- Separator -->
|
||||||
<!-- Timezone Setting -->
|
<!-- Timezone Setting -->
|
||||||
<div class="settings-section-content">
|
<div class="settings-section-content">
|
||||||
<h3 class="text-base font-semibold text-foreground mb-3">{{ t('settings.timezone.title', '时区设置') }}</h3>
|
<h3 class="text-base font-semibold text-foreground mb-3">{{ t('settings.timezone.title') }}</h3>
|
||||||
<form @submit.prevent="handleUpdateTimezone" class="space-y-4">
|
<form @submit.prevent="handleUpdateTimezone" class="space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<label for="timezoneSelect" class="block text-sm font-medium text-text-secondary mb-1">{{ t('settings.timezone.selectLabel', '选择时区') }}</label>
|
<label for="timezoneSelect" class="block text-sm font-medium text-text-secondary mb-1">{{ t('settings.timezone.selectLabel') }}</label>
|
||||||
<select id="timezoneSelect" v-model="selectedTimezone"
|
<select id="timezoneSelect" v-model="selectedTimezone"
|
||||||
class="w-full px-3 py-2 border border-border rounded-md shadow-sm bg-background text-foreground focus:outline-none focus:ring-1 focus:ring-primary focus:border-primary appearance-none bg-no-repeat bg-right pr-8"
|
class="w-full px-3 py-2 border border-border rounded-md shadow-sm bg-background text-foreground focus:outline-none focus:ring-1 focus:ring-primary focus:border-primary appearance-none bg-no-repeat bg-right pr-8"
|
||||||
style="background-image: url('data:image/svg+xml,%3csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\'%3e%3cpath fill=\'none\' stroke=\'%236c757d\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M2 5l6 6 6-6\'/%3e%3c/svg%3e'); background-position: right 0.75rem center; background-size: 16px 12px;">
|
style="background-image: url('data:image/svg+xml,%3csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\'%3e%3cpath fill=\'none\' stroke=\'%236c757d\' stroke-linecap=\'round\' stroke-linejoin=\'round\' stroke-width=\'2\' d=\'M2 5l6 6 6-6\'/%3e%3c/svg%3e'); background-position: right 0.75rem center; background-size: 16px 12px;">
|
||||||
@@ -451,7 +451,7 @@
|
|||||||
{{ tz }}
|
{{ tz }}
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
<small class="block mt-1 text-xs text-text-secondary">{{ t('settings.timezone.description', '通知中的时间戳将根据此时区进行格式化。') }}</small>
|
<small class="block mt-1 text-xs text-text-secondary">{{ t('settings.timezone.description') }}</small>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
@@ -877,11 +877,11 @@ const handleUpdateTimezone = async () => {
|
|||||||
timezoneSuccess.value = false;
|
timezoneSuccess.value = false;
|
||||||
try {
|
try {
|
||||||
await settingsStore.updateSetting('timezone', selectedTimezone.value);
|
await settingsStore.updateSetting('timezone', selectedTimezone.value);
|
||||||
timezoneMessage.value = t('settings.timezone.success.saved', '时区设置已保存'); // 需要添加翻译
|
timezoneMessage.value = t('settings.timezone.success.saved');
|
||||||
timezoneSuccess.value = true;
|
timezoneSuccess.value = true;
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error('更新时区设置失败:', error);
|
console.error('更新时区设置失败:', error);
|
||||||
timezoneMessage.value = error.message || t('settings.timezone.error.saveFailed', '保存时区设置失败'); // 需要添加翻译
|
timezoneMessage.value = error.message || t('settings.timezone.error.saveFailed');
|
||||||
timezoneSuccess.value = false;
|
timezoneSuccess.value = false;
|
||||||
} finally {
|
} finally {
|
||||||
timezoneLoading.value = false;
|
timezoneLoading.value = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user