diff --git a/flake.nix b/flake.nix index 974d435..5e85a36 100644 --- a/flake.nix +++ b/flake.nix @@ -15,7 +15,7 @@ }; in { devShell = pkgs.mkShell { - nativeBuildInputs = with pkgs; [ nodejs ]; + nativeBuildInputs = with pkgs; [ nodejs_latest ]; }; } ); diff --git a/package-lock.json b/package-lock.json index bca1001..4165efa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,6 +22,7 @@ "prettier": "^3.1.1", "prettier-plugin-svelte": "^3.1.2", "sass": "^1.77.5", + "simple-svelte-autocomplete": "^2.5.2", "svelte": "^4.2.7", "svelte-check": "^3.6.0", "tslib": "^2.4.1", @@ -3945,6 +3946,12 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/simple-svelte-autocomplete": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/simple-svelte-autocomplete/-/simple-svelte-autocomplete-2.5.2.tgz", + "integrity": "sha512-6+kZP3XQGb7zs0djTWoFv8tQorBZdv64YfCKrlsYIYBCFsEeikSiNsBSSYw1Om+LYmFeMEOAYSSKoEw+qpnBXQ==", + "dev": true + }, "node_modules/sirv": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", diff --git a/package.json b/package.json index 253175b..4749b39 100644 --- a/package.json +++ b/package.json @@ -19,21 +19,22 @@ "@sveltejs/vite-plugin-svelte": "^3.0.0", "@types/eslint": "^9.0.0", "@types/node": "^20.14.11", + "bulma": "^1.0.1", "eslint": "^9.0.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-svelte": "^2.36.0", "globals": "^15.0.0", "prettier": "^3.1.1", "prettier-plugin-svelte": "^3.1.2", + "sass": "^1.77.5", + "simple-svelte-autocomplete": "^2.5.2", "svelte": "^4.2.7", "svelte-check": "^3.6.0", "tslib": "^2.4.1", "typescript": "^5.0.0", "typescript-eslint": "^8.0.0-alpha.20", "vite": "^5.0.3", - "vitest": "^2.0.0", - "bulma": "^1.0.1", - "sass": "^1.77.5" + "vitest": "^2.0.0" }, "type": "module", "engines": { diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 7e39ba2..4e6ab66 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,9 +1,13 @@
-
{#if form?.field === 'name'} @@ -69,10 +80,10 @@ Fotos auswählen... - {#if files} - {files.length} Bild{#if files.length > 1}er{/if} ausgewählt ({fileSize(files)}) + {#if files && files?.length !== 0} + + {files.length} Bild{#if files.length > 1}er{/if} ausgewählt ({fileSize(files)}) + {:else} Keine Bilder ausgewählt {/if} diff --git a/src/routes/names/+server.ts b/src/routes/names/+server.ts index c69f717..c0adecf 100644 --- a/src/routes/names/+server.ts +++ b/src/routes/names/+server.ts @@ -6,6 +6,7 @@ export function GET() { const names = readdirSync(storagePath).filter((f) => statSync(`${storagePath}/${f}`).isDirectory() ); + names.sort(); return json(names); } diff --git a/src/variables.scss b/src/variables.scss index 3469193..012e114 100644 --- a/src/variables.scss +++ b/src/variables.scss @@ -1,2 +1,2 @@ /* Set your brand colors */ -$pink: pink; +$pink: #d47479;