fix: account menu matches the redesigned board: System, Light, Dark stay in the menu and the sheet, and the visual-check exception on profile "Account menu" in web/visual/states.ts is removed
This commit is contained in:
1 parent
6dc47789ef
commit
27dadbbfa6
6 files changed
+68
-20
No files matched your search
@@ -4,6 +4,7 @@ import { useMediaQuery } from '@vueuse/core'
|
||||
import { colorModeOptions, useAccountMenu } from '@/composables/useAccountMenu'
|
||||
|
||||
const DESKTOP_QUERY = '(min-width: 64rem)'
|
||||
const ITEM_CLASS = 'h-8 py-0'
|
||||
|
||||
const props = defineProps<{
|
||||
username: string
|
||||
@@ -60,7 +61,7 @@ const items = computed(() => [
|
||||
{
|
||||
label: 'Profile',
|
||||
icon: 'i-lucide-circle-user',
|
||||
class: onProfile.value ? 'bg-elevated' : undefined,
|
||||
class: onProfile.value ? `${ITEM_CLASS} bg-elevated` : ITEM_CLASS,
|
||||
onSelect: goToProfile,
|
||||
},
|
||||
],
|
||||
@@ -68,6 +69,8 @@ const items = computed(() => [
|
||||
type: 'checkbox' as const,
|
||||
label: option.label,
|
||||
checked: colorMode.preference === option.value,
|
||||
class: ITEM_CLASS,
|
||||
onSelect: (event: Event) => event.preventDefault(),
|
||||
onUpdateChecked: (checked: boolean) => {
|
||||
if (checked) {
|
||||
colorMode.preference = option.value
|
||||
@@ -78,6 +81,7 @@ const items = computed(() => [
|
||||
{
|
||||
label: 'Log out',
|
||||
icon: 'i-lucide-log-out',
|
||||
class: ITEM_CLASS,
|
||||
onSelect: () => emit('logout'),
|
||||
},
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user