@@ -84,15 +84,15 @@ struct KasetApp: App {
8484 Color . clear
8585 . frame ( width: 1 , height: 1 )
8686 } else {
87- MainWindow ( navigationSelection: $navigationSelection)
88- . environment ( authService)
89- . environment ( webKitManager)
90- . environment ( playerService)
91- . environment ( \. searchFocusTrigger, $searchFocusTrigger)
92- . environment ( \. navigationSelection, $navigationSelection)
87+ MainWindow ( navigationSelection: self . $navigationSelection)
88+ . environment ( self . authService)
89+ . environment ( self . webKitManager)
90+ . environment ( self . playerService)
91+ . environment ( \. searchFocusTrigger, self . $searchFocusTrigger)
92+ . environment ( \. navigationSelection, self . $navigationSelection)
9393 . task {
9494 // Check if user is already logged in from previous session
95- await authService. checkLoginStatus ( )
95+ await self . authService. checkLoginStatus ( )
9696 }
9797 }
9898 }
@@ -101,37 +101,37 @@ struct KasetApp: App {
101101 CommandGroup ( after: . appInfo) {
102102 Button ( " Sign Out " ) {
103103 Task {
104- await authService. signOut ( )
104+ await self . authService. signOut ( )
105105 }
106106 }
107- . disabled ( authService. state == . loggedOut)
107+ . disabled ( self . authService. state == . loggedOut)
108108 }
109109
110110 // Playback commands
111111 CommandMenu ( " Playback " ) {
112112 // Play/Pause - Space
113- Button ( playerService. isPlaying ? " Pause " : " Play " ) {
113+ Button ( self . playerService. isPlaying ? " Pause " : " Play " ) {
114114 Task {
115- await playerService. playPause ( )
115+ await self . playerService. playPause ( )
116116 }
117117 }
118118 . keyboardShortcut ( . space, modifiers: [ ] )
119- . disabled ( playerService. currentTrack == nil && playerService. pendingPlayVideoId == nil )
119+ . disabled ( self . playerService. currentTrack == nil && self . playerService. pendingPlayVideoId == nil )
120120
121121 Divider ( )
122122
123123 // Next Track - ⌘→
124124 Button ( " Next " ) {
125125 Task {
126- await playerService. next ( )
126+ await self . playerService. next ( )
127127 }
128128 }
129129 . keyboardShortcut ( . rightArrow, modifiers: . command)
130130
131131 // Previous Track - ⌘←
132132 Button ( " Previous " ) {
133133 Task {
134- await playerService. previous ( )
134+ await self . playerService. previous ( )
135135 }
136136 }
137137 . keyboardShortcut ( . leftArrow, modifiers: . command)
@@ -141,47 +141,47 @@ struct KasetApp: App {
141141 // Volume Up - ⌘↑
142142 Button ( " Volume Up " ) {
143143 Task {
144- await playerService. setVolume ( min ( 1.0 , playerService. volume + 0.1 ) )
144+ await self . playerService. setVolume ( min ( 1.0 , self . playerService. volume + 0.1 ) )
145145 }
146146 }
147147 . keyboardShortcut ( . upArrow, modifiers: . command)
148148
149149 // Volume Down - ⌘↓
150150 Button ( " Volume Down " ) {
151151 Task {
152- await playerService. setVolume ( max ( 0.0 , playerService. volume - 0.1 ) )
152+ await self . playerService. setVolume ( max ( 0.0 , self . playerService. volume - 0.1 ) )
153153 }
154154 }
155155 . keyboardShortcut ( . downArrow, modifiers: . command)
156156
157157 // Mute - ⌘⇧M
158- Button ( playerService. isMuted ? " Unmute " : " Mute " ) {
158+ Button ( self . playerService. isMuted ? " Unmute " : " Mute " ) {
159159 Task {
160- await playerService. toggleMute ( )
160+ await self . playerService. toggleMute ( )
161161 }
162162 }
163163 . keyboardShortcut ( " m " , modifiers: [ . command, . shift] )
164164
165165 Divider ( )
166166
167167 // Shuffle - ⌘S
168- Button ( playerService. shuffleEnabled ? " Shuffle Off " : " Shuffle On " ) {
169- playerService. toggleShuffle ( )
168+ Button ( self . playerService. shuffleEnabled ? " Shuffle Off " : " Shuffle On " ) {
169+ self . playerService. toggleShuffle ( )
170170 }
171171 . keyboardShortcut ( " s " , modifiers: . command)
172172
173173 // Repeat - ⌘R
174- Button ( repeatModeLabel) {
175- playerService. cycleRepeatMode ( )
174+ Button ( self . repeatModeLabel) {
175+ self . playerService. cycleRepeatMode ( )
176176 }
177177 . keyboardShortcut ( " r " , modifiers: . command)
178178
179179 Divider ( )
180180
181181 // Lyrics - ⌘L
182- Button ( playerService. showLyrics ? " Hide Lyrics " : " Show Lyrics " ) {
182+ Button ( self . playerService. showLyrics ? " Hide Lyrics " : " Show Lyrics " ) {
183183 withAnimation ( . easeInOut( duration: 0.2 ) ) {
184- playerService. showLyrics. toggle ( )
184+ self . playerService. showLyrics. toggle ( )
185185 }
186186 }
187187 . keyboardShortcut ( " l " , modifiers: . command)
@@ -191,31 +191,31 @@ struct KasetApp: App {
191191 CommandGroup ( replacing: . sidebar) {
192192 // Home - ⌘1
193193 Button ( " Home " ) {
194- navigationSelection = . home
194+ self . navigationSelection = . home
195195 }
196196 . keyboardShortcut ( " 1 " , modifiers: . command)
197197
198198 // Explore - ⌘2
199199 Button ( " Explore " ) {
200- navigationSelection = . explore
200+ self . navigationSelection = . explore
201201 }
202202 . keyboardShortcut ( " 2 " , modifiers: . command)
203203
204204 // Library - ⌘3
205205 Button ( " Library " ) {
206- navigationSelection = . library
206+ self . navigationSelection = . library
207207 }
208208 . keyboardShortcut ( " 3 " , modifiers: . command)
209209
210210 Divider ( )
211211
212212 // Search - ⌘F
213213 Button ( " Search " ) {
214- navigationSelection = . search
214+ self . navigationSelection = . search
215215 // Trigger focus after a brief delay to allow view to appear
216216 Task { @MainActor in
217217 try ? await Task . sleep ( for: . milliseconds( 100 ) )
218- searchFocusTrigger = true
218+ self . searchFocusTrigger = true
219219 }
220220 }
221221 . keyboardShortcut ( " f " , modifiers: . command)
@@ -225,7 +225,7 @@ struct KasetApp: App {
225225
226226 /// Label for repeat mode menu item.
227227 private var repeatModeLabel : String {
228- switch playerService. repeatMode {
228+ switch self . playerService. repeatMode {
229229 case . off:
230230 " Repeat All "
231231 case . all:
0 commit comments