Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/components/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const desktopLinks = computed<NavigationConfig>(() => [
name: 'Settings',
label: $t('nav.settings'),
to: { name: 'settings' },
keyshortcut: ',',
keyshortcut: 's',
type: 'link',
external: false,
iconClass: 'i-lucide:settings',
Expand Down Expand Up @@ -201,8 +201,8 @@ function handleSearchFocus() {
}

useShortcuts({
'c': () => ({ name: 'compare' }),
',': () => ({ name: 'settings' }),
c: () => ({ name: 'compare' }),
s: () => ({ name: 'settings' }),
})
</script>

Expand Down Expand Up @@ -316,7 +316,7 @@ useShortcuts({
class="border-none"
variant="button-secondary"
:to="link.to"
:aria-keyshortcuts="link.keyshortcut"
:classicon="link.iconClass"
>
{{ link.label }}
</LinkBase>
Expand Down
9 changes: 7 additions & 2 deletions app/pages/settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ const setLocale: typeof setNuxti18nLocale = newLocale => {
settings.value.selectedLocale = newLocale
return setNuxti18nLocale(newLocale)
}

function handleLocaleChange(newLocale?: string) {
if (!newLocale) return
setLocale(newLocale)
}
</script>

<template>
Expand Down Expand Up @@ -244,8 +249,8 @@ const setLocale: typeof setNuxti18nLocale = newLocale => {
<SelectField
id="language-select"
:items="locales.map(loc => ({ label: loc.name ?? '', value: loc.code }))"
v-model="currentLocale"
@update:modelValue="setLocale($event as typeof currentLocale)"
:modelValue="currentLocale"
@update:modelValue="handleLocaleChange"
block
size="sm"
class="max-w-48"
Expand Down
Loading