@nymphjs/tilmeld-setup 1.0.0-beta.46 → 1.0.0-beta.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.0.0-beta.48](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.47...v1.0.0-beta.48) (2023-11-10)
7
+
8
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
9
+
10
+ # [1.0.0-beta.47](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.46...v1.0.0-beta.47) (2023-11-10)
11
+
12
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
13
+
6
14
  # [1.0.0-beta.46](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.45...v1.0.0-beta.46) (2023-08-29)
7
15
 
8
16
  ### Features
package/README.md CHANGED
@@ -45,7 +45,7 @@ const nymph = new Nymph(
45
45
  verifyChangeRedirect: 'http://localhost',
46
46
  cancelChangeRedirect: 'http://localhost',
47
47
  jwtSecret: 'shhhhh',
48
- })
48
+ }),
49
49
  );
50
50
 
51
51
  // Create your Express app.
@@ -61,8 +61,8 @@ app.use(
61
61
  {
62
62
  restUrl: 'http://localhost/rest',
63
63
  },
64
- nymph
65
- )
64
+ nymph,
65
+ ),
66
66
  );
67
67
 
68
68
  // Do anything else you need to do...
package/app/index.ts CHANGED
@@ -1,6 +1,10 @@
1
1
  import App from './src/App.svelte';
2
2
 
3
- const app = new App({ target: document.getElementById('app') as HTMLElement });
3
+ document.addEventListener('DOMContentLoaded', () => {
4
+ const app = new App({
5
+ target: document.getElementById('app') as HTMLElement,
6
+ });
4
7
 
5
- // Helps with admin and debugging.
6
- (window as any).app = app;
8
+ // Helps with admin and debugging.
9
+ (window as any).app = app;
10
+ });
@@ -1,4 +1,5 @@
1
1
  <svelte:window on:resize={setMiniWindow} />
2
+
2
3
  <TopAppBar variant="static" class="tilmeld-top-app-bar">
3
4
  <Row>
4
5
  <Section>
@@ -19,7 +20,7 @@
19
20
  rel="noreferrer"
20
21
  title="Nymph/Tilmeld on GitHub"
21
22
  >
22
- <Icon component={Svg} viewBox="0 0 24 24">
23
+ <Icon tag="svg" viewBox="0 0 24 24">
23
24
  <path fill="currentColor" d={mdiGithub} />
24
25
  </Icon>
25
26
  </IconButton>
@@ -29,7 +30,7 @@
29
30
  rel="noreferrer"
30
31
  title="SciActive on Mastodon"
31
32
  >
32
- <Icon component={Svg} viewBox="0 0 24 24">
33
+ <Icon tag="svg" viewBox="0 0 24 24">
33
34
  <path fill="currentColor" d={mdiMastodon} />
34
35
  </Icon>
35
36
  </IconButton>
@@ -76,8 +77,10 @@
76
77
  nonInteractive={!('href' in section)}
77
78
  href={'href' in section ? `#${section.href}` : undefined}
78
79
  activated={section.absolute
79
- ? $location === section.href
80
- : $location.startsWith(section.href ?? '!')}
80
+ ? `${currentMatch.route.path}/` === section.href
81
+ : `${currentMatch.route.path}/`.startsWith(
82
+ section.href ?? '!',
83
+ )}
81
84
  style={section.indent
82
85
  ? 'margin-left: ' + section.indent * 25 + 'px;'
83
86
  : ''}
@@ -106,11 +109,11 @@
106
109
  <main class="tilmeld-main-content" bind:this={mainContent}>
107
110
  {#if tilmeldAdmin}
108
111
  {#if clientConfig}
109
- <Router {routes} />
112
+ <svelte:component this={CurrentRoute} {router} {params} />
110
113
  {:else}
111
114
  Loading...
112
115
  {/if}
113
- {:else if user == null}
116
+ {:else if user === null}
114
117
  <section style="display: flex; justify-content: center;">
115
118
  <Login
116
119
  {User}
@@ -118,6 +121,8 @@
118
121
  showExistingUserToggle={allowRegistration}
119
122
  />
120
123
  </section>
124
+ {:else if user === undefined}
125
+ Loading...
121
126
  {:else}
122
127
  <section>You don't have permission to access this app.</section>
123
128
  {/if}
@@ -127,8 +132,9 @@
127
132
  </div>
128
133
 
129
134
  <script lang="ts">
130
- import { onMount, SvelteComponent } from 'svelte';
131
- import Router, { location } from 'svelte-spa-router';
135
+ import type { ComponentType, SvelteComponent } from 'svelte';
136
+ import { onMount } from 'svelte';
137
+ import Navigo from 'navigo';
132
138
  import type {
133
139
  User as UserClass,
134
140
  ClientConfig,
@@ -141,7 +147,7 @@
141
147
  import IconButton from '@smui/icon-button';
142
148
  import List, { Item, Text, Separator } from '@smui/list';
143
149
  import Menu from '@smui/menu';
144
- import { Icon, Svg } from '@smui/common';
150
+ import { Icon } from '@smui/common';
145
151
 
146
152
  import { User } from './nymph';
147
153
  import Intro from './routes/Intro.svelte';
@@ -159,18 +165,11 @@
159
165
  let drawerOpen = false;
160
166
  let accountMenu: any;
161
167
  let clientConfig: ClientConfig;
162
- let user: (UserClass & CurrentUserData) | undefined = undefined;
168
+ let user: (UserClass & CurrentUserData) | null | undefined = undefined;
163
169
  let userAvatar: string = DEFAULT_AVATAR;
164
170
  let tilmeldAdmin: boolean | undefined = undefined;
165
171
  let accountOpen = false;
166
172
 
167
- location.subscribe(() => {
168
- if (mainContent) {
169
- drawerOpen = false;
170
- mainContent.scrollTop = 0;
171
- }
172
- });
173
-
174
173
  $: if (user) {
175
174
  user.$gatekeeper('tilmeld/admin').then((value) => (tilmeldAdmin = value));
176
175
  user.$getAvatar().then((value) => (userAvatar = value));
@@ -179,14 +178,65 @@
179
178
  userAvatar = DEFAULT_AVATAR;
180
179
  }
181
180
 
182
- const routes = {
183
- '/': Intro,
184
- '/users/edit/:guid': UserEdit,
185
- '/users/:query?': Users,
186
- '/groups/edit/:guid': GroupEdit,
187
- '/groups/:query?': Groups,
188
- '*': NotFound,
189
- };
181
+ const router = new Navigo('/', { hash: true });
182
+ let CurrentRoute: ComponentType<SvelteComponent> = Intro;
183
+ let params: any = {};
184
+
185
+ router.hooks({
186
+ before(done, match) {
187
+ if (mainContent) {
188
+ drawerOpen = false;
189
+ mainContent.scrollTop = 0;
190
+ }
191
+
192
+ currentMatch = match;
193
+
194
+ done();
195
+ },
196
+ });
197
+
198
+ router.on({
199
+ '/': () => {
200
+ CurrentRoute = Intro;
201
+ params = {};
202
+ },
203
+ '/users/edit/:guid': ({ data }: any) => {
204
+ CurrentRoute = UserEdit;
205
+ params = data;
206
+ },
207
+ '/users/': () => {
208
+ CurrentRoute = Users;
209
+ params = {};
210
+ },
211
+ '/users/:query?': ({ data }: any) => {
212
+ CurrentRoute = Users;
213
+ params = data;
214
+ },
215
+ '/groups/edit/:guid': ({ data }: any) => {
216
+ CurrentRoute = GroupEdit;
217
+ params = data;
218
+ },
219
+ '/groups/': () => {
220
+ CurrentRoute = Groups;
221
+ params = {};
222
+ },
223
+ '/groups/:query?': ({ data }: any) => {
224
+ CurrentRoute = Groups;
225
+ params = data;
226
+ },
227
+ });
228
+
229
+ router.notFound(({ hashString }: any) => {
230
+ if (hashString === '') {
231
+ router.navigate('/', { historyAPIMethod: 'replaceState' });
232
+ } else {
233
+ CurrentRoute = NotFound;
234
+ params = {};
235
+ }
236
+ });
237
+
238
+ let currentMatch = router.getCurrentLocation();
239
+ router.resolve();
190
240
 
191
241
  const sections: (
192
242
  | {
@@ -210,12 +260,12 @@
210
260
  },
211
261
  {
212
262
  name: 'Users',
213
- href: '/users/',
263
+ href: 'users/',
214
264
  indent: 0,
215
265
  },
216
266
  {
217
267
  name: 'Groups',
218
- href: '/groups/',
268
+ href: 'groups/',
219
269
  indent: 0,
220
270
  },
221
271
  ];
@@ -224,17 +274,17 @@
224
274
  user = currentUser;
225
275
  };
226
276
  const onLogout = () => {
227
- user = undefined;
277
+ user = null;
228
278
  };
229
279
 
230
280
  onMount(setMiniWindow);
231
281
  onMount(async () => {
232
282
  User.on('login', onLogin);
233
283
  User.on('logout', onLogout);
234
- user = (await User.current()) ?? undefined;
235
- });
236
- onMount(async () => {
284
+
237
285
  clientConfig = await User.getClientConfig();
286
+
287
+ user = await User.current();
238
288
  });
239
289
 
240
290
  function setMiniWindow() {
package/app/src/nymph.ts CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  } from '@nymphjs/tilmeld-client';
7
7
 
8
8
  const nymph = new Nymph(
9
- (window as unknown as { nymphOptions: NymphOptions }).nymphOptions
9
+ (window as unknown as { nymphOptions: NymphOptions }).nymphOptions,
10
10
  );
11
11
  const User = nymph.addEntityClass(UserClass);
12
12
  const Group = nymph.addEntityClass(GroupClass);
@@ -6,8 +6,11 @@
6
6
  </section>
7
7
  {:else}
8
8
  <div style="display: flex; align-items: center; padding: 12px;">
9
- <IconButton title="Back" on:click={pop}>
10
- <Icon component={Svg} viewBox="0 0 24 24">
9
+ <IconButton
10
+ title="Back"
11
+ on:click={() => router.navigate('', { historyAPIMethod: 'back' })}
12
+ >
13
+ <Icon tag="svg" viewBox="0 0 24 24">
11
14
  <path fill="currentColor" d={mdiArrowLeft} />
12
15
  </Icon>
13
16
  </IconButton>
@@ -183,7 +186,7 @@
183
186
  entity = entity;
184
187
  }}
185
188
  >
186
- <Icon component={Svg} viewBox="0 0 24 24">
189
+ <Icon tag="svg" viewBox="0 0 24 24">
187
190
  <path fill="currentColor" d={mdiMinus} />
188
191
  </Icon>
189
192
  </IconButton>
@@ -194,7 +197,7 @@
194
197
 
195
198
  <div class="solo-search-container solo-container">
196
199
  <Paper class="solo-paper" elevation={1}>
197
- <Icon class="solo-icon" component={Svg} viewBox="0 0 24 24">
200
+ <Icon class="solo-icon" tag="svg" viewBox="0 0 24 24">
198
201
  <path fill="currentColor" d={mdiMagnify} />
199
202
  </Icon>
200
203
  <Input
@@ -210,7 +213,7 @@
210
213
  class="solo-fab"
211
214
  title="Search"
212
215
  >
213
- <Icon component={Svg} viewBox="0 0 24 24">
216
+ <Icon tag="svg" viewBox="0 0 24 24">
214
217
  <path fill="currentColor" d={mdiArrowRight} />
215
218
  </Icon>
216
219
  </IconButton>
@@ -271,7 +274,7 @@
271
274
  entity = entity;
272
275
  }}
273
276
  >
274
- <Icon component={Svg} viewBox="0 0 24 24">
277
+ <Icon tag="svg" viewBox="0 0 24 24">
275
278
  <path fill="currentColor" d={mdiMinus} />
276
279
  </Icon>
277
280
  </IconButton>
@@ -296,7 +299,7 @@
296
299
  on:keydown={abilityKeyDown}
297
300
  />
298
301
  <IconButton on:click={addAbility}>
299
- <Icon component={Svg} viewBox="0 0 24 24">
302
+ <Icon tag="svg" viewBox="0 0 24 24">
300
303
  <path fill="currentColor" d={mdiPlus} />
301
304
  </Icon>
302
305
  </IconButton>
@@ -327,7 +330,7 @@
327
330
 
328
331
  <script lang="ts">
329
332
  import { onMount } from 'svelte';
330
- import { pop, replace } from 'svelte-spa-router';
333
+ import type Navigo from 'navigo';
331
334
  import type {
332
335
  AdminGroupData,
333
336
  ClientConfig,
@@ -358,10 +361,11 @@
358
361
  import HelperText from '@smui/textfield/helper-text';
359
362
  import IconButton from '@smui/icon-button';
360
363
  import Button from '@smui/button';
361
- import { Icon, Label, Svg } from '@smui/common';
364
+ import { Icon, Label } from '@smui/common';
362
365
 
363
366
  import { nymph, Group, User } from '../nymph';
364
367
 
368
+ export let router: Navigo;
365
369
  export let params: { guid: string };
366
370
 
367
371
  let entity: GroupClass & AdminGroupData;
@@ -562,7 +566,10 @@
562
566
  await readyEntity();
563
567
  success = true;
564
568
  if (newEntity) {
565
- replace(`/groups/edit/${encodeURIComponent(entity.guid || '')}`);
569
+ router.navigate(
570
+ `/groups/edit/${encodeURIComponent(entity.guid || '')}`,
571
+ { historyAPIMethod: 'replaceState' },
572
+ );
566
573
  }
567
574
  setTimeout(() => {
568
575
  success = undefined;
@@ -583,7 +590,7 @@
583
590
  saving = true;
584
591
  try {
585
592
  if (await entity.$delete()) {
586
- pop();
593
+ router.navigate('', { historyAPIMethod: 'back' });
587
594
  } else {
588
595
  failureMessage = 'An error occurred.';
589
596
  }
@@ -13,12 +13,12 @@
13
13
  class="solo-fab"
14
14
  title="New Group"
15
15
  >
16
- <Icon component={Svg} viewBox="0 0 24 24">
16
+ <Icon tag="svg" viewBox="0 0 24 24">
17
17
  <path fill="currentColor" d={mdiPlus} />
18
18
  </Icon>
19
19
  </Fab>
20
20
  <Paper class="solo-paper" elevation={6}>
21
- <Icon class="solo-icon" component={Svg} viewBox="0 0 24 24">
21
+ <Icon class="solo-icon" tag="svg" viewBox="0 0 24 24">
22
22
  <path fill="currentColor" d={mdiMagnify} />
23
23
  </Icon>
24
24
  <Input
@@ -36,7 +36,7 @@
36
36
  class="solo-fab"
37
37
  title="Search"
38
38
  >
39
- <Icon component={Svg} viewBox="0 0 24 24">
39
+ <Icon tag="svg" viewBox="0 0 24 24">
40
40
  <path fill="currentColor" d={mdiArrowRight} />
41
41
  </Icon>
42
42
  </Fab>
@@ -71,7 +71,7 @@
71
71
  <Cell
72
72
  ><a
73
73
  href="#/groups/edit/{encodeURIComponent(
74
- curEntity.guid || ''
74
+ curEntity.guid || '',
75
75
  )}">{curEntity.groupname}</a
76
76
  ></Cell
77
77
  >
@@ -79,14 +79,14 @@
79
79
  <Cell
80
80
  ><a
81
81
  href="#/groups/edit/{encodeURIComponent(
82
- curEntity.guid || ''
82
+ curEntity.guid || '',
83
83
  )}">{curEntity.name}</a
84
84
  ></Cell
85
85
  >
86
86
  <Cell
87
87
  ><a
88
88
  href="#/groups/edit/{encodeURIComponent(
89
- curEntity.guid || ''
89
+ curEntity.guid || '',
90
90
  )}">{curEntity.email}</a
91
91
  ></Cell
92
92
  >
@@ -107,7 +107,7 @@
107
107
 
108
108
  <script lang="ts">
109
109
  import { onMount } from 'svelte';
110
- import { push } from 'svelte-spa-router';
110
+ import type Navigo from 'navigo';
111
111
  import queryParser from '@nymphjs/query-parser';
112
112
  import type {
113
113
  AdminGroupData,
@@ -124,10 +124,11 @@
124
124
  import DataTable, { Head, Body, Row, Cell } from '@smui/data-table';
125
125
  import { Input } from '@smui/textfield';
126
126
  import Fab from '@smui/fab';
127
- import { Icon, Svg } from '@smui/common';
127
+ import { Icon } from '@smui/common';
128
128
 
129
129
  import { nymph, Group, User } from '../nymph';
130
130
 
131
+ export let router: Navigo;
131
132
  export let params: { query?: string } = {};
132
133
 
133
134
  let clientConfig: ClientConfig | undefined = undefined;
@@ -177,7 +178,7 @@
177
178
  let entitiesSearching = false;
178
179
  let entities: (GroupClass & AdminGroupData)[] | undefined = undefined;
179
180
  async function searchEntities() {
180
- push(`/groups/${encodeURIComponent(entitySearch)}`);
181
+ router.navigate(`/groups/${encodeURIComponent(entitySearch)}`);
181
182
  }
182
183
  function entitySearchKeyDown(event: CustomEvent | KeyboardEvent) {
183
184
  event = event as KeyboardEvent;
@@ -6,8 +6,11 @@
6
6
  </section>
7
7
  {:else}
8
8
  <div style="display: flex; align-items: center; padding: 12px;">
9
- <IconButton title="Back" on:click={pop}>
10
- <Icon component={Svg} viewBox="0 0 24 24">
9
+ <IconButton
10
+ title="Back"
11
+ on:click={() => router.navigate('', { historyAPIMethod: 'back' })}
12
+ >
13
+ <Icon tag="svg" viewBox="0 0 24 24">
11
14
  <path fill="currentColor" d={mdiArrowLeft} />
12
15
  </Icon>
13
16
  </IconButton>
@@ -171,7 +174,7 @@
171
174
  entity = entity;
172
175
  }}
173
176
  >
174
- <Icon component={Svg} viewBox="0 0 24 24">
177
+ <Icon tag="svg" viewBox="0 0 24 24">
175
178
  <path fill="currentColor" d={mdiMinus} />
176
179
  </Icon>
177
180
  </IconButton>
@@ -182,7 +185,7 @@
182
185
 
183
186
  <div class="solo-search-container solo-container">
184
187
  <Paper class="solo-paper" elevation={1}>
185
- <Icon class="solo-icon" component={Svg} viewBox="0 0 24 24">
188
+ <Icon class="solo-icon" tag="svg" viewBox="0 0 24 24">
186
189
  <path fill="currentColor" d={mdiMagnify} />
187
190
  </Icon>
188
191
  <Input
@@ -198,7 +201,7 @@
198
201
  class="solo-fab"
199
202
  title="Search"
200
203
  >
201
- <Icon component={Svg} viewBox="0 0 24 24">
204
+ <Icon tag="svg" viewBox="0 0 24 24">
202
205
  <path fill="currentColor" d={mdiArrowRight} />
203
206
  </Icon>
204
207
  </IconButton>
@@ -266,7 +269,7 @@
266
269
  <Cell
267
270
  ><a
268
271
  href="#/groups/edit/{encodeURIComponent(
269
- curEntity.guid || ''
272
+ curEntity.guid || '',
270
273
  )}">{curEntity.groupname}</a
271
274
  ></Cell
272
275
  >
@@ -274,14 +277,14 @@
274
277
  <Cell
275
278
  ><a
276
279
  href="#/groups/edit/{encodeURIComponent(
277
- curEntity.guid || ''
280
+ curEntity.guid || '',
278
281
  )}">{curEntity.name}</a
279
282
  ></Cell
280
283
  >
281
284
  <Cell
282
285
  ><a
283
286
  href="#/groups/edit/{encodeURIComponent(
284
- curEntity.guid || ''
287
+ curEntity.guid || '',
285
288
  )}">{curEntity.email}</a
286
289
  ></Cell
287
290
  >
@@ -293,7 +296,7 @@
293
296
  entity = entity;
294
297
  }}
295
298
  >
296
- <Icon component={Svg} viewBox="0 0 24 24">
299
+ <Icon tag="svg" viewBox="0 0 24 24">
297
300
  <path fill="currentColor" d={mdiMinus} />
298
301
  </Icon>
299
302
  </IconButton>
@@ -314,7 +317,7 @@
314
317
 
315
318
  <div class="solo-search-container solo-container">
316
319
  <Paper class="solo-paper" elevation={1}>
317
- <Icon class="solo-icon" component={Svg} viewBox="0 0 24 24">
320
+ <Icon class="solo-icon" tag="svg" viewBox="0 0 24 24">
318
321
  <path fill="currentColor" d={mdiMagnify} />
319
322
  </Icon>
320
323
  <Input
@@ -330,7 +333,7 @@
330
333
  class="solo-fab"
331
334
  title="Search"
332
335
  >
333
- <Icon component={Svg} viewBox="0 0 24 24">
336
+ <Icon tag="svg" viewBox="0 0 24 24">
334
337
  <path fill="currentColor" d={mdiArrowRight} />
335
338
  </Icon>
336
339
  </IconButton>
@@ -395,7 +398,7 @@
395
398
  entity = entity;
396
399
  }}
397
400
  >
398
- <Icon component={Svg} viewBox="0 0 24 24">
401
+ <Icon tag="svg" viewBox="0 0 24 24">
399
402
  <path fill="currentColor" d={mdiMinus} />
400
403
  </Icon>
401
404
  </IconButton>
@@ -420,7 +423,7 @@
420
423
  on:keydown={abilityKeyDown}
421
424
  />
422
425
  <IconButton on:click={addAbility}>
423
- <Icon component={Svg} viewBox="0 0 24 24">
426
+ <Icon tag="svg" viewBox="0 0 24 24">
424
427
  <path fill="currentColor" d={mdiPlus} />
425
428
  </Icon>
426
429
  </IconButton>
@@ -651,7 +654,7 @@
651
654
  <span>Successfully saved!</span>
652
655
  {/if}
653
656
  </div>
654
- {#if tilmeldSwitchUser && !entity.$is(user)}
657
+ {#if tilmeldSwitchUser && entity.guid && !entity.$is(user)}
655
658
  <div>
656
659
  <Button
657
660
  on:click={() => {
@@ -687,7 +690,7 @@
687
690
  <Button action="cancel">
688
691
  <Label>Cancel</Label>
689
692
  </Button>
690
- <Button action="switch" default>
693
+ <Button action="switch">
691
694
  <Label>Switch</Label>
692
695
  </Button>
693
696
  </Actions>
@@ -695,7 +698,7 @@
695
698
 
696
699
  <script lang="ts">
697
700
  import { onMount } from 'svelte';
698
- import { pop, replace } from 'svelte-spa-router';
701
+ import type Navigo from 'navigo';
699
702
  import type {
700
703
  AdminGroupData,
701
704
  AdminUserData,
@@ -728,10 +731,11 @@
728
731
  import IconButton from '@smui/icon-button';
729
732
  import Button from '@smui/button';
730
733
  import Dialog, { Title, Content, Actions } from '@smui/dialog';
731
- import { Icon, Label, Svg } from '@smui/common';
734
+ import { Icon, Label } from '@smui/common';
732
735
 
733
736
  import { User, Group } from '../nymph';
734
737
 
738
+ export let router: Navigo;
735
739
  export let params: { guid: string };
736
740
 
737
741
  let entity: UserClass & AdminUserData;
@@ -881,7 +885,7 @@
881
885
  primaryGroups = (await Group.getPrimaryGroups(options, selectors)).filter(
882
886
  (group) => {
883
887
  return !group.$is(entity.group);
884
- }
888
+ },
885
889
  );
886
890
  } catch (e: any) {
887
891
  failureMessage = e?.message;
@@ -1059,7 +1063,10 @@
1059
1063
  success = true;
1060
1064
  passwordVerify = '';
1061
1065
  if (newEntity) {
1062
- replace(`/users/edit/${encodeURIComponent(entity.guid || '')}`);
1066
+ router.navigate(
1067
+ `/users/edit/${encodeURIComponent(entity.guid || '')}`,
1068
+ { historyAPIMethod: 'replaceState' },
1069
+ );
1063
1070
  }
1064
1071
  setTimeout(() => {
1065
1072
  success = undefined;
@@ -1080,7 +1087,7 @@
1080
1087
  saving = true;
1081
1088
  try {
1082
1089
  if (await entity.$delete()) {
1083
- pop();
1090
+ router.navigate('', { historyAPIMethod: 'back' });
1084
1091
  } else {
1085
1092
  failureMessage = 'An error occurred.';
1086
1093
  }
@@ -1092,7 +1099,7 @@
1092
1099
  }
1093
1100
 
1094
1101
  async function switchUserDialogCloseHandler(
1095
- e: CustomEvent<{ action: string }>
1102
+ e: CustomEvent<{ action: string }>,
1096
1103
  ) {
1097
1104
  if (e.detail.action === 'switch') {
1098
1105
  saving = true;