From e309c56a861349d540920e704ebebb77a4d62096 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Thu, 20 Jun 2024 16:09:09 -1000 Subject: [PATCH] refactor: :recycle: Disable Nuxt component auto-importing (obscures code flow) --- .vscode/settings.json | 3 +- app.vue | 2 + .../avatars/{Centered.vue => avatar.vue} | 1 + .../buttons/{base.vue => button-base.vue} | 0 ...ropdownElement.vue => button-dropdown.vue} | 5 +- ...ar-button.vue => button-mobile-navbar.vue} | 6 +- .../{primary.vue => button-primary.vue} | 5 +- .../{secondary.vue => button-secondary.vue} | 5 +- components/composer/composer.vue | 42 +++++---- components/composer/emoji-suggestbox.vue | 5 +- components/composer/file-uploader.vue | 9 +- components/composer/mention-suggestbox.vue | 5 +- components/composer/modal.client.vue | 1 + components/errors/ErrorBoundary.vue | 7 +- components/errors/noscript.vue | 6 +- components/headers/greeting.vue | 4 +- .../{checkbox.vue => checkbox-input.vue} | 3 +- .../inputs/{error.vue => field-error.vue} | 0 .../{password.vue => password-input.vue} | 8 +- ...ich-textbox.vue => rich-textbox-input.vue} | 6 +- .../inputs/{text.vue => text-input.vue} | 0 ...enderer.vue => notifications-renderer.vue} | 0 components/settings/oidc.vue | 13 +-- components/settings/profile-editor.vue | 26 +++--- components/sidebars/account-picker.vue | 19 ++-- components/sidebars/navigation.vue | 45 +++++----- .../{settings.vue => settings-sidebar.vue} | 5 +- .../social-elements/instance/Presentation.vue | 4 +- components/social-elements/notes/header.vue | 6 +- components/social-elements/notes/mention.vue | 2 +- .../social-elements/notes/note-content.vue | 12 +-- components/social-elements/notes/note.vue | 82 +++++++++--------- .../social-elements/notes/reply-header.vue | 5 +- .../social-elements/notifications/notif.vue | 23 +++-- components/social-elements/users/Account.vue | 32 ++++--- .../social-elements/users/SmallCard.vue | 4 +- .../timelines/{Account.vue => account.vue} | 4 +- components/timelines/{Home.vue => home.vue} | 4 +- components/timelines/{Local.vue => local.vue} | 4 +- .../{Notifications.vue => notifications.vue} | 6 +- .../timelines/{Public.vue => public.vue} | 4 +- ...lineScroller.vue => timeline-scroller.vue} | 0 components/timelines/timeline.vue | 5 +- layouts/app.vue | 25 ++++-- layouts/default.vue | 4 +- nuxt.config.ts | 3 + pages/[username]/[uuid].vue | 10 ++- pages/[username]/index.vue | 16 ++-- pages/home.vue | 12 ++- pages/index.vue | 12 ++- pages/local.vue | 12 ++- pages/notifications.vue | 12 ++- pages/oauth/authorize.vue | 42 +++++---- pages/oauth/consent.vue | 7 +- pages/oauth/reset.vue | 36 ++++---- pages/public.vue | 12 ++- pages/register/index.vue | 86 ++++++++++--------- pages/settings/index.vue | 15 ++-- 58 files changed, 440 insertions(+), 292 deletions(-) rename components/avatars/{Centered.vue => avatar.vue} (91%) rename components/buttons/{base.vue => button-base.vue} (100%) rename components/buttons/{DropdownElement.vue => button-dropdown.vue} (67%) rename components/buttons/{mobile-navbar-button.vue => button-mobile-navbar.vue} (82%) rename components/buttons/{primary.vue => button-primary.vue} (87%) rename components/buttons/{secondary.vue => button-secondary.vue} (89%) rename components/inputs/{checkbox.vue => checkbox-input.vue} (73%) rename components/inputs/{error.vue => field-error.vue} (100%) rename components/inputs/{password.vue => password-input.vue} (86%) rename components/inputs/{rich-textbox.vue => rich-textbox-input.vue} (90%) rename components/inputs/{text.vue => text-input.vue} (100%) rename components/notifications/{Renderer.vue => notifications-renderer.vue} (100%) rename components/sidebars/{settings.vue => settings-sidebar.vue} (86%) rename components/timelines/{Account.vue => account.vue} (77%) rename components/timelines/{Home.vue => home.vue} (73%) rename components/timelines/{Local.vue => local.vue} (73%) rename components/timelines/{Notifications.vue => notifications.vue} (85%) rename components/timelines/{Public.vue => public.vue} (73%) rename components/timelines/{TimelineScroller.vue => timeline-scroller.vue} (100%) diff --git a/.vscode/settings.json b/.vscode/settings.json index 74fb340..462b174 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,4 @@ { - "conventionalCommits.scopes": ["build"] + "conventionalCommits.scopes": ["build"], + "typescript.tsdk": "node_modules/typescript/lib" } diff --git a/app.vue b/app.vue index e3135b8..7698dca 100644 --- a/app.vue +++ b/app.vue @@ -13,6 +13,8 @@ import "~/styles/theme.css"; import { convert } from "html-to-text"; import "iconify-icon"; +import Loading from "./components/loading.vue"; +import NotificationsRenderer from "./components/notifications/notifications-renderer.vue"; // Use SSR-safe IDs for Headless UI provideHeadlessUseId(() => useId()); diff --git a/components/avatars/Centered.vue b/components/avatars/avatar.vue similarity index 91% rename from components/avatars/Centered.vue rename to components/avatars/avatar.vue index 8dc7719..176e95b 100644 --- a/components/avatars/Centered.vue +++ b/components/avatars/avatar.vue @@ -8,6 +8,7 @@ + \ No newline at end of file diff --git a/components/social-elements/notes/note-content.vue b/components/social-elements/notes/note-content.vue index 55c2f35..0b994a3 100644 --- a/components/social-elements/notes/note-content.vue +++ b/components/social-elements/notes/note-content.vue @@ -9,11 +9,9 @@
- +
- +
@@ -22,12 +20,16 @@ {{ note.spoiler_text }} - Show content + Show content
\ No newline at end of file diff --git a/nuxt.config.ts b/nuxt.config.ts index 03527d1..8589e67 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -15,6 +15,9 @@ export default defineNuxtConfig({ isCustomElement: (tag) => tag === "iconify-icon", }, }, + components: { + dirs: [], + }, future: { compatibilityVersion: 4, }, diff --git a/pages/[username]/[uuid].vue b/pages/[username]/[uuid].vue index 6b9c888..8ae1d29 100644 --- a/pages/[username]/[uuid].vue +++ b/pages/[username]/[uuid].vue @@ -1,17 +1,19 @@