ソースを参照

master data initialization handling

- progress circle centered
master
Flo Smilari 4年前
コミット
56fc99546d
2個のファイルの変更6行の追加5行の削除
  1. 4
    3
      Pages/IndexPage.razor
  2. 2
    2
      wwwroot/service-worker.js

+ 4
- 3
Pages/IndexPage.razor ファイルの表示

@@ -1,5 +1,6 @@
@page "/"
@using CaritasPWA.Shared.Services;
@using System.Threading;
@inject NavigationManager NavigationManager;
@inject AppState AppState;
@inject IStringLocalizer<Resources> i18n
@@ -24,7 +25,9 @@
<div class="row align-items-center justify-content-center vw-100 h-25">
<div>
@if (showProgressCircle) {
<MatProgressCircle Indeterminate="true" Size="MatProgressCircleSize.Large" Style="padding-left:1.2rem" />
<div style="width:48px;margin:0 auto;">
<MatProgressCircle Indeterminate="true" Size="MatProgressCircleSize.Large" />
</div>
<h6 style="font-style:italic;padding-bottom:1em">@i18n["Info.Masterdata.Initializing"]</h6>
}
</div>
@@ -43,8 +46,6 @@
Console.WriteLine("First activation");
showProgressCircle = true;
StateHasChanged();
//await MasterDataService.SynchronizeMasterdata();
//showProgressCircle = false;
try {
await MasterDataService.SynchronizeMasterdata();
} catch (Exception ex) {

+ 2
- 2
wwwroot/service-worker.js ファイルの表示

@@ -2,7 +2,7 @@
// This is because caching would make development more difficult (changes would not
// be reflected on the first load after each change).
const staticCacheName = 'site-static-v1';
const staticCacheName = 'site-static-v1'; // IMPORTANT: CHANGE THE VERSION IN THIS NAME EVERY TIME THE APP IS DEPLOYED ON SERVER WITH CHANGES!!!
const assets = [
'./',
'/index.html',
@@ -66,7 +66,7 @@ self.addEventListener('install', evt => {
// activate event
self.addEventListener('activate', event => {
//delete any caches that aren't in expectedCaches
//which will get rid of site-static-v1
//which will get rid of site-static-v<n-1>
event.waitUntil(
caches.keys().then(keys => Promise.all(
keys.map(key => {

読み込み中…
キャンセル
保存