@nymphjs/tilmeld-setup 1.0.0-beta.8 → 1.0.0-beta.80

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,326 @@
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.80](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.79...v1.0.0-beta.80) (2024-09-28)
7
+
8
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
9
+
10
+ # [1.0.0-beta.79](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.78...v1.0.0-beta.79) (2024-09-28)
11
+
12
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
13
+
14
+ # [1.0.0-beta.78](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.77...v1.0.0-beta.78) (2024-09-27)
15
+
16
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
17
+
18
+ # [1.0.0-beta.77](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.76...v1.0.0-beta.77) (2024-09-26)
19
+
20
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
21
+
22
+ # [1.0.0-beta.76](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.75...v1.0.0-beta.76) (2024-09-25)
23
+
24
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
25
+
26
+ # [1.0.0-beta.75](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.74...v1.0.0-beta.75) (2024-09-24)
27
+
28
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
29
+
30
+ # [1.0.0-beta.74](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.73...v1.0.0-beta.74) (2024-09-21)
31
+
32
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
33
+
34
+ # [1.0.0-beta.73](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.72...v1.0.0-beta.73) (2024-09-20)
35
+
36
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
37
+
38
+ # [1.0.0-beta.72](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.71...v1.0.0-beta.72) (2024-09-20)
39
+
40
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
41
+
42
+ # [1.0.0-beta.71](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.70...v1.0.0-beta.71) (2024-09-20)
43
+
44
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
45
+
46
+ # [1.0.0-beta.70](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.69...v1.0.0-beta.70) (2024-09-20)
47
+
48
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
49
+
50
+ # [1.0.0-beta.69](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.68...v1.0.0-beta.69) (2024-09-19)
51
+
52
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
53
+
54
+ # [1.0.0-beta.68](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.67...v1.0.0-beta.68) (2024-09-19)
55
+
56
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
57
+
58
+ # [1.0.0-beta.67](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.66...v1.0.0-beta.67) (2024-09-03)
59
+
60
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
61
+
62
+ # [1.0.0-beta.66](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.65...v1.0.0-beta.66) (2024-08-06)
63
+
64
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
65
+
66
+ # [1.0.0-beta.65](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.64...v1.0.0-beta.65) (2024-08-05)
67
+
68
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
69
+
70
+ # [1.0.0-beta.64](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.63...v1.0.0-beta.64) (2024-08-04)
71
+
72
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
73
+
74
+ # [1.0.0-beta.63](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.62...v1.0.0-beta.63) (2024-06-18)
75
+
76
+ ### Bug Fixes
77
+
78
+ - undo ts compilation to module change ([84be6d4](https://github.com/sciactive/nymphjs/commit/84be6d434be29f8afd53907d15be2eb77d1736ce))
79
+
80
+ ### Features
81
+
82
+ - export data iterator ([b86aa19](https://github.com/sciactive/nymphjs/commit/b86aa19fc77d744b5a683046dfb697fc4746df5c))
83
+
84
+ # [1.0.0-beta.62](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.61...v1.0.0-beta.62) (2024-06-15)
85
+
86
+ ### Bug Fixes
87
+
88
+ - assign generated and default groups to users created through admin app ([7ea0baa](https://github.com/sciactive/nymphjs/commit/7ea0baaf3a2c1285a63ee95ec153f38c169af6b6))
89
+
90
+ # [1.0.0-beta.61](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.60...v1.0.0-beta.61) (2024-06-14)
91
+
92
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
93
+
94
+ # [1.0.0-beta.60](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.59...v1.0.0-beta.60) (2024-06-14)
95
+
96
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
97
+
98
+ # [1.0.0-beta.59](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.58...v1.0.0-beta.59) (2024-06-14)
99
+
100
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
101
+
102
+ # [1.0.0-beta.58](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.57...v1.0.0-beta.58) (2024-06-12)
103
+
104
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
105
+
106
+ # [1.0.0-beta.57](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.56...v1.0.0-beta.57) (2024-06-12)
107
+
108
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
109
+
110
+ # [1.0.0-beta.56](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.55...v1.0.0-beta.56) (2024-06-11)
111
+
112
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
113
+
114
+ # [1.0.0-beta.55](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.54...v1.0.0-beta.55) (2024-05-26)
115
+
116
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
117
+
118
+ # [1.0.0-beta.54](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.53...v1.0.0-beta.54) (2024-05-26)
119
+
120
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
121
+
122
+ # [1.0.0-beta.53](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.52...v1.0.0-beta.53) (2024-05-26)
123
+
124
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
125
+
126
+ # [1.0.0-beta.52](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.51...v1.0.0-beta.52) (2024-05-25)
127
+
128
+ ### Bug Fixes
129
+
130
+ - support setup app and users and groups when userFields is limited ([20e25a2](https://github.com/sciactive/nymphjs/commit/20e25a2bcc35f96b3146fd9d973e34083a85f854))
131
+
132
+ # [1.0.0-beta.51](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.50...v1.0.0-beta.51) (2024-04-12)
133
+
134
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
135
+
136
+ # [1.0.0-beta.50](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.49...v1.0.0-beta.50) (2024-04-08)
137
+
138
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
139
+
140
+ # [1.0.0-beta.49](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.48...v1.0.0-beta.49) (2024-03-04)
141
+
142
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
143
+
144
+ # [1.0.0-beta.48](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.47...v1.0.0-beta.48) (2023-11-10)
145
+
146
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
147
+
148
+ # [1.0.0-beta.47](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.46...v1.0.0-beta.47) (2023-11-10)
149
+
150
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
151
+
152
+ # [1.0.0-beta.46](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.45...v1.0.0-beta.46) (2023-08-29)
153
+
154
+ ### Features
155
+
156
+ - enable tilmeld admins to remove totp secret from users ([18455b3](https://github.com/sciactive/nymphjs/commit/18455b3edbbfa1188f8cf317438bbfa028ba8f47))
157
+
158
+ # [1.0.0-beta.45](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.44...v1.0.0-beta.45) (2023-07-17)
159
+
160
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
161
+
162
+ # [1.0.0-beta.44](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.43...v1.0.0-beta.44) (2023-07-13)
163
+
164
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
165
+
166
+ # [1.0.0-beta.43](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.42...v1.0.0-beta.43) (2023-07-12)
167
+
168
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
169
+
170
+ # [1.0.0-beta.42](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.41...v1.0.0-beta.42) (2023-07-12)
171
+
172
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
173
+
174
+ # [1.0.0-beta.41](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.40...v1.0.0-beta.41) (2023-07-12)
175
+
176
+ ### Features
177
+
178
+ - remove synchronous database queries ([b579fb2](https://github.com/sciactive/nymphjs/commit/b579fb2eacd96cdd1b386a62c5c00cdbb2438f6e))
179
+ - rewrite server side async api to match client side api ([9c537a8](https://github.com/sciactive/nymphjs/commit/9c537a8be49e9b989af0822a4c2236e8c2d20f87))
180
+
181
+ # [1.0.0-beta.40](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.39...v1.0.0-beta.40) (2023-07-10)
182
+
183
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
184
+
185
+ # [1.0.0-beta.39](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.38...v1.0.0-beta.39) (2023-07-09)
186
+
187
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
188
+
189
+ # [1.0.0-beta.38](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.37...v1.0.0-beta.38) (2023-07-09)
190
+
191
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
192
+
193
+ # [1.0.0-beta.37](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.36...v1.0.0-beta.37) (2023-07-09)
194
+
195
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
196
+
197
+ # [1.0.0-beta.36](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.35...v1.0.0-beta.36) (2023-07-09)
198
+
199
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
200
+
201
+ # [1.0.0-beta.35](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.34...v1.0.0-beta.35) (2023-06-14)
202
+
203
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
204
+
205
+ # [1.0.0-beta.34](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.33...v1.0.0-beta.34) (2023-05-13)
206
+
207
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
208
+
209
+ # [1.0.0-beta.33](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.32...v1.0.0-beta.33) (2023-05-13)
210
+
211
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
212
+
213
+ # [1.0.0-beta.32](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.31...v1.0.0-beta.32) (2023-05-13)
214
+
215
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
216
+
217
+ # [1.0.0-beta.31](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.30...v1.0.0-beta.31) (2023-05-12)
218
+
219
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
220
+
221
+ # [1.0.0-beta.30](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.29...v1.0.0-beta.30) (2023-05-12)
222
+
223
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
224
+
225
+ # [1.0.0-beta.29](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.28...v1.0.0-beta.29) (2023-05-08)
226
+
227
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
228
+
229
+ # [1.0.0-beta.28](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.27...v1.0.0-beta.28) (2023-05-05)
230
+
231
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
232
+
233
+ # [1.0.0-beta.27](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.26...v1.0.0-beta.27) (2023-05-04)
234
+
235
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
236
+
237
+ # [1.0.0-beta.26](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.25...v1.0.0-beta.26) (2023-05-04)
238
+
239
+ ### Features
240
+
241
+ - update packages and migrate to mysql2 ([72ad611](https://github.com/sciactive/nymphjs/commit/72ad611bd2bf7bf85c3ba8a3486503d9b50c49d6))
242
+
243
+ # [1.0.0-beta.25](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.24...v1.0.0-beta.25) (2023-05-04)
244
+
245
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
246
+
247
+ # [1.0.0-beta.24](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.23...v1.0.0-beta.24) (2023-05-02)
248
+
249
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
250
+
251
+ # [1.0.0-beta.23](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.22...v1.0.0-beta.23) (2023-05-02)
252
+
253
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
254
+
255
+ # [1.0.0-beta.22](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.21...v1.0.0-beta.22) (2023-05-01)
256
+
257
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
258
+
259
+ # [1.0.0-beta.21](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.20...v1.0.0-beta.21) (2023-05-01)
260
+
261
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
262
+
263
+ # [1.0.0-beta.20](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.19...v1.0.0-beta.20) (2023-04-30)
264
+
265
+ ### Features
266
+
267
+ - let the user revoke all current auth tokens ([63af3b9](https://github.com/sciactive/nymphjs/commit/63af3b9a31c6c221ab40c2c8a69231675f4634a2))
268
+
269
+ # [1.0.0-beta.19](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.18...v1.0.0-beta.19) (2023-04-29)
270
+
271
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
272
+
273
+ # [1.0.0-beta.18](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.17...v1.0.0-beta.18) (2023-04-27)
274
+
275
+ ### Bug Fixes
276
+
277
+ - small type issues ([b91579c](https://github.com/sciactive/nymphjs/commit/b91579c9c1e96500d903332648f5a93c9a7e7d9b))
278
+
279
+ ### Features
280
+
281
+ - add enforceTilmeld function ([130faf1](https://github.com/sciactive/nymphjs/commit/130faf151dcdfbfacd6814833868907dca037d24))
282
+ - add the ability to switch to a user without their password ([ca4466a](https://github.com/sciactive/nymphjs/commit/ca4466af1704d68905ac087350a8cf151c1072d9))
283
+
284
+ # [1.0.0-beta.17](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.16...v1.0.0-beta.17) (2023-04-24)
285
+
286
+ ### Features
287
+
288
+ - add spa router to user admin app ([25bb344](https://github.com/sciactive/nymphjs/commit/25bb344f4d358eeb2254df98782f1cba229b5f50))
289
+
290
+ # [1.0.0-beta.16](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.15...v1.0.0-beta.16) (2023-03-31)
291
+
292
+ ### Features
293
+
294
+ - add ability to tell tilmeld to log in a specific user during authentication ([922e145](https://github.com/sciactive/nymphjs/commit/922e1452adae44bed2aa9655be16e19796acb39b))
295
+
296
+ # [1.0.0-beta.15](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2023-03-23)
297
+
298
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
299
+
300
+ # [1.0.0-beta.14](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2023-03-17)
301
+
302
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
303
+
304
+ # [1.0.0-beta.13](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2023-03-16)
305
+
306
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
307
+
308
+ # [1.0.0-beta.12](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2023-03-04)
309
+
310
+ ### Bug Fixes
311
+
312
+ - make sure all default exports are also named exports ([06da9a6](https://github.com/sciactive/nymphjs/commit/06da9a61d444860f70b7f5b95b824547d9880500))
313
+
314
+ # [1.0.0-beta.11](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2023-02-27)
315
+
316
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
317
+
318
+ # [1.0.0-beta.10](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.9...v1.0.0-beta.10) (2023-01-19)
319
+
320
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
321
+
322
+ # [1.0.0-beta.9](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.8...v1.0.0-beta.9) (2023-01-09)
323
+
324
+ **Note:** Version bump only for package @nymphjs/tilmeld-setup
325
+
6
326
  # [1.0.0-beta.8](https://github.com/sciactive/nymphjs/compare/v1.0.0-beta.7...v1.0.0-beta.8) (2023-01-09)
7
327
 
8
328
  ### 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.
@@ -53,15 +53,16 @@ const app = express();
53
53
 
54
54
  // Use the REST server.
55
55
  app.use('/rest', createServer(nymph));
56
- // Use the Tilmeld Setup App, passing in the Nymph Client Config.
56
+
57
+ // Create Tilmeld setup app.
57
58
  app.use(
58
59
  '/user',
59
60
  setup(
60
61
  {
61
62
  restUrl: 'http://localhost/rest',
62
63
  },
63
- nymph
64
- )
64
+ nymph,
65
+ ),
65
66
  );
66
67
 
67
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,20 +30,10 @@
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>
36
- <IconButton
37
- href="https://twitter.com/SciActive"
38
- target="_blank"
39
- rel="noreferrer"
40
- title="SciActive on Twitter"
41
- >
42
- <Icon component={Svg} viewBox="0 0 24 24">
43
- <path fill="currentColor" d={mdiTwitter} />
44
- </Icon>
45
- </IconButton>
46
37
  <div>
47
38
  <IconButton
48
39
  title="Account"
@@ -74,7 +65,7 @@
74
65
  : 'hide-initial-small'}"
75
66
  >
76
67
  <Content>
77
- <List>
68
+ <List tag="div">
78
69
  {#if tilmeldAdmin}
79
70
  {#each sections as section (section.name)}
80
71
  {#if 'separator' in section}
@@ -82,13 +73,14 @@
82
73
  {:else}
83
74
  <Item
84
75
  bind:this={section.component}
85
- nonInteractive={!('route' in section)}
86
- on:click={() => {
87
- if ('route' in section) {
88
- active = section.route ?? Intro;
89
- }
90
- }}
91
- activated={active === section.route}
76
+ tag="a"
77
+ nonInteractive={!('href' in section)}
78
+ href={'href' in section ? `#${section.href}` : undefined}
79
+ activated={section.absolute
80
+ ? `${currentMatch.route.path}/` === section.href
81
+ : `${currentMatch.route.path}/`.startsWith(
82
+ section.href ?? '!',
83
+ )}
92
84
  style={section.indent
93
85
  ? 'margin-left: ' + section.indent * 25 + 'px;'
94
86
  : ''}
@@ -98,11 +90,11 @@
98
90
  {/if}
99
91
  {/each}
100
92
  {:else if user == null}
101
- <Item on:click={() => (drawerOpen = false)} activated>
93
+ <Item tag="span" on:click={() => (drawerOpen = false)} activated>
102
94
  <Text class="mdc-theme--on-secondary">Login</Text>
103
95
  </Item>
104
96
  {:else}
105
- <Item on:click={() => (drawerOpen = false)} activated>
97
+ <Item tag="span" on:click={() => (drawerOpen = false)} activated>
106
98
  <Text class="mdc-theme--on-secondary">Forbidden</Text>
107
99
  </Item>
108
100
  {/if}
@@ -117,14 +109,20 @@
117
109
  <main class="tilmeld-main-content" bind:this={mainContent}>
118
110
  {#if tilmeldAdmin}
119
111
  {#if clientConfig}
120
- <svelte:component this={active} />
112
+ <svelte:component this={CurrentRoute} {router} {params} />
121
113
  {:else}
122
114
  Loading...
123
115
  {/if}
124
- {:else if user == null}
116
+ {:else if user === null}
125
117
  <section style="display: flex; justify-content: center;">
126
- <Login {User} {clientConfig} />
118
+ <Login
119
+ {User}
120
+ {clientConfig}
121
+ showExistingUserToggle={allowRegistration}
122
+ />
127
123
  </section>
124
+ {:else if user === undefined}
125
+ Loading...
128
126
  {:else}
129
127
  <section>You don't have permission to access this app.</section>
130
128
  {/if}
@@ -134,45 +132,44 @@
134
132
  </div>
135
133
 
136
134
  <script lang="ts">
137
- import { onMount, SvelteComponent } from 'svelte';
135
+ import type { ComponentType, SvelteComponent } from 'svelte';
136
+ import { onMount } from 'svelte';
137
+ import Navigo from 'navigo';
138
138
  import type {
139
139
  User as UserClass,
140
140
  ClientConfig,
141
141
  CurrentUserData,
142
142
  } from '@nymphjs/tilmeld-client';
143
143
  import { Login, Account } from '@nymphjs/tilmeld-components';
144
- import { mdiGithub, mdiMastodon, mdiTwitter } from '@mdi/js';
144
+ import { mdiGithub, mdiMastodon } from '@mdi/js';
145
145
  import TopAppBar, { Row, Section, Title } from '@smui/top-app-bar';
146
146
  import Drawer, { Content, Scrim, AppContent } from '@smui/drawer';
147
147
  import IconButton from '@smui/icon-button';
148
148
  import List, { Item, Text, Separator } from '@smui/list';
149
149
  import Menu from '@smui/menu';
150
- import { Icon, Svg } from '@smui/common';
150
+ import { Icon } from '@smui/common';
151
151
 
152
152
  import { User } from './nymph';
153
- import Intro from './Intro.svelte';
154
- import Users from './Users.svelte';
155
- import Groups from './Groups.svelte';
156
- import type { SvelteComponentDev } from 'svelte/internal';
153
+ import Intro from './routes/Intro.svelte';
154
+ import Users from './routes/Users.svelte';
155
+ import UserEdit from './routes/UserEdit.svelte';
156
+ import Groups from './routes/Groups.svelte';
157
+ import GroupEdit from './routes/GroupEdit.svelte';
158
+ import NotFound from './routes/NotFound.svelte';
157
159
 
158
160
  const DEFAULT_AVATAR = 'https://secure.gravatar.com/avatar/?d=mm&s=40';
161
+ const allowRegistration = (window as any).allowRegistration;
159
162
 
160
163
  let mainContent: HTMLElement;
161
164
  let miniWindow = false;
162
165
  let drawerOpen = false;
163
166
  let accountMenu: any;
164
- let active: typeof SvelteComponentDev = Intro;
165
167
  let clientConfig: ClientConfig;
166
- let user: (UserClass & CurrentUserData) | undefined = undefined;
168
+ let user: (UserClass & CurrentUserData) | null | undefined = undefined;
167
169
  let userAvatar: string = DEFAULT_AVATAR;
168
170
  let tilmeldAdmin: boolean | undefined = undefined;
169
171
  let accountOpen = false;
170
172
 
171
- $: if (active && mainContent) {
172
- drawerOpen = false;
173
- mainContent.scrollTop = 0;
174
- }
175
-
176
173
  $: if (user) {
177
174
  user.$gatekeeper('tilmeld/admin').then((value) => (tilmeldAdmin = value));
178
175
  user.$getAvatar().then((value) => (userAvatar = value));
@@ -181,18 +178,80 @@
181
178
  userAvatar = DEFAULT_AVATAR;
182
179
  }
183
180
 
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();
240
+
184
241
  const sections: (
185
242
  | {
186
243
  name: string;
187
244
  indent: number;
188
- route?: typeof SvelteComponentDev;
245
+ href?: string;
246
+ absolute?: boolean;
189
247
  component?: SvelteComponent;
190
248
  }
191
249
  | { name: string; separator: true }
192
250
  )[] = [
193
251
  {
194
252
  name: 'Introduction',
195
- route: Intro,
253
+ href: '/',
254
+ absolute: true,
196
255
  indent: 0,
197
256
  },
198
257
  {
@@ -201,12 +260,12 @@
201
260
  },
202
261
  {
203
262
  name: 'Users',
204
- route: Users,
263
+ href: 'users/',
205
264
  indent: 0,
206
265
  },
207
266
  {
208
267
  name: 'Groups',
209
- route: Groups,
268
+ href: 'groups/',
210
269
  indent: 0,
211
270
  },
212
271
  ];
@@ -215,17 +274,17 @@
215
274
  user = currentUser;
216
275
  };
217
276
  const onLogout = () => {
218
- user = undefined;
277
+ user = null;
219
278
  };
220
279
 
221
280
  onMount(setMiniWindow);
222
281
  onMount(async () => {
223
282
  User.on('login', onLogin);
224
283
  User.on('logout', onLogout);
225
- user = (await User.current()) ?? undefined;
226
- });
227
- onMount(async () => {
284
+
228
285
  clientConfig = await User.getClientConfig();
286
+
287
+ user = await User.current();
229
288
  });
230
289
 
231
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);