@@ -47,6 +47,12 @@ defineProps({
47
47
},
48
48
});
49
49
50
+ const users = computed (() => {
51
+ return Object .entries (userSettings .value ).filter (
52
+ ([key , value ]) => value && key !== username .value && key !== defaultUser ,
53
+ );
54
+ });
55
+
50
56
const toOption = (
51
57
key : string ,
52
58
icon : Component | string ,
@@ -63,23 +69,16 @@ const toOption = (
63
69
};
64
70
};
65
71
66
- const baseOptions: DropdownProps [' options' ] = [
67
- { type: ' divider' , key: ' account-divider' },
68
- toOption (' settings' , IconCog ),
69
- { type: ' divider' , key: ' external-links' },
70
- toOption (' trakt' , IconExternalLink ),
71
- { type: ' divider' , key: ' session-divider' },
72
- toOption (' login' , IconAccountAdd ),
73
- toOption (' logout' , IconLogOut ),
74
- ];
75
-
76
- const users = computed (() => {
77
- return Object .entries (userSettings .value ).filter (
78
- ([key , value ]) => value && key !== username .value && key !== defaultUser ,
79
- );
80
- });
81
-
82
72
const options = computed <DropdownProps [' options' ]>(() => {
73
+ const baseOptions: DropdownProps [' options' ] = [
74
+ toOption (' settings' , IconCog ),
75
+ { type: ' divider' , key: ' external-links' },
76
+ toOption (' trakt' , IconExternalLink ),
77
+ { type: ' divider' , key: ' session-divider' },
78
+ toOption (' login' , IconAccountAdd ),
79
+ toOption (' logout' , IconLogOut ),
80
+ ];
81
+
83
82
if (users .value .length ) {
84
83
return [
85
84
... users .value .map (([key , value ]) =>
0 commit comments