From 18f48581cd71d0d5267500bb567c9321aa27b299 Mon Sep 17 00:00:00 2001 From: padreug Date: Fri, 5 Sep 2025 05:29:58 +0200 Subject: [PATCH] Remove RelayHubStatus, NostrFeed, and related composables for codebase cleanup - Delete RelayHubStatus.vue and its associated components to streamline the application structure. - Remove NostrFeed.vue to eliminate unused functionality and improve maintainability. - Eliminate the legacy useRelayHub composable, reflecting a shift towards modular service architecture. - Clean up router configuration by removing references to deleted components, enhancing clarity and organization. --- src/components/RelayHubStatus.vue | 332 ---------------------------- src/components/nostr/NostrFeed.vue | 336 ----------------------------- src/composables/useRelayHub.ts | 7 - src/pages/RelayHubStatus.vue | 331 ---------------------------- src/router/index.ts | 71 ------ 5 files changed, 1077 deletions(-) delete mode 100644 src/components/RelayHubStatus.vue delete mode 100644 src/components/nostr/NostrFeed.vue delete mode 100644 src/composables/useRelayHub.ts delete mode 100644 src/pages/RelayHubStatus.vue delete mode 100644 src/router/index.ts diff --git a/src/components/RelayHubStatus.vue b/src/components/RelayHubStatus.vue deleted file mode 100644 index 8222440..0000000 --- a/src/components/RelayHubStatus.vue +++ /dev/null @@ -1,332 +0,0 @@ - - - - - diff --git a/src/components/nostr/NostrFeed.vue b/src/components/nostr/NostrFeed.vue deleted file mode 100644 index 1723445..0000000 --- a/src/components/nostr/NostrFeed.vue +++ /dev/null @@ -1,336 +0,0 @@ - - - diff --git a/src/composables/useRelayHub.ts b/src/composables/useRelayHub.ts deleted file mode 100644 index d20eb01..0000000 --- a/src/composables/useRelayHub.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Legacy composable stub - replaced by modular base module services -export function useRelayHub() { - return { - connectedRelays: [], - status: 'disconnected' - } -} \ No newline at end of file diff --git a/src/pages/RelayHubStatus.vue b/src/pages/RelayHubStatus.vue deleted file mode 100644 index c7c213a..0000000 --- a/src/pages/RelayHubStatus.vue +++ /dev/null @@ -1,331 +0,0 @@ - - - - - diff --git a/src/router/index.ts b/src/router/index.ts deleted file mode 100644 index c06616d..0000000 --- a/src/router/index.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { createRouter, createWebHistory } from 'vue-router' -import { auth } from '@/composables/useAuth' -import Home from '@/pages/Home.vue' -import LoginDemo from '@/pages/LoginDemo.vue' - -const router = createRouter({ - history: createWebHistory(), - routes: [ - { - path: '/', - name: 'home', - component: Home, - meta: { - requiresAuth: true - } - }, - { - path: '/login', - name: 'login', - component: LoginDemo, - meta: { - requiresAuth: false - } - }, - { - path: '/cart', - name: 'cart', - component: () => import('@/pages/Cart.vue'), - meta: { - title: 'Shopping Cart', - requiresAuth: true - } - }, - { - path: '/order-history', - name: 'OrderHistory', - component: () => import('@/pages/OrderHistory.vue'), - meta: { requiresAuth: true } - }, - { - path: '/relay-hub-status', - name: 'relay-hub-status', - component: () => import('@/pages/RelayHubStatus.vue'), - meta: { - title: 'Relay Hub Status', - requiresAuth: true - } - }, - - ] -}) - -// Navigation guard to check authentication -router.beforeEach(async (to, _from, next) => { - // Initialize auth if not already done - if (!auth.isAuthenticated.value && auth.checkAuth()) { - await auth.initialize() - } - - if (to.meta.requiresAuth && !auth.isAuthenticated.value) { - // Redirect to login if authentication is required but user is not authenticated - next('/login') - } else if (to.path === '/login' && auth.isAuthenticated.value) { - // Redirect to home if user is already authenticated and trying to access login - next('/') - } else { - next() - } -}) - -export default router