@turnipxenon/pineapple 2.4.64 → 2.4.66
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/.idea/workspace.xml +42 -35
- package/.svelte-kit/__package__/components/PineappleSlideToggle.svelte +7 -7
- package/.svelte-kit/__package__/components/navigation_component/NavigationComponent.svelte +2 -1
- package/.svelte-kit/__package__/components/navigation_component/NavigationComponent.svelte.d.ts +1 -0
- package/.svelte-kit/__package__/template/seaweed/CreateUrlForm.svelte +28 -28
- package/.svelte-kit/generated/server/internal.js +1 -1
- package/dist/components/PineappleSlideToggle.svelte +7 -7
- package/dist/components/navigation_component/NavigationComponent.svelte +2 -1
- package/dist/components/navigation_component/NavigationComponent.svelte.d.ts +1 -0
- package/dist/template/seaweed/CreateUrlForm.svelte +28 -28
- package/package.json +1 -1
- package/src/lib/components/PineappleSlideToggle.svelte +12 -12
- package/src/lib/components/navigation_component/NavigationComponent.svelte +2 -2
- package/src/lib/template/seaweed/CreateUrlForm.svelte +69 -69
package/.idea/workspace.xml
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<option name="autoReloadType" value="SELECTIVE" />
|
|
5
5
|
</component>
|
|
6
6
|
<component name="ChangeListManager">
|
|
7
|
-
<list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="CreateUrlForm" comment="
|
|
7
|
+
<list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="CreateUrlForm" comment="Add hideable upper controls for NavigationComponent">
|
|
8
8
|
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
|
9
9
|
</list>
|
|
10
10
|
<option name="SHOW_DIALOG" value="false" />
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
<option value="EntryOrderConfig" />
|
|
51
51
|
<option value="ComboBox" />
|
|
52
52
|
<option value="ComboBoxWithButton" />
|
|
53
|
-
<option value="CSS File" />
|
|
54
53
|
<option value="RandomComponent" />
|
|
55
54
|
<option value="UrlShortenerForm" />
|
|
56
55
|
<option value="TypeScript File" />
|
|
57
56
|
<option value="PineappleSlideToggle" />
|
|
58
57
|
<option value="PostCSS File" />
|
|
58
|
+
<option value="CSS File" />
|
|
59
59
|
</list>
|
|
60
60
|
</option>
|
|
61
61
|
</component>
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"git-widget-placeholder": "turnip/dev",
|
|
120
120
|
"ignore.virus.scanning.warn.message": "true",
|
|
121
121
|
"last_opened_file_path": "C:/Users/Pumpkin/Projects/Web/pineapple",
|
|
122
|
-
"list.type.of.created.stylesheet": "
|
|
122
|
+
"list.type.of.created.stylesheet": "CSS",
|
|
123
123
|
"node.js.detected.package.eslint": "true",
|
|
124
124
|
"node.js.detected.package.tslint": "true",
|
|
125
125
|
"node.js.selected.package.eslint": "(autodetect)",
|
|
@@ -147,11 +147,11 @@
|
|
|
147
147
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(extra-pages)\page3\page5" />
|
|
148
148
|
</key>
|
|
149
149
|
<key name="MoveFile.RECENT_KEYS">
|
|
150
|
+
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\components\pineapple-slide-toggle" />
|
|
150
151
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\components\chip" />
|
|
151
152
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\components\combo_box" />
|
|
152
153
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\docs\archive" />
|
|
153
154
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(pineapple)" />
|
|
154
|
-
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(nested)" />
|
|
155
155
|
</key>
|
|
156
156
|
<key name="es6.move.members.recent.items">
|
|
157
157
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\types\RootLayoutProps.ts" />
|
|
@@ -340,31 +340,14 @@
|
|
|
340
340
|
<workItem from="1712570296984" duration="1559000" />
|
|
341
341
|
<workItem from="1712571884570" duration="7000" />
|
|
342
342
|
<workItem from="1712636226857" duration="11130000" />
|
|
343
|
-
<workItem from="1712648417963" duration="
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
<
|
|
347
|
-
<
|
|
348
|
-
<
|
|
349
|
-
<
|
|
350
|
-
<
|
|
351
|
-
<updated>1712373195354</updated>
|
|
352
|
-
</task>
|
|
353
|
-
<task id="LOCAL-00133" summary="Add kudos to 0gust1 Add kudos to 0gust1 for documenting how to deploy sveltekit app on Azure App service">
|
|
354
|
-
<option name="closed" value="true" />
|
|
355
|
-
<created>1712377506353</created>
|
|
356
|
-
<option name="number" value="00133" />
|
|
357
|
-
<option name="presentableId" value="LOCAL-00133" />
|
|
358
|
-
<option name="project" value="LOCAL" />
|
|
359
|
-
<updated>1712377506354</updated>
|
|
360
|
-
</task>
|
|
361
|
-
<task id="LOCAL-00134" summary="Correct app_build_command in Azure SWA GithubActions app_build_command by default runs npm install when it should be running yarn install">
|
|
362
|
-
<option name="closed" value="true" />
|
|
363
|
-
<created>1712380208456</created>
|
|
364
|
-
<option name="number" value="00134" />
|
|
365
|
-
<option name="presentableId" value="LOCAL-00134" />
|
|
366
|
-
<option name="project" value="LOCAL" />
|
|
367
|
-
<updated>1712380208458</updated>
|
|
343
|
+
<workItem from="1712648417963" duration="7073000" />
|
|
344
|
+
<workItem from="1712712655154" duration="1564000" />
|
|
345
|
+
<workItem from="1712751593565" duration="273000" />
|
|
346
|
+
<workItem from="1712756759276" duration="4000" />
|
|
347
|
+
<workItem from="1712756828446" duration="499000" />
|
|
348
|
+
<workItem from="1712757929028" duration="266000" />
|
|
349
|
+
<workItem from="1712759920412" duration="16000" />
|
|
350
|
+
<workItem from="1712761439292" duration="310000" />
|
|
368
351
|
</task>
|
|
369
352
|
<task id="LOCAL-00135" summary="Add resolutions to use Node 20 in Azure SWA GithubActions">
|
|
370
353
|
<option name="closed" value="true" />
|
|
@@ -734,7 +717,31 @@
|
|
|
734
717
|
<option name="project" value="LOCAL" />
|
|
735
718
|
<updated>1712654142877</updated>
|
|
736
719
|
</task>
|
|
737
|
-
<
|
|
720
|
+
<task id="LOCAL-00181" summary="Add border for slider toggle during light mode">
|
|
721
|
+
<option name="closed" value="true" />
|
|
722
|
+
<created>1712713161412</created>
|
|
723
|
+
<option name="number" value="00181" />
|
|
724
|
+
<option name="presentableId" value="LOCAL-00181" />
|
|
725
|
+
<option name="project" value="LOCAL" />
|
|
726
|
+
<updated>1712713161413</updated>
|
|
727
|
+
</task>
|
|
728
|
+
<task id="LOCAL-00182" summary="WIP attempt to fix slider">
|
|
729
|
+
<option name="closed" value="true" />
|
|
730
|
+
<created>1712713857855</created>
|
|
731
|
+
<option name="number" value="00182" />
|
|
732
|
+
<option name="presentableId" value="LOCAL-00182" />
|
|
733
|
+
<option name="project" value="LOCAL" />
|
|
734
|
+
<updated>1712713857855</updated>
|
|
735
|
+
</task>
|
|
736
|
+
<task id="LOCAL-00183" summary="Add hideable upper controls for NavigationComponent">
|
|
737
|
+
<option name="closed" value="true" />
|
|
738
|
+
<created>1712761479940</created>
|
|
739
|
+
<option name="number" value="00183" />
|
|
740
|
+
<option name="presentableId" value="LOCAL-00183" />
|
|
741
|
+
<option name="project" value="LOCAL" />
|
|
742
|
+
<updated>1712761479941</updated>
|
|
743
|
+
</task>
|
|
744
|
+
<option name="localTasksCounter" value="184" />
|
|
738
745
|
<servers />
|
|
739
746
|
</component>
|
|
740
747
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -772,7 +779,7 @@
|
|
|
772
779
|
<entry key="branch">
|
|
773
780
|
<value>
|
|
774
781
|
<list>
|
|
775
|
-
<option value="
|
|
782
|
+
<option value="main" />
|
|
776
783
|
</list>
|
|
777
784
|
</value>
|
|
778
785
|
</entry>
|
|
@@ -792,9 +799,6 @@
|
|
|
792
799
|
</option>
|
|
793
800
|
</component>
|
|
794
801
|
<component name="VcsManagerConfiguration">
|
|
795
|
-
<MESSAGE value="Add serverSideQueryParams and extraComponent in SeaweedTemplate" />
|
|
796
|
-
<MESSAGE value="Fix removeProxyWrapperOnString" />
|
|
797
|
-
<MESSAGE value="Remove unneeded script check in yarn build" />
|
|
798
802
|
<MESSAGE value="Fix yarn dependencies" />
|
|
799
803
|
<MESSAGE value="Support swappable group for backwards compatibility" />
|
|
800
804
|
<MESSAGE value="Add back gameSectionFirst behaviour" />
|
|
@@ -817,6 +821,9 @@
|
|
|
817
821
|
<MESSAGE value="Extract tailwind css utility class to local-chip" />
|
|
818
822
|
<MESSAGE value="Fix chip issue in Advanced Settings" />
|
|
819
823
|
<MESSAGE value="Remove tailwind reliance on Chip" />
|
|
820
|
-
<
|
|
824
|
+
<MESSAGE value="Add border for slider toggle during light mode" />
|
|
825
|
+
<MESSAGE value="WIP attempt to fix slider" />
|
|
826
|
+
<MESSAGE value="Add hideable upper controls for NavigationComponent" />
|
|
827
|
+
<option name="LAST_COMMIT_MESSAGE" value="Add hideable upper controls for NavigationComponent" />
|
|
821
828
|
</component>
|
|
822
829
|
</project>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script>export let checked = false;
|
|
2
2
|
export let name;
|
|
3
3
|
import { SlideToggle } from "@skeletonlabs/skeleton";
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<SlideToggle name={name}
|
|
7
|
-
background="bg-surface-700 dark:bg-surface-700"
|
|
8
|
-
bind:checked={checked}>
|
|
9
|
-
<slot />
|
|
10
|
-
</SlideToggle>
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<SlideToggle name={name}
|
|
7
|
+
background="bg-surface-700 dark:bg-surface-700"
|
|
8
|
+
bind:checked={checked}>
|
|
9
|
+
<slot />
|
|
10
|
+
</SlideToggle>
|
|
@@ -7,6 +7,7 @@ export let title = void 0;
|
|
|
7
7
|
export let imageMap = /* @__PURE__ */ new Map();
|
|
8
8
|
export let shouldAllowControl = true;
|
|
9
9
|
export let parentSubpath;
|
|
10
|
+
export let allowUpperControl;
|
|
10
11
|
export let compareFn = void 0;
|
|
11
12
|
export let pageSize = 5;
|
|
12
13
|
export let currentIndex = 0;
|
|
@@ -24,7 +25,7 @@ $:
|
|
|
24
25
|
</Card>
|
|
25
26
|
{/if}
|
|
26
27
|
|
|
27
|
-
{#if shouldAllowControl}
|
|
28
|
+
{#if allowUpperControl && shouldAllowControl}
|
|
28
29
|
<NavigationControl bind:currentIndex={currentIndex}
|
|
29
30
|
bind:contentLength={pageFlatList.length}
|
|
30
31
|
bind:pageSize={pageSize}></NavigationControl>
|
package/.svelte-kit/__package__/components/navigation_component/NavigationComponent.svelte.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ declare const __propDef: {
|
|
|
10
10
|
/**
|
|
11
11
|
* Should include a slash before and after the path
|
|
12
12
|
*/ parentSubpath: string;
|
|
13
|
+
allowUpperControl: boolean;
|
|
13
14
|
compareFn?: undefined | ParsePageMetaCompareFn;
|
|
14
15
|
pageSize?: number | undefined;
|
|
15
16
|
currentIndex?: number | undefined;
|
|
@@ -35,32 +35,32 @@ const post = () => {
|
|
|
35
35
|
toastStore.trigger(toastMap.get(properResp.result) ?? failToast);
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
|
-
</script>
|
|
39
|
-
|
|
40
|
-
<div class="local-list">
|
|
41
|
-
<label for="short-url">Short URL for url shortener</label>
|
|
42
|
-
<input bind:value={request.shortUrl}
|
|
43
|
-
name="short-url"
|
|
44
|
-
class="input"
|
|
45
|
-
type="text"
|
|
46
|
-
placeholder="short-url" />
|
|
47
|
-
<label for="password">Password</label>
|
|
48
|
-
<input bind:value={request.password}
|
|
49
|
-
name="password"
|
|
50
|
-
class="input"
|
|
51
|
-
type="password"
|
|
52
|
-
placeholder="ILoveTurnips" />
|
|
53
|
-
<button class="send-link btn variant-filled" on:click={post}>Send link</button>
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
<style>
|
|
57
|
-
.local-list {
|
|
58
|
-
display: flex;
|
|
59
|
-
flex-direction: column;
|
|
60
|
-
gap: 0.25lh;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.send-link {
|
|
64
|
-
margin-top: 0.75lh;
|
|
65
|
-
}
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<div class="local-list">
|
|
41
|
+
<label for="short-url">Short URL for url shortener</label>
|
|
42
|
+
<input bind:value={request.shortUrl}
|
|
43
|
+
name="short-url"
|
|
44
|
+
class="input"
|
|
45
|
+
type="text"
|
|
46
|
+
placeholder="short-url" />
|
|
47
|
+
<label for="password">Password</label>
|
|
48
|
+
<input bind:value={request.password}
|
|
49
|
+
name="password"
|
|
50
|
+
class="input"
|
|
51
|
+
type="password"
|
|
52
|
+
placeholder="ILoveTurnips" />
|
|
53
|
+
<button class="send-link btn variant-filled" on:click={post}>Send link</button>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<style>
|
|
57
|
+
.local-list {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
gap: 0.25lh;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.send-link {
|
|
64
|
+
margin-top: 0.75lh;
|
|
65
|
+
}
|
|
66
66
|
</style>
|
|
@@ -21,7 +21,7 @@ export const options = {
|
|
|
21
21
|
app: ({ head, body, assets, nonce, env }) => "<!DOCTYPE html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<link rel=\"icon\" href=\"" + assets + "/favicon.png\" />\n\t\t<meta name=\"viewport\" content=\"width=device-width\" />\n\t\t" + head + "\n\t</head>\n\n\t<body data-sveltekit-preload-data=\"hover\" data-theme=\"crimson\">\n\t\t<div style=\"display: contents\" class=\"h-full overflow-hidden\">" + body + "</div>\n\t</body>\n</html>\n",
|
|
22
22
|
error: ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<title>" + message + "</title>\n\n\t\t<style>\n\t\t\tbody {\n\t\t\t\t--bg: white;\n\t\t\t\t--fg: #222;\n\t\t\t\t--divider: #ccc;\n\t\t\t\tbackground: var(--bg);\n\t\t\t\tcolor: var(--fg);\n\t\t\t\tfont-family:\n\t\t\t\t\tsystem-ui,\n\t\t\t\t\t-apple-system,\n\t\t\t\t\tBlinkMacSystemFont,\n\t\t\t\t\t'Segoe UI',\n\t\t\t\t\tRoboto,\n\t\t\t\t\tOxygen,\n\t\t\t\t\tUbuntu,\n\t\t\t\t\tCantarell,\n\t\t\t\t\t'Open Sans',\n\t\t\t\t\t'Helvetica Neue',\n\t\t\t\t\tsans-serif;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t.error {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tmax-width: 32rem;\n\t\t\t\tmargin: 0 1rem;\n\t\t\t}\n\n\t\t\t.status {\n\t\t\t\tfont-weight: 200;\n\t\t\t\tfont-size: 3rem;\n\t\t\t\tline-height: 1;\n\t\t\t\tposition: relative;\n\t\t\t\ttop: -0.05rem;\n\t\t\t}\n\n\t\t\t.message {\n\t\t\t\tborder-left: 1px solid var(--divider);\n\t\t\t\tpadding: 0 0 0 1rem;\n\t\t\t\tmargin: 0 0 0 1rem;\n\t\t\t\tmin-height: 2.5rem;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t}\n\n\t\t\t.message h1 {\n\t\t\t\tfont-weight: 400;\n\t\t\t\tfont-size: 1em;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t@media (prefers-color-scheme: dark) {\n\t\t\t\tbody {\n\t\t\t\t\t--bg: #222;\n\t\t\t\t\t--fg: #ddd;\n\t\t\t\t\t--divider: #666;\n\t\t\t\t}\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<div class=\"error\">\n\t\t\t<span class=\"status\">" + status + "</span>\n\t\t\t<div class=\"message\">\n\t\t\t\t<h1>" + message + "</h1>\n\t\t\t</div>\n\t\t</div>\n\t</body>\n</html>\n"
|
|
23
23
|
},
|
|
24
|
-
version_hash: "
|
|
24
|
+
version_hash: "sdfwev"
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export async function get_hooks() {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script>export let checked = false;
|
|
2
2
|
export let name;
|
|
3
3
|
import { SlideToggle } from "@skeletonlabs/skeleton";
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<SlideToggle name={name}
|
|
7
|
-
background="bg-surface-700 dark:bg-surface-700"
|
|
8
|
-
bind:checked={checked}>
|
|
9
|
-
<slot />
|
|
10
|
-
</SlideToggle>
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<SlideToggle name={name}
|
|
7
|
+
background="bg-surface-700 dark:bg-surface-700"
|
|
8
|
+
bind:checked={checked}>
|
|
9
|
+
<slot />
|
|
10
|
+
</SlideToggle>
|
|
@@ -7,6 +7,7 @@ export let title = void 0;
|
|
|
7
7
|
export let imageMap = /* @__PURE__ */ new Map();
|
|
8
8
|
export let shouldAllowControl = true;
|
|
9
9
|
export let parentSubpath;
|
|
10
|
+
export let allowUpperControl;
|
|
10
11
|
export let compareFn = void 0;
|
|
11
12
|
export let pageSize = 5;
|
|
12
13
|
export let currentIndex = 0;
|
|
@@ -24,7 +25,7 @@ $:
|
|
|
24
25
|
</Card>
|
|
25
26
|
{/if}
|
|
26
27
|
|
|
27
|
-
{#if shouldAllowControl}
|
|
28
|
+
{#if allowUpperControl && shouldAllowControl}
|
|
28
29
|
<NavigationControl bind:currentIndex={currentIndex}
|
|
29
30
|
bind:contentLength={pageFlatList.length}
|
|
30
31
|
bind:pageSize={pageSize}></NavigationControl>
|
|
@@ -10,6 +10,7 @@ declare const __propDef: {
|
|
|
10
10
|
/**
|
|
11
11
|
* Should include a slash before and after the path
|
|
12
12
|
*/ parentSubpath: string;
|
|
13
|
+
allowUpperControl: boolean;
|
|
13
14
|
compareFn?: undefined | ParsePageMetaCompareFn;
|
|
14
15
|
pageSize?: number | undefined;
|
|
15
16
|
currentIndex?: number | undefined;
|
|
@@ -35,32 +35,32 @@ const post = () => {
|
|
|
35
35
|
toastStore.trigger(toastMap.get(properResp.result) ?? failToast);
|
|
36
36
|
});
|
|
37
37
|
};
|
|
38
|
-
</script>
|
|
39
|
-
|
|
40
|
-
<div class="local-list">
|
|
41
|
-
<label for="short-url">Short URL for url shortener</label>
|
|
42
|
-
<input bind:value={request.shortUrl}
|
|
43
|
-
name="short-url"
|
|
44
|
-
class="input"
|
|
45
|
-
type="text"
|
|
46
|
-
placeholder="short-url" />
|
|
47
|
-
<label for="password">Password</label>
|
|
48
|
-
<input bind:value={request.password}
|
|
49
|
-
name="password"
|
|
50
|
-
class="input"
|
|
51
|
-
type="password"
|
|
52
|
-
placeholder="ILoveTurnips" />
|
|
53
|
-
<button class="send-link btn variant-filled" on:click={post}>Send link</button>
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
<style>
|
|
57
|
-
.local-list {
|
|
58
|
-
display: flex;
|
|
59
|
-
flex-direction: column;
|
|
60
|
-
gap: 0.25lh;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.send-link {
|
|
64
|
-
margin-top: 0.75lh;
|
|
65
|
-
}
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<div class="local-list">
|
|
41
|
+
<label for="short-url">Short URL for url shortener</label>
|
|
42
|
+
<input bind:value={request.shortUrl}
|
|
43
|
+
name="short-url"
|
|
44
|
+
class="input"
|
|
45
|
+
type="text"
|
|
46
|
+
placeholder="short-url" />
|
|
47
|
+
<label for="password">Password</label>
|
|
48
|
+
<input bind:value={request.password}
|
|
49
|
+
name="password"
|
|
50
|
+
class="input"
|
|
51
|
+
type="password"
|
|
52
|
+
placeholder="ILoveTurnips" />
|
|
53
|
+
<button class="send-link btn variant-filled" on:click={post}>Send link</button>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<style>
|
|
57
|
+
.local-list {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
gap: 0.25lh;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.send-link {
|
|
64
|
+
margin-top: 0.75lh;
|
|
65
|
+
}
|
|
66
66
|
</style>
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
export let checked = false;
|
|
3
|
-
export let name: string;
|
|
4
|
-
|
|
5
|
-
import { SlideToggle } from "@skeletonlabs/skeleton";
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<SlideToggle name={name}
|
|
9
|
-
background="bg-surface-700 dark:bg-surface-700"
|
|
10
|
-
bind:checked={checked}>
|
|
11
|
-
<slot />
|
|
12
|
-
</SlideToggle>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export let checked = false;
|
|
3
|
+
export let name: string;
|
|
4
|
+
|
|
5
|
+
import { SlideToggle } from "@skeletonlabs/skeleton";
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<SlideToggle name={name}
|
|
9
|
+
background="bg-surface-700 dark:bg-surface-700"
|
|
10
|
+
bind:checked={checked}>
|
|
11
|
+
<slot />
|
|
12
|
+
</SlideToggle>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Should include a slash before and after the path
|
|
14
14
|
*/
|
|
15
15
|
export let parentSubpath: string;
|
|
16
|
-
|
|
16
|
+
export let allowUpperControl: boolean;
|
|
17
17
|
export let compareFn: undefined | ParsePageMetaCompareFn = undefined;
|
|
18
18
|
export let pageSize = 5;
|
|
19
19
|
export let currentIndex = 0;
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
</Card>
|
|
33
33
|
{/if}
|
|
34
34
|
|
|
35
|
-
{#if shouldAllowControl}
|
|
35
|
+
{#if allowUpperControl && shouldAllowControl}
|
|
36
36
|
<NavigationControl bind:currentIndex={currentIndex}
|
|
37
37
|
bind:contentLength={pageFlatList.length}
|
|
38
38
|
bind:pageSize={pageSize}></NavigationControl>
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { type CreateUrlRequest, CreateUrlResult, jsonToCreateUrlResponse } from "$pkg/types/api/CreateUrl";
|
|
3
|
-
import { getToastStore, type ToastSettings } from "@skeletonlabs/skeleton";
|
|
4
|
-
|
|
5
|
-
export let queryParams = "";
|
|
6
|
-
|
|
7
|
-
const toastStore = getToastStore();
|
|
8
|
-
|
|
9
|
-
let request: CreateUrlRequest = {
|
|
10
|
-
queryParams: "",
|
|
11
|
-
shortUrl: "",
|
|
12
|
-
password: ""
|
|
13
|
-
};
|
|
14
|
-
$: request.queryParams = queryParams;
|
|
15
|
-
|
|
16
|
-
const failToast: ToastSettings = {
|
|
17
|
-
message: "Adding new url failed"
|
|
18
|
-
};
|
|
19
|
-
const toastMap = new Map<CreateUrlResult, ToastSettings>([
|
|
20
|
-
[CreateUrlResult.Success, {
|
|
21
|
-
message: "Successfully added new url"
|
|
22
|
-
}],
|
|
23
|
-
[CreateUrlResult.Duplicate, {
|
|
24
|
-
message: "Short url already used; try again with another url"
|
|
25
|
-
}],
|
|
26
|
-
[CreateUrlResult.Fail, failToast]
|
|
27
|
-
]);
|
|
28
|
-
const post = () => {
|
|
29
|
-
fetch("/api/create-url", {
|
|
30
|
-
method: "POST",
|
|
31
|
-
headers: {
|
|
32
|
-
"Content-Type": "application/json"
|
|
33
|
-
},
|
|
34
|
-
body: JSON.stringify(request)
|
|
35
|
-
}).then(resp =>
|
|
36
|
-
resp.json()
|
|
37
|
-
).then(json => {
|
|
38
|
-
const properResp = jsonToCreateUrlResponse(json);
|
|
39
|
-
toastStore.trigger(toastMap.get(properResp.result) ?? failToast);
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
<div class="local-list">
|
|
45
|
-
<label for="short-url">Short URL for url shortener</label>
|
|
46
|
-
<input bind:value={request.shortUrl}
|
|
47
|
-
name="short-url"
|
|
48
|
-
class="input"
|
|
49
|
-
type="text"
|
|
50
|
-
placeholder="short-url" />
|
|
51
|
-
<label for="password">Password</label>
|
|
52
|
-
<input bind:value={request.password}
|
|
53
|
-
name="password"
|
|
54
|
-
class="input"
|
|
55
|
-
type="password"
|
|
56
|
-
placeholder="ILoveTurnips" />
|
|
57
|
-
<button class="send-link btn variant-filled" on:click={post}>Send link</button>
|
|
58
|
-
</div>
|
|
59
|
-
|
|
60
|
-
<style>
|
|
61
|
-
.local-list {
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-direction: column;
|
|
64
|
-
gap: 0.25lh;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.send-link {
|
|
68
|
-
margin-top: 0.75lh;
|
|
69
|
-
}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { type CreateUrlRequest, CreateUrlResult, jsonToCreateUrlResponse } from "$pkg/types/api/CreateUrl";
|
|
3
|
+
import { getToastStore, type ToastSettings } from "@skeletonlabs/skeleton";
|
|
4
|
+
|
|
5
|
+
export let queryParams = "";
|
|
6
|
+
|
|
7
|
+
const toastStore = getToastStore();
|
|
8
|
+
|
|
9
|
+
let request: CreateUrlRequest = {
|
|
10
|
+
queryParams: "",
|
|
11
|
+
shortUrl: "",
|
|
12
|
+
password: ""
|
|
13
|
+
};
|
|
14
|
+
$: request.queryParams = queryParams;
|
|
15
|
+
|
|
16
|
+
const failToast: ToastSettings = {
|
|
17
|
+
message: "Adding new url failed"
|
|
18
|
+
};
|
|
19
|
+
const toastMap = new Map<CreateUrlResult, ToastSettings>([
|
|
20
|
+
[CreateUrlResult.Success, {
|
|
21
|
+
message: "Successfully added new url"
|
|
22
|
+
}],
|
|
23
|
+
[CreateUrlResult.Duplicate, {
|
|
24
|
+
message: "Short url already used; try again with another url"
|
|
25
|
+
}],
|
|
26
|
+
[CreateUrlResult.Fail, failToast]
|
|
27
|
+
]);
|
|
28
|
+
const post = () => {
|
|
29
|
+
fetch("/api/create-url", {
|
|
30
|
+
method: "POST",
|
|
31
|
+
headers: {
|
|
32
|
+
"Content-Type": "application/json"
|
|
33
|
+
},
|
|
34
|
+
body: JSON.stringify(request)
|
|
35
|
+
}).then(resp =>
|
|
36
|
+
resp.json()
|
|
37
|
+
).then(json => {
|
|
38
|
+
const properResp = jsonToCreateUrlResponse(json);
|
|
39
|
+
toastStore.trigger(toastMap.get(properResp.result) ?? failToast);
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<div class="local-list">
|
|
45
|
+
<label for="short-url">Short URL for url shortener</label>
|
|
46
|
+
<input bind:value={request.shortUrl}
|
|
47
|
+
name="short-url"
|
|
48
|
+
class="input"
|
|
49
|
+
type="text"
|
|
50
|
+
placeholder="short-url" />
|
|
51
|
+
<label for="password">Password</label>
|
|
52
|
+
<input bind:value={request.password}
|
|
53
|
+
name="password"
|
|
54
|
+
class="input"
|
|
55
|
+
type="password"
|
|
56
|
+
placeholder="ILoveTurnips" />
|
|
57
|
+
<button class="send-link btn variant-filled" on:click={post}>Send link</button>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<style>
|
|
61
|
+
.local-list {
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
gap: 0.25lh;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.send-link {
|
|
68
|
+
margin-top: 0.75lh;
|
|
69
|
+
}
|
|
70
70
|
</style>
|