From ccd191de105c60ee3a206e6b7915d39909f91485 Mon Sep 17 00:00:00 2001
From: Arc <90333108+lastarc@users.noreply.github.com>
Date: Mon, 24 Jun 2024 21:36:54 +0200
Subject: [PATCH] mvp
---
.gitignore | 6 +
package.json | 13 +-
pb_migrations/1718834233_created_profiles.js | 60 ++++++
.../1718834453_created_characters.js | 81 +++++++
pb_migrations/1718834489_updated_profiles.js | 27 +++
pb_migrations/1718834637_created_votes.js | 76 +++++++
pb_migrations/1718834662_updated_profiles.js | 21 ++
.../1718834688_updated_characters.js | 21 ++
pb_migrations/1718838136_updated_votes.js | 25 +++
pb_migrations/1718839919_updated_nicks.js | 51 +++++
pb_migrations/1719252581_updated_profiles.js | 55 +++++
pnpm-lock.yaml | 9 +
src/app.html | 29 ++-
src/app.scss | 24 +--
src/lib/components/ui/navbar.svelte | 138 ++++++++++++
src/lib/index.ts | 1 -
src/lib/pocketbase.ts | 54 +++++
src/routes/+layout.svelte | 28 ++-
src/routes/+layout.ts | 27 +++
src/routes/+page.svelte | 203 +++++++++++++++++-
src/routes/+page.ts | 6 +
src/routes/auth/callback/+page.svelte | 43 ++++
src/routes/auth/login/+page.svelte | 17 ++
src/routes/auth/logout/+page.svelte | 15 ++
src/variables.scss | 2 +-
static/assets/images/fail.png | Bin 0 -> 31146 bytes
static/favicon.png | Bin 1571 -> 140384 bytes
vite.config.ts | 28 +--
28 files changed, 1023 insertions(+), 37 deletions(-)
create mode 100644 pb_migrations/1718834233_created_profiles.js
create mode 100644 pb_migrations/1718834453_created_characters.js
create mode 100644 pb_migrations/1718834489_updated_profiles.js
create mode 100644 pb_migrations/1718834637_created_votes.js
create mode 100644 pb_migrations/1718834662_updated_profiles.js
create mode 100644 pb_migrations/1718834688_updated_characters.js
create mode 100644 pb_migrations/1718838136_updated_votes.js
create mode 100644 pb_migrations/1718839919_updated_nicks.js
create mode 100644 pb_migrations/1719252581_updated_profiles.js
create mode 100644 src/lib/components/ui/navbar.svelte
delete mode 100644 src/lib/index.ts
create mode 100644 src/lib/pocketbase.ts
create mode 100644 src/routes/+layout.ts
create mode 100644 src/routes/+page.ts
create mode 100644 src/routes/auth/callback/+page.svelte
create mode 100644 src/routes/auth/login/+page.svelte
create mode 100644 src/routes/auth/logout/+page.svelte
create mode 100644 static/assets/images/fail.png
diff --git a/.gitignore b/.gitignore
index 79518f7..a8b5a49 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,9 @@ Thumbs.db
# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
+
+# Intellij
+.idea
+
+# PocketBase
+/pb_data
diff --git a/package.json b/package.json
index c387dcd..f0a2212 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
{
- "name": "niko",
+ "name": "nikk",
"version": "0.0.1",
"private": true,
"scripts": {
@@ -20,21 +20,24 @@
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@types/eslint": "^8.56.7",
+ "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",
"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": "^1.2.0",
- "bulma": "^1.0.1",
- "sass": "^1.77.5"
+ "vitest": "^1.2.0"
},
- "type": "module"
+ "type": "module",
+ "dependencies": {
+ "pocketbase": "^0.21.3"
+ }
}
diff --git a/pb_migrations/1718834233_created_profiles.js b/pb_migrations/1718834233_created_profiles.js
new file mode 100644
index 0000000..b3b40e3
--- /dev/null
+++ b/pb_migrations/1718834233_created_profiles.js
@@ -0,0 +1,60 @@
+///
Edit username
+ +Visit kit.svelte.dev to read the documentation
+ + + + + +{#if !profile} +You must be logged in to view this page
++ {$editModal?.currentNick ? 'Edit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