@@ -49,17 +49,31 @@ <h4 class="mb-1">{{announcement.title}}</h4>
4949 < h4 class ="placeholder mb-1 " style ="width: 12em "> </ h4 >
5050 </ li >
5151 </ ng-template >
52+ < ng-template #announcementError >
53+ < li class ="list-group-item ">
54+ < div class ="d-flex align-items-center gap-1 mb-1 ">
55+ < div class ="fw-light small text-secondary " style ="width: 8em "> </ div >
56+ </ div >
57+ < h4 class ="my-2 "> {{'App.Messages.LoadingFailed' | translate}}</ h4 >
58+ </ li >
59+ </ ng-template >
5260 < div class ="card user-select-none mb-2 ">
5361 < ul class ="list-group list-group-flush ">
5462 < ng-container *ngIf ="loadingAnnouncement ">
5563 < ng-container *ngTemplateOutlet ="announcementPlaceholder "/>
5664 </ ng-container >
65+ < ng-container *ngIf ="!loadingAnnouncement && !announcement ">
66+ < ng-container *ngTemplateOutlet ="announcementError "/>
67+ </ ng-container >
5768 < ng-container *ngIf ="!loadingAnnouncement && announcement ">
5869 < ng-container *ngTemplateOutlet ="announcementItem; context: {announcement: announcement} "/>
5970 </ ng-container >
6071 < ng-container *ngIf ="loadingUpdate ">
6172 < ng-container *ngTemplateOutlet ="announcementPlaceholder "/>
6273 </ ng-container >
74+ < ng-container *ngIf ="!loadingUpdate && !recentUpdate ">
75+ < ng-container *ngTemplateOutlet ="announcementError "/>
76+ </ ng-container >
6377 < ng-container *ngIf ="!loadingUpdate && recentUpdate ">
6478 < ng-container *ngTemplateOutlet ="announcementItem; context: {announcement: recentUpdate} "/>
6579 </ ng-container >
@@ -84,11 +98,11 @@ <h4 class="placeholder mb-1" style="width: 12em"></h4>
8498 < h3 class ="m-0 ">
8599 {{'DashboardPage.Profiles' | translate}}
86100 </ h3 >
87- < code *ngIf ="!loadingProfile " class ="small "> ({{ currentCard || ('DashboardPage.NoBind' | translate) }})</ code >
101+ < code *ngIf ="!loadingProfiles && !profilesError " class ="small "> ({{ currentCard || ('DashboardPage.NoBind' | translate) }})</ code >
88102 </ div >
89- < a *ngIf ="!loadingProfile " class ="more-announcements " routerLink ="/cards "> {{'DashboardPage.Switch' | translate}}</ a >
103+ < a *ngIf ="!loadingProfiles && !profilesError " class ="more-announcements " routerLink ="/cards "> {{'DashboardPage.Switch' | translate}}</ a >
90104 </ div >
91- < ng-container *ngIf ="loadingProfile ">
105+ < ng-container *ngIf ="loadingProfiles ">
92106 < div class ="card mb-3 placeholder-wave ">
93107 < div class ="card-header ">
94108 < span class ="placeholder " style ="width: 6em; "> </ span >
@@ -139,11 +153,14 @@ <h3 class="m-0">
139153 < div > {{'DashboardPage.NoCardMessage' | translate}}< a routerLink ="/cards "> {{'DashboardPage.GoToCardPage' | translate}}</ a > </ div >
140154 </ div >
141155 </ ng-container >
142- < ng-container *ngIf ="!loadingProfile && !noCard && !ongekiProfile && !chusanProfile && !mai2Profile ">
143- < div class ="card mb-3 placeholder-glow ">
144- < div class ="card-body ">
145- {{'DashboardPage.NoProfileMessage' | translate}}
146- </ div >
156+ < ng-container *ngIf ="!loadingProfiles && !profilesError && !noCard && !ongekiProfile && !chusanProfile && !mai2Profile ">
157+ < div class ="alert alert-warning " role ="alert ">
158+ {{'DashboardPage.NoProfileMessage' | translate}}
159+ </ div >
160+ </ ng-container >
161+ < ng-container *ngIf ="!loadingProfiles && profilesError ">
162+ < div class ="alert alert-danger " role ="alert ">
163+ {{'App.Messages.LoadingFailed' | translate}}
147164 </ div >
148165 </ ng-container >
149166 < ng-container *ngIf ="ongekiProfile ">
@@ -262,27 +279,31 @@ <h3 class="mb-3">
262279 </ h3 >
263280 < div class ="card mb-3 ">
264281 < div class ="card-body ">
265- < div *ngIf ="checkingUpdate || (loadingDatabase && downloadingPreloadTaskCount == 0) " class ="mb-2 ">
282+ < div *ngIf ="checkingUpdateState == 'checking' || (loadingDatabase && downloadingPreloadTaskCount == 0) " class ="mb-2 ">
266283 < span class ="pe-2 "> {{'DashboardPage.CheckingUpdate' | translate}}</ span >
267284 < span class ="spinner-border spinner-border-sm " role ="status ">
268285 < span class ="visually-hidden "> Loading...</ span >
269286 </ span >
270287 </ div >
271- < div *ngIf ="!checkingUpdate && loadingDatabase && downloadingPreloadTaskCount > 0 " class ="d-flex align-items-center mb-2 ">
288+ < div *ngIf ="checkingUpdateState != 'checking' && loadingDatabase && downloadingPreloadTaskCount > 0 " class ="d-flex align-items-center mb-2 ">
272289 < span class ="pe-2 "> {{'DashboardPage.Downloading' | translate}}{{'Common.Colon' | translate}}{{completedPreloadTaskCount}}/{{totalPreloadTaskCount}}</ span >
273290 < span class ="spinner-border spinner-border-sm " role ="status ">
274291 < span class ="visually-hidden "> Loading...</ span >
275292 </ span >
276293 </ div >
277- < div *ngIf ="!checkingUpdate && !loadingDatabase && errorPreloadTaskCount == 0 " class ="d-flex align-items-center mb-2 ">
294+ < div *ngIf ="checkingUpdateState == 'completed' && !loadingDatabase && errorPreloadTaskCount == 0 " class ="d-flex align-items-center mb-2 ">
278295 < ng-icon name ="bootstrap-check-lg " class ="d-flex align-items-center me-2 text-success "> </ ng-icon >
279296 < span class ="pe-2 "> {{'DashboardPage.Version' | translate}}{{'Common.Colon' | translate}}{{dbVersion}}</ span >
280297 </ div >
281- < div *ngIf ="!checkingUpdate && !loadingDatabase && errorPreloadTaskCount > 0 " class ="d-flex align-items-center mb-2 ">
298+ < div *ngIf ="checkingUpdateState == 'error' && !loadingDatabase && errorPreloadTaskCount == 0 " class ="d-flex align-items-center mb-2 ">
299+ < ng-icon name ="bootstrap-question-lg " class ="d-flex align-items-center me-2 text-warning "> </ ng-icon >
300+ < span class ="pe-2 "> {{'DashboardPage.Version' | translate}}{{'Common.Colon' | translate}}{{dbVersion}}</ span >
301+ </ div >
302+ < div *ngIf ="checkingUpdateState != 'checking' && !loadingDatabase && errorPreloadTaskCount > 0 " class ="d-flex align-items-center mb-2 ">
282303 < ng-icon name ="bootstrap-x-lg " class ="d-flex align-items-center me-2 text-danger "> </ ng-icon >
283304 < span class ="pe-2 "> {{'DashboardPage.DownloadFailed' | translate}}{{'Common.Colon' | translate}}{{completedPreloadTaskCount}}/{{totalPreloadTaskCount}}</ span >
284305 </ div >
285- < button [class.disabled] ="checkingUpdate || loadingDatabase " class ="btn btn-danger btn-sm mt-1 " (click) ="reload() "> {{'DashboardPage.Reload' | translate}}</ button >
306+ < button [class.disabled] ="checkingUpdateState == 'checking' || loadingDatabase " class ="btn btn-danger btn-sm mt-1 " (click) ="reload() "> {{'DashboardPage.Reload' | translate}}</ button >
286307 </ div >
287308 </ div >
288309 </ div >
0 commit comments