@@ -26,8 +26,6 @@ import type { VoiceUser } from "@/types";
26
26
27
27
export const Developer = ( ) => {
28
28
const platformInfo = usePlatformInfo ( ) ;
29
- const [ showOnlyTalkingUsers , setShowOnlyTalkingUsers ] = useState ( Config . get ( "showOnlyTalkingUsers" ) ! ) ;
30
-
31
29
return (
32
30
< >
33
31
< div className = "flex flex-col gap-2" >
@@ -51,49 +49,57 @@ export const Developer = () => {
51
49
Open Config Dir
52
50
</ Button >
53
51
</ div >
52
+ </ div >
53
+ </ >
54
+ ) ;
55
+ } ;
56
+ export const AppInfo = ( ) => {
57
+ const [ showOnlyTalkingUsers , setShowOnlyTalkingUsers ] = useState ( Config . get ( "showOnlyTalkingUsers" ) ! ) ;
58
+ const platformInfo = usePlatformInfo ( ) ;
54
59
55
- < div className = "flex items-center pb-2" >
56
- < Checkbox
57
- id = "notification"
58
- checked = { showOnlyTalkingUsers }
59
- onCheckedChange = { async ( ) => {
60
- const newBool = ! showOnlyTalkingUsers ;
61
- setShowOnlyTalkingUsers ( newBool ) ;
62
- Config . set ( "showOnlyTalkingUsers" , newBool ) ;
63
-
64
- // let the main app know the updated config
65
- // TODO: is there a more efficient way to do this rather than sending the whole config?
66
- await emit ( "config_update" , Config . getConfig ( ) ) ;
67
- } }
68
- />
69
- < label
70
- htmlFor = "notification"
71
- className = "ml-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
72
- >
73
- Only show users who are speaking
74
- </ label >
60
+ return (
61
+ < div >
62
+ < div className = "flex items-center pb-2" >
63
+ < Checkbox
64
+ id = "notification"
65
+ checked = { showOnlyTalkingUsers }
66
+ onCheckedChange = { async ( ) => {
67
+ const newBool = ! showOnlyTalkingUsers ;
68
+ setShowOnlyTalkingUsers ( newBool ) ;
69
+ Config . set ( "showOnlyTalkingUsers" , newBool ) ;
70
+
71
+ // let the main app know the updated config
72
+ // TODO: is there a more efficient way to do this rather than sending the whole config?
73
+ await emit ( "config_update" , Config . getConfig ( ) ) ;
74
+ } }
75
+ />
76
+ < label
77
+ htmlFor = "notification"
78
+ className = "ml-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
79
+ >
80
+ Only show users who are speaking
81
+ </ label >
82
+ </ div >
83
+ < div className = "flex items-center gap-2 pb-4 text-zinc-400" >
84
+ < div >
85
+ < p className = "text-sm" >
86
+ < strong > OS</ strong > { platformInfo . os } { platformInfo . kernalVersion } { platformInfo . arch }
87
+ </ p >
75
88
</ div >
76
- < div className = "flex items-center text-zinc-400 gap-2 pb-4" >
77
- < div >
78
- < p className = "text-sm" >
79
- < strong > OS</ strong > { platformInfo . os } { platformInfo . kernalVersion } { platformInfo . arch }
80
- </ p >
81
- </ div >
82
- < span className = "text-xs" > /</ span >
83
- < div >
84
- < p className = "text-sm" >
85
- < strong > Tauri</ strong > { platformInfo . tauriVersion }
86
- </ p >
87
- </ div >
88
- < span className = "text-sm" > /</ span >
89
- < div >
90
- < p className = "text-sm" >
91
- < strong > App</ strong > { platformInfo . appVersion }
92
- </ p >
93
- </ div >
89
+ < span className = "text-xs" > /</ span >
90
+ < div >
91
+ < p className = "text-sm" >
92
+ < strong > Tauri</ strong > { platformInfo . tauriVersion }
93
+ </ p >
94
+ </ div >
95
+ < span className = "text-sm" > /</ span >
96
+ < div >
97
+ < p className = "text-sm" >
98
+ < strong > App</ strong > { platformInfo . appVersion }
99
+ </ p >
94
100
</ div >
95
101
</ div >
96
- </ >
102
+ </ div >
97
103
) ;
98
104
} ;
99
105
@@ -128,22 +134,21 @@ export const Account = () => {
128
134
window . removeEventListener ( "storage" , onStorageChange ) ;
129
135
} ;
130
136
} , [ ] ) ;
131
-
132
137
const avatarUrl = `https://cdn.discordapp.com/avatars/${ user ?. id } /${ user ?. avatar } .png` ;
133
138
return (
134
139
< div >
135
140
< div className = "h-[282px]" >
136
141
< div className = "flex items-center mb-2" >
137
142
{ user ?. id && (
138
- < Avatar className = "mr-3 w-16 h-16" >
143
+ < Avatar className = "w-16 h-16 mr-3 " >
139
144
< AvatarImage src = { avatarUrl } />
140
145
< AvatarFallback > U</ AvatarFallback >
141
146
</ Avatar >
142
147
) }
143
148
< div >
144
149
{ user ?. id ? (
145
150
< div >
146
- < p className = "mb -3 mt -3 font-bold" >
151
+ < p className = "mt -3 mb -3 font-bold" >
147
152
{ user ?. global_name } ({ user ?. id } )
148
153
</ p >
149
154
</ div >
@@ -161,7 +166,7 @@ export const Account = () => {
161
166
</ div >
162
167
</ div >
163
168
164
- < div className = "flex gap-4 pb-4" >
169
+ < div className = "flex flex-row gap-4 pb-4" >
165
170
< div >
166
171
< Dialog
167
172
onOpenChange = { e => {
@@ -188,8 +193,8 @@ export const Account = () => {
188
193
} }
189
194
>
190
195
< DialogHeader >
191
- < DialogTitle className = "text-xl mb-4 text-white" > Logout</ DialogTitle >
192
- < DialogDescription className = "text-xl mb-4 text-white" >
196
+ < DialogTitle className = "mb-4 text-xl text-white" > Logout</ DialogTitle >
197
+ < DialogDescription className = "mb-4 text-xl text-white" >
193
198
Are you sure you want to log out of Overlayed?
194
199
</ DialogDescription >
195
200
</ DialogHeader >
@@ -224,8 +229,8 @@ export const Account = () => {
224
229
} }
225
230
>
226
231
< DialogHeader >
227
- < DialogTitle className = "text-xl mb-4 text-white" > Quit Overlayed</ DialogTitle >
228
- < DialogDescription className = "text-xl mb-4 text-white" >
232
+ < DialogTitle className = "mb-4 text-xl text-white" > Quit Overlayed</ DialogTitle >
233
+ < DialogDescription className = "mb-4 text-xl text-white" >
229
234
Are you sure you want to quit the Overlayed app?
230
235
</ DialogDescription >
231
236
</ DialogHeader >
@@ -240,8 +245,9 @@ export const Account = () => {
240
245
</ form >
241
246
</ DialogContent >
242
247
</ Dialog >
248
+ < Developer />
243
249
</ div >
244
- < Developer />
250
+ < AppInfo />
245
251
</ div >
246
252
</ div >
247
253
) ;
0 commit comments