@turnipxenon/pineapple 2.4.63 → 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 +61 -56
- package/.svelte-kit/__package__/components/PineappleSlideToggle.svelte +7 -7
- package/.svelte-kit/__package__/components/chip/Chip.svelte +16 -5
- 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/chip/Chip.svelte +16 -5
- 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/chip/Chip.svelte +16 -5
- 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,10 +4,8 @@
|
|
|
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$/
|
|
9
|
-
<change beforePath="$PROJECT_DIR$/src/lib/index.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/index.ts" afterDir="false" />
|
|
10
|
-
<change beforePath="$PROJECT_DIR$/src/lib/template/seaweed/SeaweedTemplate.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/template/seaweed/SeaweedTemplate.svelte" afterDir="false" />
|
|
7
|
+
<list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="CreateUrlForm" comment="Add hideable upper controls for NavigationComponent">
|
|
8
|
+
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
|
11
9
|
</list>
|
|
12
10
|
<option name="SHOW_DIALOG" value="false" />
|
|
13
11
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -52,12 +50,12 @@
|
|
|
52
50
|
<option value="EntryOrderConfig" />
|
|
53
51
|
<option value="ComboBox" />
|
|
54
52
|
<option value="ComboBoxWithButton" />
|
|
55
|
-
<option value="CSS File" />
|
|
56
53
|
<option value="RandomComponent" />
|
|
57
54
|
<option value="UrlShortenerForm" />
|
|
58
55
|
<option value="TypeScript File" />
|
|
59
56
|
<option value="PineappleSlideToggle" />
|
|
60
57
|
<option value="PostCSS File" />
|
|
58
|
+
<option value="CSS File" />
|
|
61
59
|
</list>
|
|
62
60
|
</option>
|
|
63
61
|
</component>
|
|
@@ -121,7 +119,7 @@
|
|
|
121
119
|
"git-widget-placeholder": "turnip/dev",
|
|
122
120
|
"ignore.virus.scanning.warn.message": "true",
|
|
123
121
|
"last_opened_file_path": "C:/Users/Pumpkin/Projects/Web/pineapple",
|
|
124
|
-
"list.type.of.created.stylesheet": "
|
|
122
|
+
"list.type.of.created.stylesheet": "CSS",
|
|
125
123
|
"node.js.detected.package.eslint": "true",
|
|
126
124
|
"node.js.detected.package.tslint": "true",
|
|
127
125
|
"node.js.selected.package.eslint": "(autodetect)",
|
|
@@ -149,11 +147,11 @@
|
|
|
149
147
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(extra-pages)\page3\page5" />
|
|
150
148
|
</key>
|
|
151
149
|
<key name="MoveFile.RECENT_KEYS">
|
|
150
|
+
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\components\pineapple-slide-toggle" />
|
|
152
151
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\components\chip" />
|
|
153
152
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\components\combo_box" />
|
|
154
153
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\docs\archive" />
|
|
155
154
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(pineapple)" />
|
|
156
|
-
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(nested)" />
|
|
157
155
|
</key>
|
|
158
156
|
<key name="es6.move.members.recent.items">
|
|
159
157
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\types\RootLayoutProps.ts" />
|
|
@@ -342,47 +340,14 @@
|
|
|
342
340
|
<workItem from="1712570296984" duration="1559000" />
|
|
343
341
|
<workItem from="1712571884570" duration="7000" />
|
|
344
342
|
<workItem from="1712636226857" duration="11130000" />
|
|
345
|
-
<workItem from="1712648417963" duration="
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
<
|
|
349
|
-
<
|
|
350
|
-
<
|
|
351
|
-
<
|
|
352
|
-
<
|
|
353
|
-
<updated>1712369624295</updated>
|
|
354
|
-
</task>
|
|
355
|
-
<task id="LOCAL-00131" summary="Convert npm to yarn">
|
|
356
|
-
<option name="closed" value="true" />
|
|
357
|
-
<created>1712372282278</created>
|
|
358
|
-
<option name="number" value="00131" />
|
|
359
|
-
<option name="presentableId" value="LOCAL-00131" />
|
|
360
|
-
<option name="project" value="LOCAL" />
|
|
361
|
-
<updated>1712372282278</updated>
|
|
362
|
-
</task>
|
|
363
|
-
<task id="LOCAL-00132" summary="Change from auto to node adapter">
|
|
364
|
-
<option name="closed" value="true" />
|
|
365
|
-
<created>1712373195354</created>
|
|
366
|
-
<option name="number" value="00132" />
|
|
367
|
-
<option name="presentableId" value="LOCAL-00132" />
|
|
368
|
-
<option name="project" value="LOCAL" />
|
|
369
|
-
<updated>1712373195354</updated>
|
|
370
|
-
</task>
|
|
371
|
-
<task id="LOCAL-00133" summary="Add kudos to 0gust1 Add kudos to 0gust1 for documenting how to deploy sveltekit app on Azure App service">
|
|
372
|
-
<option name="closed" value="true" />
|
|
373
|
-
<created>1712377506353</created>
|
|
374
|
-
<option name="number" value="00133" />
|
|
375
|
-
<option name="presentableId" value="LOCAL-00133" />
|
|
376
|
-
<option name="project" value="LOCAL" />
|
|
377
|
-
<updated>1712377506354</updated>
|
|
378
|
-
</task>
|
|
379
|
-
<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">
|
|
380
|
-
<option name="closed" value="true" />
|
|
381
|
-
<created>1712380208456</created>
|
|
382
|
-
<option name="number" value="00134" />
|
|
383
|
-
<option name="presentableId" value="LOCAL-00134" />
|
|
384
|
-
<option name="project" value="LOCAL" />
|
|
385
|
-
<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" />
|
|
386
351
|
</task>
|
|
387
352
|
<task id="LOCAL-00135" summary="Add resolutions to use Node 20 in Azure SWA GithubActions">
|
|
388
353
|
<option name="closed" value="true" />
|
|
@@ -736,7 +701,47 @@
|
|
|
736
701
|
<option name="project" value="LOCAL" />
|
|
737
702
|
<updated>1712650184366</updated>
|
|
738
703
|
</task>
|
|
739
|
-
<
|
|
704
|
+
<task id="LOCAL-00179" summary="Fix chip issue in Advanced Settings">
|
|
705
|
+
<option name="closed" value="true" />
|
|
706
|
+
<created>1712653410765</created>
|
|
707
|
+
<option name="number" value="00179" />
|
|
708
|
+
<option name="presentableId" value="LOCAL-00179" />
|
|
709
|
+
<option name="project" value="LOCAL" />
|
|
710
|
+
<updated>1712653410765</updated>
|
|
711
|
+
</task>
|
|
712
|
+
<task id="LOCAL-00180" summary="Remove tailwind reliance on Chip">
|
|
713
|
+
<option name="closed" value="true" />
|
|
714
|
+
<created>1712654142877</created>
|
|
715
|
+
<option name="number" value="00180" />
|
|
716
|
+
<option name="presentableId" value="LOCAL-00180" />
|
|
717
|
+
<option name="project" value="LOCAL" />
|
|
718
|
+
<updated>1712654142877</updated>
|
|
719
|
+
</task>
|
|
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" />
|
|
740
745
|
<servers />
|
|
741
746
|
</component>
|
|
742
747
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -774,7 +779,7 @@
|
|
|
774
779
|
<entry key="branch">
|
|
775
780
|
<value>
|
|
776
781
|
<list>
|
|
777
|
-
<option value="
|
|
782
|
+
<option value="main" />
|
|
778
783
|
</list>
|
|
779
784
|
</value>
|
|
780
785
|
</entry>
|
|
@@ -794,11 +799,6 @@
|
|
|
794
799
|
</option>
|
|
795
800
|
</component>
|
|
796
801
|
<component name="VcsManagerConfiguration">
|
|
797
|
-
<MESSAGE value="Add group swapping" />
|
|
798
|
-
<MESSAGE value="Add serverSideQueryParams in SeaweedTemplate" />
|
|
799
|
-
<MESSAGE value="Add serverSideQueryParams and extraComponent in SeaweedTemplate" />
|
|
800
|
-
<MESSAGE value="Fix removeProxyWrapperOnString" />
|
|
801
|
-
<MESSAGE value="Remove unneeded script check in yarn build" />
|
|
802
802
|
<MESSAGE value="Fix yarn dependencies" />
|
|
803
803
|
<MESSAGE value="Support swappable group for backwards compatibility" />
|
|
804
804
|
<MESSAGE value="Add back gameSectionFirst behaviour" />
|
|
@@ -819,6 +819,11 @@
|
|
|
819
819
|
<MESSAGE value="Add border-radius for advanced settings cards" />
|
|
820
820
|
<MESSAGE value="Fix pkg import for Chip" />
|
|
821
821
|
<MESSAGE value="Extract tailwind css utility class to local-chip" />
|
|
822
|
-
<
|
|
822
|
+
<MESSAGE value="Fix chip issue in Advanced Settings" />
|
|
823
|
+
<MESSAGE value="Remove tailwind reliance on Chip" />
|
|
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" />
|
|
823
828
|
</component>
|
|
824
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>
|
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
<script>import { modeCurrent as isLightMode } from "@skeletonlabs/skeleton";
|
|
2
2
|
export let onClick = void 0;
|
|
3
|
-
export let checked =
|
|
3
|
+
export let checked = true;
|
|
4
4
|
$:
|
|
5
5
|
textColorClass = $isLightMode ? "local-light" : "local-dark";
|
|
6
6
|
let buttonClass = "variant-filled-tertiary";
|
|
7
7
|
const toggleChipColor = (isLightMode2, checked2) => {
|
|
8
8
|
if (isLightMode2) {
|
|
9
|
-
buttonClass = checked2 ? "
|
|
9
|
+
buttonClass = checked2 ? "normal-bg" : "light-unchecked-bg";
|
|
10
10
|
} else {
|
|
11
|
-
buttonClass = checked2 ? "
|
|
11
|
+
buttonClass = checked2 ? "normal-bg" : "dark-unchecked-bg";
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
$:
|
|
15
15
|
toggleChipColor($isLightMode, checked);
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
|
-
<!-- aria wanrning is okay to ignore since it dynamically shifts between button or span -->
|
|
19
18
|
{#if onClick}
|
|
20
19
|
<button class={`chip ${buttonClass} ${textColorClass}`}
|
|
21
20
|
on:click={onClick}>
|
|
22
21
|
<slot />
|
|
23
22
|
</button>
|
|
24
23
|
{:else }
|
|
25
|
-
<span class={`local-chip
|
|
24
|
+
<span class={`local-chip normal-bg ${textColorClass}`}>
|
|
26
25
|
<slot />
|
|
27
26
|
</span>
|
|
28
27
|
{/if}
|
|
@@ -70,9 +69,21 @@ a.local-chip:hover,
|
|
|
70
69
|
margin: 0.25em;
|
|
71
70
|
font-weight: bold;
|
|
72
71
|
pointer-events: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.normal-bg {
|
|
75
|
+
--tw-bg-opacity: 1;
|
|
73
76
|
background-color: rgb(var(--color-tertiary-500) / var(--tw-bg-opacity));
|
|
74
77
|
}
|
|
75
78
|
|
|
79
|
+
.dark-unchecked-bg {
|
|
80
|
+
background-color: rgb(var(--color-tertiary-500) / 0.2);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.light-unchecked-bg {
|
|
84
|
+
background-color: rgb(var(--color-primary-500) / var(--tw-bg-opacity));
|
|
85
|
+
}
|
|
86
|
+
|
|
76
87
|
.local-light {
|
|
77
88
|
color: rgb(var(--theme-font-color-base));
|
|
78
89
|
}
|
|
@@ -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>
|
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
<script>import { modeCurrent as isLightMode } from "@skeletonlabs/skeleton";
|
|
2
2
|
export let onClick = void 0;
|
|
3
|
-
export let checked =
|
|
3
|
+
export let checked = true;
|
|
4
4
|
$:
|
|
5
5
|
textColorClass = $isLightMode ? "local-light" : "local-dark";
|
|
6
6
|
let buttonClass = "variant-filled-tertiary";
|
|
7
7
|
const toggleChipColor = (isLightMode2, checked2) => {
|
|
8
8
|
if (isLightMode2) {
|
|
9
|
-
buttonClass = checked2 ? "
|
|
9
|
+
buttonClass = checked2 ? "normal-bg" : "light-unchecked-bg";
|
|
10
10
|
} else {
|
|
11
|
-
buttonClass = checked2 ? "
|
|
11
|
+
buttonClass = checked2 ? "normal-bg" : "dark-unchecked-bg";
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
$:
|
|
15
15
|
toggleChipColor($isLightMode, checked);
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
|
-
<!-- aria wanrning is okay to ignore since it dynamically shifts between button or span -->
|
|
19
18
|
{#if onClick}
|
|
20
19
|
<button class={`chip ${buttonClass} ${textColorClass}`}
|
|
21
20
|
on:click={onClick}>
|
|
22
21
|
<slot />
|
|
23
22
|
</button>
|
|
24
23
|
{:else }
|
|
25
|
-
<span class={`local-chip
|
|
24
|
+
<span class={`local-chip normal-bg ${textColorClass}`}>
|
|
26
25
|
<slot />
|
|
27
26
|
</span>
|
|
28
27
|
{/if}
|
|
@@ -70,9 +69,21 @@ a.local-chip:hover,
|
|
|
70
69
|
margin: 0.25em;
|
|
71
70
|
font-weight: bold;
|
|
72
71
|
pointer-events: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.normal-bg {
|
|
75
|
+
--tw-bg-opacity: 1;
|
|
73
76
|
background-color: rgb(var(--color-tertiary-500) / var(--tw-bg-opacity));
|
|
74
77
|
}
|
|
75
78
|
|
|
79
|
+
.dark-unchecked-bg {
|
|
80
|
+
background-color: rgb(var(--color-tertiary-500) / 0.2);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.light-unchecked-bg {
|
|
84
|
+
background-color: rgb(var(--color-primary-500) / var(--tw-bg-opacity));
|
|
85
|
+
}
|
|
86
|
+
|
|
76
87
|
.local-light {
|
|
77
88
|
color: rgb(var(--theme-font-color-base));
|
|
78
89
|
}
|
|
@@ -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>
|
|
@@ -2,28 +2,27 @@
|
|
|
2
2
|
import { modeCurrent as isLightMode } from "@skeletonlabs/skeleton";
|
|
3
3
|
|
|
4
4
|
export let onClick: undefined | (() => void) = undefined;
|
|
5
|
-
export let checked =
|
|
5
|
+
export let checked = true;
|
|
6
6
|
|
|
7
7
|
$: textColorClass = $isLightMode ? "local-light" : "local-dark";
|
|
8
8
|
let buttonClass = "variant-filled-tertiary";
|
|
9
9
|
const toggleChipColor = (isLightMode: boolean, checked: boolean) => {
|
|
10
10
|
if (isLightMode) {
|
|
11
|
-
buttonClass = checked ? "
|
|
11
|
+
buttonClass = checked ? "normal-bg" : "light-unchecked-bg";
|
|
12
12
|
} else {
|
|
13
|
-
buttonClass = checked ? "
|
|
13
|
+
buttonClass = checked ? "normal-bg" : "dark-unchecked-bg";
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
$: toggleChipColor($isLightMode, checked);
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
|
-
<!-- aria wanrning is okay to ignore since it dynamically shifts between button or span -->
|
|
20
19
|
{#if onClick}
|
|
21
20
|
<button class={`chip ${buttonClass} ${textColorClass}`}
|
|
22
21
|
on:click={onClick}>
|
|
23
22
|
<slot />
|
|
24
23
|
</button>
|
|
25
24
|
{:else }
|
|
26
|
-
<span class={`local-chip
|
|
25
|
+
<span class={`local-chip normal-bg ${textColorClass}`}>
|
|
27
26
|
<slot />
|
|
28
27
|
</span>
|
|
29
28
|
{/if}
|
|
@@ -35,9 +34,21 @@
|
|
|
35
34
|
margin: 0.25em;
|
|
36
35
|
font-weight: bold;
|
|
37
36
|
pointer-events: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.normal-bg {
|
|
40
|
+
--tw-bg-opacity: 1;
|
|
38
41
|
background-color: rgb(var(--color-tertiary-500) / var(--tw-bg-opacity));
|
|
39
42
|
}
|
|
40
43
|
|
|
44
|
+
.dark-unchecked-bg {
|
|
45
|
+
background-color: rgb(var(--color-tertiary-500) / 0.2);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.light-unchecked-bg {
|
|
49
|
+
background-color: rgb(var(--color-primary-500) / var(--tw-bg-opacity));
|
|
50
|
+
}
|
|
51
|
+
|
|
41
52
|
.local-light {
|
|
42
53
|
color: rgb(var(--theme-font-color-base));
|
|
43
54
|
}
|
|
@@ -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>
|