@turnipxenon/pineapple 2.4.64 → 2.4.67
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 +44 -39
- 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,9 +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="
|
|
8
|
-
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
|
9
|
-
</list>
|
|
7
|
+
<list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="CreateUrlForm" comment="Add hideable upper controls for NavigationComponent" />
|
|
10
8
|
<option name="SHOW_DIALOG" value="false" />
|
|
11
9
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
12
10
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
@@ -50,12 +48,12 @@
|
|
|
50
48
|
<option value="EntryOrderConfig" />
|
|
51
49
|
<option value="ComboBox" />
|
|
52
50
|
<option value="ComboBoxWithButton" />
|
|
53
|
-
<option value="CSS File" />
|
|
54
51
|
<option value="RandomComponent" />
|
|
55
52
|
<option value="UrlShortenerForm" />
|
|
56
53
|
<option value="TypeScript File" />
|
|
57
54
|
<option value="PineappleSlideToggle" />
|
|
58
55
|
<option value="PostCSS File" />
|
|
56
|
+
<option value="CSS File" />
|
|
59
57
|
</list>
|
|
60
58
|
</option>
|
|
61
59
|
</component>
|
|
@@ -119,7 +117,7 @@
|
|
|
119
117
|
"git-widget-placeholder": "turnip/dev",
|
|
120
118
|
"ignore.virus.scanning.warn.message": "true",
|
|
121
119
|
"last_opened_file_path": "C:/Users/Pumpkin/Projects/Web/pineapple",
|
|
122
|
-
"list.type.of.created.stylesheet": "
|
|
120
|
+
"list.type.of.created.stylesheet": "CSS",
|
|
123
121
|
"node.js.detected.package.eslint": "true",
|
|
124
122
|
"node.js.detected.package.tslint": "true",
|
|
125
123
|
"node.js.selected.package.eslint": "(autodetect)",
|
|
@@ -147,18 +145,18 @@
|
|
|
147
145
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(extra-pages)\page3\page5" />
|
|
148
146
|
</key>
|
|
149
147
|
<key name="MoveFile.RECENT_KEYS">
|
|
148
|
+
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\components\pineapple-slide-toggle" />
|
|
150
149
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\components\chip" />
|
|
151
150
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\components\combo_box" />
|
|
152
151
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\docs\archive" />
|
|
153
152
|
<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
153
|
</key>
|
|
156
154
|
<key name="es6.move.members.recent.items">
|
|
157
155
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\types\RootLayoutProps.ts" />
|
|
158
156
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\util\util.ts" />
|
|
159
157
|
</key>
|
|
160
158
|
</component>
|
|
161
|
-
<component name="RunManager" selected="npm.dev
|
|
159
|
+
<component name="RunManager" selected="npm.to-dev">
|
|
162
160
|
<configuration name="dev --open" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
|
|
163
161
|
<package-json value="$PROJECT_DIR$/package.json" />
|
|
164
162
|
<command value="run" />
|
|
@@ -197,8 +195,8 @@
|
|
|
197
195
|
</list>
|
|
198
196
|
<recent_temporary>
|
|
199
197
|
<list>
|
|
200
|
-
<item itemvalue="npm.dev --open" />
|
|
201
198
|
<item itemvalue="npm.to-dev" />
|
|
199
|
+
<item itemvalue="npm.dev --open" />
|
|
202
200
|
<item itemvalue="npm.dev-offline" />
|
|
203
201
|
<item itemvalue="npm.dev --open" />
|
|
204
202
|
<item itemvalue="npm.to-dev" />
|
|
@@ -340,31 +338,14 @@
|
|
|
340
338
|
<workItem from="1712570296984" duration="1559000" />
|
|
341
339
|
<workItem from="1712571884570" duration="7000" />
|
|
342
340
|
<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>
|
|
341
|
+
<workItem from="1712648417963" duration="7073000" />
|
|
342
|
+
<workItem from="1712712655154" duration="1564000" />
|
|
343
|
+
<workItem from="1712751593565" duration="273000" />
|
|
344
|
+
<workItem from="1712756759276" duration="4000" />
|
|
345
|
+
<workItem from="1712756828446" duration="499000" />
|
|
346
|
+
<workItem from="1712757929028" duration="266000" />
|
|
347
|
+
<workItem from="1712759920412" duration="16000" />
|
|
348
|
+
<workItem from="1712761439292" duration="385000" />
|
|
368
349
|
</task>
|
|
369
350
|
<task id="LOCAL-00135" summary="Add resolutions to use Node 20 in Azure SWA GithubActions">
|
|
370
351
|
<option name="closed" value="true" />
|
|
@@ -734,7 +715,31 @@
|
|
|
734
715
|
<option name="project" value="LOCAL" />
|
|
735
716
|
<updated>1712654142877</updated>
|
|
736
717
|
</task>
|
|
737
|
-
<
|
|
718
|
+
<task id="LOCAL-00181" summary="Add border for slider toggle during light mode">
|
|
719
|
+
<option name="closed" value="true" />
|
|
720
|
+
<created>1712713161412</created>
|
|
721
|
+
<option name="number" value="00181" />
|
|
722
|
+
<option name="presentableId" value="LOCAL-00181" />
|
|
723
|
+
<option name="project" value="LOCAL" />
|
|
724
|
+
<updated>1712713161413</updated>
|
|
725
|
+
</task>
|
|
726
|
+
<task id="LOCAL-00182" summary="WIP attempt to fix slider">
|
|
727
|
+
<option name="closed" value="true" />
|
|
728
|
+
<created>1712713857855</created>
|
|
729
|
+
<option name="number" value="00182" />
|
|
730
|
+
<option name="presentableId" value="LOCAL-00182" />
|
|
731
|
+
<option name="project" value="LOCAL" />
|
|
732
|
+
<updated>1712713857855</updated>
|
|
733
|
+
</task>
|
|
734
|
+
<task id="LOCAL-00183" summary="Add hideable upper controls for NavigationComponent">
|
|
735
|
+
<option name="closed" value="true" />
|
|
736
|
+
<created>1712761479940</created>
|
|
737
|
+
<option name="number" value="00183" />
|
|
738
|
+
<option name="presentableId" value="LOCAL-00183" />
|
|
739
|
+
<option name="project" value="LOCAL" />
|
|
740
|
+
<updated>1712761479941</updated>
|
|
741
|
+
</task>
|
|
742
|
+
<option name="localTasksCounter" value="184" />
|
|
738
743
|
<servers />
|
|
739
744
|
</component>
|
|
740
745
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -772,7 +777,7 @@
|
|
|
772
777
|
<entry key="branch">
|
|
773
778
|
<value>
|
|
774
779
|
<list>
|
|
775
|
-
<option value="
|
|
780
|
+
<option value="main" />
|
|
776
781
|
</list>
|
|
777
782
|
</value>
|
|
778
783
|
</entry>
|
|
@@ -792,9 +797,6 @@
|
|
|
792
797
|
</option>
|
|
793
798
|
</component>
|
|
794
799
|
<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
800
|
<MESSAGE value="Fix yarn dependencies" />
|
|
799
801
|
<MESSAGE value="Support swappable group for backwards compatibility" />
|
|
800
802
|
<MESSAGE value="Add back gameSectionFirst behaviour" />
|
|
@@ -817,6 +819,9 @@
|
|
|
817
819
|
<MESSAGE value="Extract tailwind css utility class to local-chip" />
|
|
818
820
|
<MESSAGE value="Fix chip issue in Advanced Settings" />
|
|
819
821
|
<MESSAGE value="Remove tailwind reliance on Chip" />
|
|
820
|
-
<
|
|
822
|
+
<MESSAGE value="Add border for slider toggle during light mode" />
|
|
823
|
+
<MESSAGE value="WIP attempt to fix slider" />
|
|
824
|
+
<MESSAGE value="Add hideable upper controls for NavigationComponent" />
|
|
825
|
+
<option name="LAST_COMMIT_MESSAGE" value="Add hideable upper controls for NavigationComponent" />
|
|
821
826
|
</component>
|
|
822
827
|
</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 = true;
|
|
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 | undefined;
|
|
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 = true;
|
|
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 | undefined;
|
|
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 = true;
|
|
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>
|