From bd78e3f600dc1c889d056ca7a3b89bc5b5b9f888 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 20 Sep 2025 12:37:37 +0800 Subject: [PATCH] :sparkles: Proper user login --- app/app.vue | 4 +- app/components/AttachmentItem.vue | 117 +++++++++++++++++++++++++++-- app/components/PostEditor.vue | 2 +- app/components/PubSelect.vue | 7 +- app/composables/useCustomTheme.ts | 2 +- app/composables/useSolarNetwork.ts | 37 ++++++--- app/layouts/default.vue | 34 ++++++++- app/pages/auth/login.vue | 85 +++++++++++---------- app/pages/index.vue | 7 +- app/stores/pub.ts | 22 ++++-- app/stores/user.ts | 37 ++++++--- bun.lock | 3 + eslint.config.mjs | 3 +- nuxt.config.ts | 13 +++- package.json | 1 + vuetify.config.ts | 44 +++++++++-- 16 files changed, 323 insertions(+), 95 deletions(-) diff --git a/app/app.vue b/app/app.vue index af13f7e..0fa1939 100644 --- a/app/app.vue +++ b/app/app.vue @@ -5,11 +5,9 @@ diff --git a/app/components/PostEditor.vue b/app/components/PostEditor.vue index 3eadb7e..3c2d501 100644 --- a/app/components/PostEditor.vue +++ b/app/components/PostEditor.vue @@ -67,7 +67,7 @@ const submitting = ref(false) async function submit() { submitting.value = true const api = useSolarNetwork() - await api(`/posts?pub=${publisher.value}`, { + await api(`/sphere/posts?pub=${publisher.value}`, { method: 'POST', headers: { 'content-type': 'application/json', diff --git a/app/components/PubSelect.vue b/app/components/PubSelect.vue index fcaa615..04c197b 100644 --- a/app/components/PubSelect.vue +++ b/app/components/PubSelect.vue @@ -10,21 +10,18 @@ - {{ item.raw?.nick }} @{{ item.raw?.name }}