@@ -140,13 +140,18 @@ export class AppNavigationActions {
140140
141141 return (
142142 < Fragment >
143- < button class = "ion-activatable" onClick = { ( ) => this . newDeck ( ) } disabled = { disabled } aria-label = { i18n . state . tools . new_presentation } >
143+ < button
144+ key = "new-deck-action"
145+ class = "ion-activatable"
146+ onClick = { ( ) => this . newDeck ( ) }
147+ disabled = { disabled }
148+ aria-label = { i18n . state . tools . new_presentation } >
144149 < ion-ripple-effect > </ ion-ripple-effect >
145150 < AppIcon name = "document" ariaHidden = { true } ariaLabel = "" > </ AppIcon >
146151 < ion-label > { i18n . state . tools . new } </ ion-label >
147152 </ button >
148153
149- < button class = "ion-activatable" onClick = { ( ) => this . openFilePicker ( ) } disabled = { disabled } >
154+ < button key = "open-file-action" class = "ion-activatable" onClick = { ( ) => this . openFilePicker ( ) } disabled = { disabled } >
150155 < ion-ripple-effect > </ ion-ripple-effect >
151156 < AppIcon name = "folder-open" ariaHidden = { true } ariaLabel = "" > </ AppIcon >
152157 < ion-label > { i18n . state . tools . open } </ ion-label >
@@ -160,7 +165,7 @@ export class AppNavigationActions {
160165 tabindex = "-1"
161166 />
162167
163- < button class = "ion-activatable" onClick = { ( ) => this . exportData ( ) } >
168+ < button key = "export-action" class = "ion-activatable" onClick = { ( ) => this . exportData ( ) } >
164169 < ion-ripple-effect > </ ion-ripple-effect >
165170 < AppIcon name = "download" ariaHidden = { true } ariaLabel = "" > </ AppIcon >
166171 < ion-label > { i18n . state . editor . export } </ ion-label >
@@ -175,7 +180,7 @@ export class AppNavigationActions {
175180 }
176181
177182 return (
178- < button class = "ion-activatable" onClick = { ( ) => signIn ( ) } >
183+ < button key = "sign-in-action" class = "ion-activatable" onClick = { ( ) => signIn ( ) } >
179184 < ion-ripple-effect > </ ion-ripple-effect >
180185 < AppIcon name = "log-in" ariaHidden = { true } ariaLabel = "" > </ AppIcon >
181186 < ion-label > { i18n . state . nav . sign_in } </ ion-label >
@@ -189,7 +194,11 @@ export class AppNavigationActions {
189194 < Fragment >
190195 { this . renderCloudStatus ( ) }
191196
192- < button class = "ion-activatable" onClick = { ( e : UIEvent ) => this . openMenu ( e ) } aria-label = { i18n . state . nav . menu } >
197+ < button
198+ key = "user-menu-action"
199+ class = "ion-activatable"
200+ onClick = { ( e : UIEvent ) => this . openMenu ( e ) }
201+ aria-label = { i18n . state . nav . menu } >
193202 < ion-ripple-effect > </ ion-ripple-effect >
194203 < app-avatar src = { userStore . state . photoUrl } > </ app-avatar >
195204 < ion-label > { userStore . state . name ?? i18n . state . tools . user } </ ion-label >
@@ -215,15 +224,21 @@ export class AppNavigationActions {
215224 ? i18n . state . sync . cloud_pending
216225 : i18n . state . sync . cloud_idle ;
217226
227+ const iconName : string =
228+ syncStore . state . sync === 'error'
229+ ? 'cloud-offline'
230+ : [ 'in_progress' , 'pending' ] . includes ( syncStore . state . sync )
231+ ? 'sync'
232+ : 'cloud-done' ;
233+
218234 return (
219- < button class = { `cloud ${ syncStore . state . sync } ` } aria-label = { label } onClick = { ( $event : UIEvent ) => this . openSyncInfo ( $event ) } >
220- { syncStore . state . sync === 'error' ? (
221- < AppIcon name = "cloud-offline" ariaHidden = { true } ariaLabel = "" > </ AppIcon >
222- ) : [ 'in_progress' , 'pending' ] . includes ( syncStore . state . sync ) ? (
223- < AppIcon name = "sync" ariaHidden = { true } ariaLabel = "" > </ AppIcon >
224- ) : (
225- < AppIcon name = "cloud-done" ariaHidden = { true } ariaLabel = "" > </ AppIcon >
226- ) }
235+ < button
236+ key = "cloud-status-action"
237+ class = { `cloud ion-activatable ${ syncStore . state . sync } ` }
238+ aria-label = { label }
239+ onClick = { ( $event : UIEvent ) => this . openSyncInfo ( $event ) } >
240+ < ion-ripple-effect > </ ion-ripple-effect >
241+ < AppIcon name = { iconName } ariaHidden = { true } ariaLabel = "" > </ AppIcon >
227242 < ion-label > { i18n . state . sync . cloud } </ ion-label >
228243 </ button >
229244 ) ;
0 commit comments