@gradio/core 1.1.1 → 1.1.3
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 +55 -0
- package/dist/src/Blocks.svelte +21 -8
- package/dist/src/Embed.svelte +5 -5
- package/dist/src/Login.svelte +6 -3
- package/package.json +61 -61
- package/src/Blocks.svelte +21 -8
- package/src/Embed.svelte +5 -5
- package/src/Login.svelte +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,60 @@
|
|
|
1
1
|
# @gradio/core
|
|
2
2
|
|
|
3
|
+
## 1.1.3
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- [#12817](https://github.com/gradio-app/gradio/pull/12817) [`05acc66`](https://github.com/gradio-app/gradio/commit/05acc6627de866db6a742e0540c2733041d76a86) - Fix Login. Thanks @freddyaboulton!
|
|
8
|
+
|
|
9
|
+
### Dependency updates
|
|
10
|
+
|
|
11
|
+
- @gradio/atoms@0.21.0
|
|
12
|
+
- @gradio/client@2.0.4
|
|
13
|
+
- @gradio/statustracker@0.12.3
|
|
14
|
+
- @gradio/file@0.14.2
|
|
15
|
+
- @gradio/image@0.25.2
|
|
16
|
+
- @gradio/upload@0.17.5
|
|
17
|
+
- @gradio/video@0.20.2
|
|
18
|
+
- @gradio/textbox@0.13.3
|
|
19
|
+
- @gradio/checkbox@0.6.2
|
|
20
|
+
- @gradio/audio@0.22.2
|
|
21
|
+
- @gradio/gallery@0.17.0
|
|
22
|
+
- @gradio/plot@0.10.3
|
|
23
|
+
- @gradio/dropdown@0.11.3
|
|
24
|
+
|
|
25
|
+
## 1.1.2
|
|
26
|
+
|
|
27
|
+
### Fixes
|
|
28
|
+
|
|
29
|
+
- [#12800](https://github.com/gradio-app/gradio/pull/12800) [`7a1c321`](https://github.com/gradio-app/gradio/commit/7a1c321b6546ba05a353488f5133e8262c4a8a39) - Bump svelte/kit for security reasons. Thanks @freddyaboulton!
|
|
30
|
+
- [#12757](https://github.com/gradio-app/gradio/pull/12757) [`6d9c2d7`](https://github.com/gradio-app/gradio/commit/6d9c2d7d81e4b0936c15fac2eae9e7640ab22777) - Migrate Textbox to Svelte 5. Thanks @dawoodkhan82!
|
|
31
|
+
- [#12607](https://github.com/gradio-app/gradio/pull/12607) [`299728b`](https://github.com/gradio-app/gradio/commit/299728b707c88e7afbc6a60f1f266a9013fa424d) - fix: add ARIA landmarks for accessibility. Thanks @majiayu000!
|
|
32
|
+
|
|
33
|
+
### Dependency updates
|
|
34
|
+
|
|
35
|
+
- @gradio/button@0.6.3
|
|
36
|
+
- @gradio/code@0.17.1
|
|
37
|
+
- @gradio/paramviewer@0.9.2
|
|
38
|
+
- @gradio/statustracker@0.12.2
|
|
39
|
+
- @gradio/tabitem@0.6.5
|
|
40
|
+
- @gradio/tabs@0.5.5
|
|
41
|
+
- @gradio/atoms@0.20.1
|
|
42
|
+
- @gradio/column@0.3.2
|
|
43
|
+
- @gradio/utils@0.11.2
|
|
44
|
+
- @gradio/icons@0.15.1
|
|
45
|
+
- @gradio/upload@0.17.4
|
|
46
|
+
- @gradio/client@2.0.3
|
|
47
|
+
- @gradio/image@0.25.1
|
|
48
|
+
- @gradio/gallery@0.16.2
|
|
49
|
+
- @gradio/plot@0.10.2
|
|
50
|
+
- @gradio/theme@0.6.1
|
|
51
|
+
- @gradio/textbox@0.13.2
|
|
52
|
+
- @gradio/dropdown@0.11.2
|
|
53
|
+
- @gradio/checkbox@0.6.1
|
|
54
|
+
- @gradio/file@0.14.1
|
|
55
|
+
- @gradio/video@0.20.1
|
|
56
|
+
- @gradio/audio@0.22.1
|
|
57
|
+
|
|
3
58
|
## 1.1.1
|
|
4
59
|
|
|
5
60
|
### Features
|
package/dist/src/Blocks.svelte
CHANGED
|
@@ -445,17 +445,20 @@
|
|
|
445
445
|
</svelte:head>
|
|
446
446
|
|
|
447
447
|
<div class="wrap" style:min-height={app_mode ? "100%" : "auto"}>
|
|
448
|
-
<
|
|
448
|
+
<main
|
|
449
449
|
class="contain"
|
|
450
450
|
style:flex-grow={app_mode ? "1" : "auto"}
|
|
451
451
|
bind:this={root_container}
|
|
452
452
|
style:margin-right={vibe_mode ? `${vibe_editor_width}px` : "0"}
|
|
453
453
|
>
|
|
454
454
|
<MountComponents node={app_tree.root} />
|
|
455
|
-
</
|
|
455
|
+
</main>
|
|
456
456
|
|
|
457
457
|
{#if footer_links.length > 0}
|
|
458
|
-
<footer
|
|
458
|
+
<footer
|
|
459
|
+
bind:clientHeight={footer_height}
|
|
460
|
+
aria-label="Gradio footer navigation"
|
|
461
|
+
>
|
|
459
462
|
{#if footer_links.includes("api")}
|
|
460
463
|
<button
|
|
461
464
|
on:click={() => {
|
|
@@ -537,7 +540,12 @@
|
|
|
537
540
|
{/if}
|
|
538
541
|
|
|
539
542
|
{#if api_docs_visible && app_tree.root && ApiDocs}
|
|
540
|
-
<div
|
|
543
|
+
<div
|
|
544
|
+
class="api-docs"
|
|
545
|
+
role="dialog"
|
|
546
|
+
aria-modal="true"
|
|
547
|
+
aria-label={$reactive_formatter("errors.use_via_api")}
|
|
548
|
+
>
|
|
541
549
|
<!-- TODO: fix -->
|
|
542
550
|
<!-- svelte-ignore a11y-click-events-have-key-events-->
|
|
543
551
|
<!-- svelte-ignore a11y-no-static-element-interactions-->
|
|
@@ -547,7 +555,7 @@
|
|
|
547
555
|
set_api_docs_visible(false);
|
|
548
556
|
}}
|
|
549
557
|
/>
|
|
550
|
-
<div class="api-docs-wrap">
|
|
558
|
+
<div class="api-docs-wrap" role="document">
|
|
551
559
|
<svelte:component
|
|
552
560
|
this={ApiDocs}
|
|
553
561
|
root_node={app_tree.root}
|
|
@@ -570,7 +578,12 @@
|
|
|
570
578
|
{/if}
|
|
571
579
|
|
|
572
580
|
{#if settings_visible && app.config && app_tree.root && Settings}
|
|
573
|
-
<div
|
|
581
|
+
<div
|
|
582
|
+
class="api-docs"
|
|
583
|
+
role="dialog"
|
|
584
|
+
aria-modal="true"
|
|
585
|
+
aria-label={$reactive_formatter("common.settings")}
|
|
586
|
+
>
|
|
574
587
|
<!-- TODO: fix -->
|
|
575
588
|
<!-- svelte-ignore a11y-click-events-have-key-events-->
|
|
576
589
|
<!-- svelte-ignore a11y-no-static-element-interactions-->
|
|
@@ -580,7 +593,7 @@
|
|
|
580
593
|
set_settings_visible(false);
|
|
581
594
|
}}
|
|
582
595
|
/>
|
|
583
|
-
<div class="api-docs-wrap">
|
|
596
|
+
<div class="api-docs-wrap" role="document">
|
|
584
597
|
<svelte:component
|
|
585
598
|
this={Settings}
|
|
586
599
|
bind:allow_zoom
|
|
@@ -619,7 +632,7 @@
|
|
|
619
632
|
font-size: var(--body-text-size);
|
|
620
633
|
}
|
|
621
634
|
|
|
622
|
-
.contain {
|
|
635
|
+
main.contain {
|
|
623
636
|
display: flex;
|
|
624
637
|
flex-direction: column;
|
|
625
638
|
}
|
package/dist/src/Embed.svelte
CHANGED
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
</nav>
|
|
129
129
|
</div>
|
|
130
130
|
{/if}
|
|
131
|
-
<
|
|
131
|
+
<div class="main fillable" class:fill_width class:app={!display && !is_embed}>
|
|
132
132
|
<slot />
|
|
133
133
|
<div>
|
|
134
134
|
{#if display && space && info}
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
</div>
|
|
154
154
|
{/if}
|
|
155
155
|
</div>
|
|
156
|
-
</
|
|
156
|
+
</div>
|
|
157
157
|
</div>
|
|
158
158
|
|
|
159
159
|
<style>
|
|
@@ -201,11 +201,11 @@
|
|
|
201
201
|
padding-bottom: var(--size-7);
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
.embed-container > main {
|
|
204
|
+
.embed-container > .main {
|
|
205
205
|
padding: var(--size-4);
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
main {
|
|
208
|
+
.main {
|
|
209
209
|
display: flex;
|
|
210
210
|
flex-grow: 1;
|
|
211
211
|
flex-direction: column;
|
|
@@ -327,7 +327,7 @@
|
|
|
327
327
|
height: 12px;
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
-
main a:hover {
|
|
330
|
+
.main a:hover {
|
|
331
331
|
text-decoration: underline;
|
|
332
332
|
}
|
|
333
333
|
</style>
|
package/dist/src/Login.svelte
CHANGED
|
@@ -19,7 +19,10 @@
|
|
|
19
19
|
formData.append("username", username);
|
|
20
20
|
formData.append("password", password);
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
// Use URL constructor to properly join paths and avoid double slashes
|
|
23
|
+
const login_url = new URL("login", root.endsWith("/") ? root : root + "/")
|
|
24
|
+
.href;
|
|
25
|
+
let response = await fetch(login_url, {
|
|
23
26
|
method: "POST",
|
|
24
27
|
body: formData
|
|
25
28
|
});
|
|
@@ -54,7 +57,7 @@
|
|
|
54
57
|
lines={1}
|
|
55
58
|
show_label={true}
|
|
56
59
|
max_lines={1}
|
|
57
|
-
|
|
60
|
+
onsubmit={submit}
|
|
58
61
|
bind:value={username}
|
|
59
62
|
/>
|
|
60
63
|
</Block>
|
|
@@ -66,7 +69,7 @@
|
|
|
66
69
|
show_label={true}
|
|
67
70
|
max_lines={1}
|
|
68
71
|
type="password"
|
|
69
|
-
|
|
72
|
+
onsubmit={submit}
|
|
70
73
|
bind:value={password}
|
|
71
74
|
/>
|
|
72
75
|
</Block>
|
package/package.json
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradio/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"devDependencies": {
|
|
6
|
-
"@gradio/
|
|
7
|
-
"@gradio/annotatedimage": "^0.11.
|
|
8
|
-
"@gradio/
|
|
9
|
-
"@gradio/
|
|
10
|
-
"@gradio/
|
|
11
|
-
"@gradio/
|
|
12
|
-
"@gradio/
|
|
13
|
-
"@gradio/checkbox": "^0.6.
|
|
14
|
-
"@gradio/
|
|
15
|
-
"@gradio/
|
|
16
|
-
"@gradio/
|
|
17
|
-
"@gradio/
|
|
18
|
-
"@gradio/
|
|
19
|
-
"@gradio/
|
|
20
|
-
"@gradio/
|
|
21
|
-
"@gradio/
|
|
22
|
-
"@gradio/
|
|
23
|
-
"@gradio/downloadbutton": "^0.4.
|
|
24
|
-
"@gradio/dropdown": "^0.11.
|
|
25
|
-
"@gradio/fallback": "^0.4.
|
|
26
|
-
"@gradio/fileexplorer": "^0.6.
|
|
27
|
-
"@gradio/
|
|
28
|
-
"@gradio/
|
|
29
|
-
"@gradio/
|
|
30
|
-
"@gradio/
|
|
31
|
-
"@gradio/
|
|
32
|
-
"@gradio/
|
|
33
|
-
"@gradio/
|
|
34
|
-
"@gradio/
|
|
35
|
-
"@gradio/
|
|
36
|
-
"@gradio/
|
|
37
|
-
"@gradio/
|
|
38
|
-
"@gradio/
|
|
39
|
-
"@gradio/
|
|
40
|
-
"@gradio/
|
|
41
|
-
"@gradio/multimodaltextbox": "^0.11.
|
|
42
|
-
"@gradio/nativeplot": "^0.
|
|
43
|
-
"@gradio/number": "^0.8.
|
|
44
|
-
"@gradio/
|
|
45
|
-
"@gradio/
|
|
46
|
-
"@gradio/
|
|
47
|
-
"@gradio/
|
|
48
|
-
"@gradio/sidebar": "^0.2.
|
|
49
|
-
"@gradio/
|
|
50
|
-
"@gradio/simpleimage": "^0.9.
|
|
51
|
-
"@gradio/simpletextbox": "^0.3.
|
|
52
|
-
"@gradio/
|
|
53
|
-
"@gradio/
|
|
54
|
-
"@gradio/
|
|
55
|
-
"@gradio/
|
|
56
|
-
"@gradio/
|
|
57
|
-
"@gradio/
|
|
58
|
-
"@gradio/theme": "^0.6.
|
|
59
|
-
"@gradio/
|
|
60
|
-
"@gradio/
|
|
61
|
-
"@gradio/
|
|
62
|
-
"@gradio/
|
|
63
|
-
"@gradio/
|
|
64
|
-
"@gradio/video": "^0.20.
|
|
6
|
+
"@gradio/atoms": "^0.21.0",
|
|
7
|
+
"@gradio/annotatedimage": "^0.11.2",
|
|
8
|
+
"@gradio/audio": "^0.22.2",
|
|
9
|
+
"@gradio/box": "^0.2.29",
|
|
10
|
+
"@gradio/accordion": "^0.5.30",
|
|
11
|
+
"@gradio/browserstate": "^0.3.6",
|
|
12
|
+
"@gradio/button": "^0.6.3",
|
|
13
|
+
"@gradio/checkbox": "^0.6.2",
|
|
14
|
+
"@gradio/checkboxgroup": "^0.9.2",
|
|
15
|
+
"@gradio/code": "^0.17.2",
|
|
16
|
+
"@gradio/colorpicker": "^0.5.5",
|
|
17
|
+
"@gradio/client": "^2.0.4",
|
|
18
|
+
"@gradio/column": "^0.3.2",
|
|
19
|
+
"@gradio/chatbot": "^0.29.3",
|
|
20
|
+
"@gradio/dataframe": "^0.21.4",
|
|
21
|
+
"@gradio/datetime": "^0.4.2",
|
|
22
|
+
"@gradio/dataset": "^0.5.3",
|
|
23
|
+
"@gradio/downloadbutton": "^0.4.17",
|
|
24
|
+
"@gradio/dropdown": "^0.11.3",
|
|
25
|
+
"@gradio/fallback": "^0.4.33",
|
|
26
|
+
"@gradio/fileexplorer": "^0.6.2",
|
|
27
|
+
"@gradio/form": "^0.2.30",
|
|
28
|
+
"@gradio/file": "^0.14.2",
|
|
29
|
+
"@gradio/gallery": "^0.17.0",
|
|
30
|
+
"@gradio/group": "^0.3.2",
|
|
31
|
+
"@gradio/highlightedtext": "^0.11.1",
|
|
32
|
+
"@gradio/html": "^0.9.2",
|
|
33
|
+
"@gradio/icons": "^0.15.1",
|
|
34
|
+
"@gradio/image": "^0.25.2",
|
|
35
|
+
"@gradio/imageeditor": "^0.18.5",
|
|
36
|
+
"@gradio/imageslider": "^0.4.2",
|
|
37
|
+
"@gradio/json": "^0.7.1",
|
|
38
|
+
"@gradio/markdown": "^0.13.27",
|
|
39
|
+
"@gradio/label": "^0.6.2",
|
|
40
|
+
"@gradio/model3d": "^0.16.3",
|
|
41
|
+
"@gradio/multimodaltextbox": "^0.11.5",
|
|
42
|
+
"@gradio/nativeplot": "^0.10.1",
|
|
43
|
+
"@gradio/number": "^0.8.2",
|
|
44
|
+
"@gradio/paramviewer": "^0.9.3",
|
|
45
|
+
"@gradio/radio": "^0.9.2",
|
|
46
|
+
"@gradio/plot": "^0.10.3",
|
|
47
|
+
"@gradio/simpledropdown": "^0.3.33",
|
|
48
|
+
"@gradio/sidebar": "^0.2.2",
|
|
49
|
+
"@gradio/row": "^0.3.1",
|
|
50
|
+
"@gradio/simpleimage": "^0.9.4",
|
|
51
|
+
"@gradio/simpletextbox": "^0.3.35",
|
|
52
|
+
"@gradio/slider": "^0.7.4",
|
|
53
|
+
"@gradio/state": "^0.2.2",
|
|
54
|
+
"@gradio/statustracker": "^0.12.3",
|
|
55
|
+
"@gradio/tabitem": "^0.6.5",
|
|
56
|
+
"@gradio/tabs": "^0.5.5",
|
|
57
|
+
"@gradio/textbox": "^0.13.3",
|
|
58
|
+
"@gradio/theme": "^0.6.1",
|
|
59
|
+
"@gradio/upload": "^0.17.5",
|
|
60
|
+
"@gradio/timer": "^0.4.8",
|
|
61
|
+
"@gradio/utils": "^0.11.2",
|
|
62
|
+
"@gradio/uploadbutton": "^0.9.17",
|
|
63
|
+
"@gradio/vibeeditor": "^0.3.4",
|
|
64
|
+
"@gradio/video": "^0.20.2"
|
|
65
65
|
},
|
|
66
66
|
"msw": {
|
|
67
67
|
"workerDirectory": "public"
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
|
-
"svelte": "^5.
|
|
94
|
+
"svelte": "^5.48.0"
|
|
95
95
|
},
|
|
96
96
|
"main": "./index.ts",
|
|
97
97
|
"repository": {
|
package/src/Blocks.svelte
CHANGED
|
@@ -445,17 +445,20 @@
|
|
|
445
445
|
</svelte:head>
|
|
446
446
|
|
|
447
447
|
<div class="wrap" style:min-height={app_mode ? "100%" : "auto"}>
|
|
448
|
-
<
|
|
448
|
+
<main
|
|
449
449
|
class="contain"
|
|
450
450
|
style:flex-grow={app_mode ? "1" : "auto"}
|
|
451
451
|
bind:this={root_container}
|
|
452
452
|
style:margin-right={vibe_mode ? `${vibe_editor_width}px` : "0"}
|
|
453
453
|
>
|
|
454
454
|
<MountComponents node={app_tree.root} />
|
|
455
|
-
</
|
|
455
|
+
</main>
|
|
456
456
|
|
|
457
457
|
{#if footer_links.length > 0}
|
|
458
|
-
<footer
|
|
458
|
+
<footer
|
|
459
|
+
bind:clientHeight={footer_height}
|
|
460
|
+
aria-label="Gradio footer navigation"
|
|
461
|
+
>
|
|
459
462
|
{#if footer_links.includes("api")}
|
|
460
463
|
<button
|
|
461
464
|
on:click={() => {
|
|
@@ -537,7 +540,12 @@
|
|
|
537
540
|
{/if}
|
|
538
541
|
|
|
539
542
|
{#if api_docs_visible && app_tree.root && ApiDocs}
|
|
540
|
-
<div
|
|
543
|
+
<div
|
|
544
|
+
class="api-docs"
|
|
545
|
+
role="dialog"
|
|
546
|
+
aria-modal="true"
|
|
547
|
+
aria-label={$reactive_formatter("errors.use_via_api")}
|
|
548
|
+
>
|
|
541
549
|
<!-- TODO: fix -->
|
|
542
550
|
<!-- svelte-ignore a11y-click-events-have-key-events-->
|
|
543
551
|
<!-- svelte-ignore a11y-no-static-element-interactions-->
|
|
@@ -547,7 +555,7 @@
|
|
|
547
555
|
set_api_docs_visible(false);
|
|
548
556
|
}}
|
|
549
557
|
/>
|
|
550
|
-
<div class="api-docs-wrap">
|
|
558
|
+
<div class="api-docs-wrap" role="document">
|
|
551
559
|
<svelte:component
|
|
552
560
|
this={ApiDocs}
|
|
553
561
|
root_node={app_tree.root}
|
|
@@ -570,7 +578,12 @@
|
|
|
570
578
|
{/if}
|
|
571
579
|
|
|
572
580
|
{#if settings_visible && app.config && app_tree.root && Settings}
|
|
573
|
-
<div
|
|
581
|
+
<div
|
|
582
|
+
class="api-docs"
|
|
583
|
+
role="dialog"
|
|
584
|
+
aria-modal="true"
|
|
585
|
+
aria-label={$reactive_formatter("common.settings")}
|
|
586
|
+
>
|
|
574
587
|
<!-- TODO: fix -->
|
|
575
588
|
<!-- svelte-ignore a11y-click-events-have-key-events-->
|
|
576
589
|
<!-- svelte-ignore a11y-no-static-element-interactions-->
|
|
@@ -580,7 +593,7 @@
|
|
|
580
593
|
set_settings_visible(false);
|
|
581
594
|
}}
|
|
582
595
|
/>
|
|
583
|
-
<div class="api-docs-wrap">
|
|
596
|
+
<div class="api-docs-wrap" role="document">
|
|
584
597
|
<svelte:component
|
|
585
598
|
this={Settings}
|
|
586
599
|
bind:allow_zoom
|
|
@@ -619,7 +632,7 @@
|
|
|
619
632
|
font-size: var(--body-text-size);
|
|
620
633
|
}
|
|
621
634
|
|
|
622
|
-
.contain {
|
|
635
|
+
main.contain {
|
|
623
636
|
display: flex;
|
|
624
637
|
flex-direction: column;
|
|
625
638
|
}
|
package/src/Embed.svelte
CHANGED
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
</nav>
|
|
129
129
|
</div>
|
|
130
130
|
{/if}
|
|
131
|
-
<
|
|
131
|
+
<div class="main fillable" class:fill_width class:app={!display && !is_embed}>
|
|
132
132
|
<slot />
|
|
133
133
|
<div>
|
|
134
134
|
{#if display && space && info}
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
</div>
|
|
154
154
|
{/if}
|
|
155
155
|
</div>
|
|
156
|
-
</
|
|
156
|
+
</div>
|
|
157
157
|
</div>
|
|
158
158
|
|
|
159
159
|
<style>
|
|
@@ -201,11 +201,11 @@
|
|
|
201
201
|
padding-bottom: var(--size-7);
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
.embed-container > main {
|
|
204
|
+
.embed-container > .main {
|
|
205
205
|
padding: var(--size-4);
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
main {
|
|
208
|
+
.main {
|
|
209
209
|
display: flex;
|
|
210
210
|
flex-grow: 1;
|
|
211
211
|
flex-direction: column;
|
|
@@ -327,7 +327,7 @@
|
|
|
327
327
|
height: 12px;
|
|
328
328
|
}
|
|
329
329
|
|
|
330
|
-
main a:hover {
|
|
330
|
+
.main a:hover {
|
|
331
331
|
text-decoration: underline;
|
|
332
332
|
}
|
|
333
333
|
</style>
|
package/src/Login.svelte
CHANGED
|
@@ -19,7 +19,10 @@
|
|
|
19
19
|
formData.append("username", username);
|
|
20
20
|
formData.append("password", password);
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
// Use URL constructor to properly join paths and avoid double slashes
|
|
23
|
+
const login_url = new URL("login", root.endsWith("/") ? root : root + "/")
|
|
24
|
+
.href;
|
|
25
|
+
let response = await fetch(login_url, {
|
|
23
26
|
method: "POST",
|
|
24
27
|
body: formData
|
|
25
28
|
});
|
|
@@ -54,7 +57,7 @@
|
|
|
54
57
|
lines={1}
|
|
55
58
|
show_label={true}
|
|
56
59
|
max_lines={1}
|
|
57
|
-
|
|
60
|
+
onsubmit={submit}
|
|
58
61
|
bind:value={username}
|
|
59
62
|
/>
|
|
60
63
|
</Block>
|
|
@@ -66,7 +69,7 @@
|
|
|
66
69
|
show_label={true}
|
|
67
70
|
max_lines={1}
|
|
68
71
|
type="password"
|
|
69
|
-
|
|
72
|
+
onsubmit={submit}
|
|
70
73
|
bind:value={password}
|
|
71
74
|
/>
|
|
72
75
|
</Block>
|