@@ -7,42 +7,10 @@ import {
77 SelectValue ,
88} from " @/components/ui/select" ;
99import SettingsSideTabs from " ~/components/settings/SettingsSideTabs.vue" ;
10+ import { useAccountSettingsNav } from " ~/composables/useSettingsNav" ;
11+ import { useSettingsSearchReveal } from " ~/composables/useSettingsSearch" ;
1012
11- const { t : $t } = useI18n ();
12-
13- const navItems = computed (() => {
14- const items: { path: string ; label: string }[] = [
15- {
16- path: " /settings" ,
17- label: $t (" pages.settings.account.my_account" ),
18- },
19- {
20- path: " /settings/matchmaking" ,
21- label: $t (" pages.settings.account.matchmaking" ),
22- },
23- {
24- path: " /settings/linked-accounts" ,
25- label: $t (" pages.settings.account.linked_accounts" ),
26- },
27- {
28- path: " /settings/blocked-players" ,
29- label: $t (" pages.settings.account.blocked_players" ),
30- },
31- {
32- path: " /settings/notifications" ,
33- label: $t (" pages.settings.notifications.title" ),
34- },
35- {
36- path: " /settings/voice" ,
37- label: $t (" pages.settings.account.voice" ),
38- },
39- {
40- path: " /settings/api-keys" ,
41- label: $t (" pages.settings.account.api_keys" ),
42- },
43- ];
44- return items ;
45- });
13+ const { items : navItems } = useAccountSettingsNav ();
4614
4715const route = useRoute ();
4816const router = useRouter ();
@@ -67,6 +35,7 @@ const selectedPath = computed({
6735const contentRow = ref <HTMLElement | null >(null );
6836
6937useScrollIntoViewOnChange (contentRow , () => route .path );
38+ useSettingsSearchReveal (contentRow );
7039
7140// The content pane owns its own scroll at lg, so a section switch has to be
7241// sent back to the top by hand -- unlike the application shell, this pane is
@@ -131,6 +100,7 @@ watch(
131100 rather than asking each one to wrap itself in SettingsPage. -->
132101 <div
133102 ref =" contentPane"
103+ :data-settings-pane =" route.path"
134104 class =" settings-measure min-w-0 flex-1 space-y-6 lg:h-full lg:overflow-y-auto lg:overscroll-contain"
135105 >
136106 <slot />
0 commit comments