From 53d0812efd028736f4ed21458a2a9a1605e0a66c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20S=C3=A1nchez?= Date: Sun, 5 Feb 2023 13:10:19 +0100 Subject: [PATCH] feat: allow running elk with a single server (#1606) --- components/modal/ModalContainer.vue | 4 + components/modal/ModalError.vue | 31 ++++++++ components/nav/NavUser.vue | 27 ++++++- components/user/UserSignIn.vue | 69 +++-------------- components/user/UserSignInEntry.vue | 18 ++++- components/user/UserSwitcher.vue | 9 ++- composables/cache.ts | 10 ++- composables/command.ts | 6 +- composables/dialog.ts | 15 +++- composables/sign-in.ts | 77 +++++++++++++++++++ composables/users.ts | 2 +- locales/en.json | 1 + locales/es.json | 1 + ...malink.global.ts => 1.permalink.global.ts} | 10 ++- middleware/2.single-instance.global.ts | 10 +++ middleware/auth.ts | 1 + nuxt.config.ts | 1 + pages/[[server]]/@[account]/index.vue | 2 +- pages/[[server]]/list/[list]/index.vue | 8 +- plugins/masto.ts | 1 + plugins/social.server.ts | 2 +- types/index.ts | 6 ++ 22 files changed, 232 insertions(+), 79 deletions(-) create mode 100644 components/modal/ModalError.vue create mode 100644 composables/sign-in.ts rename middleware/{permalink.global.ts => 1.permalink.global.ts} (81%) create mode 100644 middleware/2.single-instance.global.ts diff --git a/components/modal/ModalContainer.vue b/components/modal/ModalContainer.vue index 64ea572e..94bcfe92 100644 --- a/components/modal/ModalContainer.vue +++ b/components/modal/ModalContainer.vue @@ -5,6 +5,7 @@ import { isCommandPanelOpen, isConfirmDialogOpen, isEditHistoryDialogOpen, + isErrorDialogOpen, isFavouritedBoostedByDialogOpen, isMediaPreviewOpen, isPreviewHelpOpen, @@ -87,6 +88,9 @@ const handleFavouritedBoostedByClose = () => { + + + +import type { ErrorDialogData } from '~/types' + +defineProps() + + + diff --git a/components/nav/NavUser.vue b/components/nav/NavUser.vue index d86de13d..33b85e82 100644 --- a/components/nav/NavUser.vue +++ b/components/nav/NavUser.vue @@ -1,3 +1,7 @@ + + - + diff --git a/components/user/UserSignIn.vue b/components/user/UserSignIn.vue index eccf641c..97621bc2 100644 --- a/components/user/UserSignIn.vue +++ b/components/user/UserSignIn.vue @@ -1,66 +1,21 @@ diff --git a/components/user/UserSignInEntry.vue b/components/user/UserSignInEntry.vue index d6274495..0d78abc2 100644 --- a/components/user/UserSignInEntry.vue +++ b/components/user/UserSignInEntry.vue @@ -1,3 +1,7 @@ + +