diff --git a/.env.example b/.env.example index 1643766..9e80e61 100644 --- a/.env.example +++ b/.env.example @@ -58,7 +58,7 @@ VITE_MARKET_NADDR=naddr1qqjxgdp4vv6rydej943n2dny956rwwf4943xzwfc95ekyd3evenrsvrr # In LOCAL DEV with `npm run dev:all` use the per-app dev ports (defined # in the vite configs): # VITE_HUB_ACTIVITIES_URL=http://localhost:5181 -# VITE_HUB_CASTLE_URL=http://localhost:5180 +# VITE_HUB_LIBRA_URL=http://localhost:5180 # VITE_HUB_WALLET_URL=http://localhost:5182 # VITE_HUB_CHAT_URL=http://localhost:5183 # VITE_HUB_FORUM_URL=http://localhost:5184 @@ -67,7 +67,7 @@ VITE_MARKET_NADDR=naddr1qqjxgdp4vv6rydej943n2dny956rwwf4943xzwfc95ekyd3evenrsvrr # # In PATH-MODE production (recommended for demo) — note the trailing slash: # VITE_HUB_ACTIVITIES_URL=https://demo.example.com/activities/ -# VITE_HUB_CASTLE_URL=https://demo.example.com/castle/ +# VITE_HUB_LIBRA_URL=https://demo.example.com/libra/ # VITE_HUB_WALLET_URL=https://demo.example.com/wallet/ # VITE_HUB_CHAT_URL=https://demo.example.com/chat/ # VITE_HUB_FORUM_URL=https://demo.example.com/forum/ @@ -76,11 +76,11 @@ VITE_MARKET_NADDR=naddr1qqjxgdp4vv6rydej943n2dny956rwwf4943xzwfc95ekyd3evenrsvrr # # In SUBDOMAIN-MODE production: # VITE_HUB_ACTIVITIES_URL=https://sortir.example.com -# VITE_HUB_CASTLE_URL=https://castle.example.com +# VITE_HUB_LIBRA_URL=https://libra.example.com # ...etc # ─────────────────────────────────────────────────────────────────────── VITE_HUB_ACTIVITIES_URL= -VITE_HUB_CASTLE_URL= +VITE_HUB_LIBRA_URL= VITE_HUB_WALLET_URL= VITE_HUB_CHAT_URL= VITE_HUB_FORUM_URL= diff --git a/castle.html b/libra.html similarity index 88% rename from castle.html rename to libra.html index cee9c6f..58927c4 100644 --- a/castle.html +++ b/libra.html @@ -9,8 +9,8 @@ - Castle — Accounting - + Libra — Accounting + diff --git a/nginx.conf.example b/nginx.conf.example index 662b4c9..d3163ee 100644 --- a/nginx.conf.example +++ b/nginx.conf.example @@ -21,7 +21,7 @@ http { # demo../chat/ — chat standalone # demo../forum/ — forum standalone # demo../tasks/ — tasks standalone - # demo../castle/ — castle (accounting) standalone + # demo../libra/ — libra (accounting) standalone # # Each standalone is built with VITE_BASE_PATH=// so its asset URLs # are prefixed correctly. The hub's chakra tiles point at the canonical @@ -88,11 +88,11 @@ http { try_files $uri $uri/ /tasks.html; } - # ── Castle (accounting) ────────────────────────────────────────── - location = /castle { return 301 /castle/$is_args$args; } - location /castle/ { - alias /var/www/aio/dist-castle/; - try_files $uri $uri/ /castle.html; + # ── Libra (accounting) ────────────────────────────────────────── + location = /libra { return 301 /libra/$is_args$args; } + location /libra/ { + alias /var/www/aio/dist-libra/; + try_files $uri $uri/ /libra.html; } # ── Static asset MIME / cache (applies to all bundles) ─────────── @@ -142,8 +142,8 @@ http { } server { listen 8080; - server_name castle.demo..; - return 301 https://demo../castle/$request_uri; + server_name libra.demo..; + return 301 https://demo../libra/$request_uri; } # ─────────────────────────────────────────────────────────────────────── @@ -159,7 +159,7 @@ http { # server { server_name chat.; root /var/www/aio/dist-chat; ... } # server { server_name forum.; root /var/www/aio/dist-forum; ... } # server { server_name tasks.; root /var/www/aio/dist-tasks; ... } - # server { server_name castle.; root /var/www/aio/dist-castle; ... } + # server { server_name libra.; root /var/www/aio/dist-libra; ... } # # Each block uses `location / { try_files $uri $uri/ /.html; }`. # In subdomain mode, build each standalone WITHOUT VITE_BASE_PATH (the diff --git a/package.json b/package.json index b1b19cc..89785e6 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,9 @@ "dev:activities": "vite --host --config vite.activities.config.ts", "build:activities": "vue-tsc -b && vite build --config vite.activities.config.ts", "preview:activities": "vite preview --host --config vite.activities.config.ts", - "dev:castle": "vite --host --config vite.castle.config.ts", - "build:castle": "vue-tsc -b && vite build --config vite.castle.config.ts", - "preview:castle": "vite preview --host --config vite.castle.config.ts", + "dev:libra": "vite --host --config vite.libra.config.ts", + "build:libra": "vue-tsc -b && vite build --config vite.libra.config.ts", + "preview:libra": "vite preview --host --config vite.libra.config.ts", "dev:wallet": "vite --host --config vite.wallet.config.ts", "build:wallet": "vue-tsc -b && vite build --config vite.wallet.config.ts", "preview:wallet": "vite preview --host --config vite.wallet.config.ts", @@ -30,8 +30,8 @@ "dev:forum": "vite --host --config vite.forum.config.ts", "build:forum": "vue-tsc -b && vite build --config vite.forum.config.ts", "preview:forum": "vite preview --host --config vite.forum.config.ts", - "dev:all": "concurrently -n hub,castle,sortir,wallet,chat,forum,market,tasks -c blue,magenta,cyan,yellow,green,blue,red,gray \"npm:dev\" \"npm:dev:castle\" \"npm:dev:activities\" \"npm:dev:wallet\" \"npm:dev:chat\" \"npm:dev:forum\" \"npm:dev:market\" \"npm:dev:tasks\"", - "build:demo": "npm run build && VITE_BASE_PATH=/sortir/ npm run build:activities && VITE_BASE_PATH=/castle/ npm run build:castle && VITE_BASE_PATH=/wallet/ npm run build:wallet && VITE_BASE_PATH=/chat/ npm run build:chat && VITE_BASE_PATH=/forum/ npm run build:forum && VITE_BASE_PATH=/market/ npm run build:market && VITE_BASE_PATH=/tasks/ npm run build:tasks", + "dev:all": "concurrently -n hub,libra,sortir,wallet,chat,forum,market,tasks -c blue,magenta,cyan,yellow,green,blue,red,gray \"npm:dev\" \"npm:dev:libra\" \"npm:dev:activities\" \"npm:dev:wallet\" \"npm:dev:chat\" \"npm:dev:forum\" \"npm:dev:market\" \"npm:dev:tasks\"", + "build:demo": "npm run build && VITE_BASE_PATH=/sortir/ npm run build:activities && VITE_BASE_PATH=/libra/ npm run build:libra && VITE_BASE_PATH=/wallet/ npm run build:wallet && VITE_BASE_PATH=/chat/ npm run build:chat && VITE_BASE_PATH=/forum/ npm run build:forum && VITE_BASE_PATH=/market/ npm run build:market && VITE_BASE_PATH=/tasks/ npm run build:tasks", "electron:dev": "concurrently \"vite --host\" \"electron-forge start\"", "electron:build": "vue-tsc -b && vite build && electron-builder", "electron:package": "electron-builder", diff --git a/src/accounting-app/App.vue b/src/accounting-app/App.vue index f9e24ad..c0f02ce 100644 --- a/src/accounting-app/App.vue +++ b/src/accounting-app/App.vue @@ -23,11 +23,11 @@ const showLoginDialog = ref(false) // Bottom navigation tabs const bottomTabs = computed(() => [ - { name: t('castle.nav.record'), icon: PlusCircle, path: '/record' }, - { name: t('castle.nav.transactions'), icon: List, path: '/expenses/transactions' }, - { name: t('castle.nav.balance'), icon: Scale, path: '/balance' }, - { name: t('castle.nav.wallet'), icon: Wallet, path: '/wallet' }, - { name: t('castle.nav.settings'), icon: Settings, path: '/settings' }, + { name: t('libra.nav.record'), icon: PlusCircle, path: '/record' }, + { name: t('libra.nav.transactions'), icon: List, path: '/expenses/transactions' }, + { name: t('libra.nav.balance'), icon: Scale, path: '/balance' }, + { name: t('libra.nav.wallet'), icon: Wallet, path: '/wallet' }, + { name: t('libra.nav.settings'), icon: Settings, path: '/settings' }, ]) const isLoginPage = computed(() => route.path === '/login') diff --git a/src/accounting-app/app.config.ts b/src/accounting-app/app.config.ts index e588657..2b54471 100644 --- a/src/accounting-app/app.config.ts +++ b/src/accounting-app/app.config.ts @@ -1,7 +1,7 @@ import type { AppConfig } from '@/core/types' /** - * Standalone Castle accounting app configuration. + * Standalone Libra accounting app configuration. * Only enables base + expenses + wallet modules. */ export const appConfig: AppConfig = { diff --git a/src/accounting-app/app.ts b/src/accounting-app/app.ts index eb20adf..22ef5cb 100644 --- a/src/accounting-app/app.ts +++ b/src/accounting-app/app.ts @@ -18,13 +18,13 @@ import { installStrictAuthGuard, markAuthReady, catchAllRoute } from '@/lib/rout import { acceptTokenFromUrl } from '@/lib/url-token' /** - * Initialize the standalone Castle accounting app + * Initialize the standalone Libra accounting app */ export async function createAppInstance() { - console.log('Starting Castle — Accounting App...') + console.log('Starting Libra — Accounting App...') // Accept token from URL before anything else (cross-subdomain auth relay) - acceptTokenFromUrl('Castle') + acceptTokenFromUrl('Libra') const app = createApp(App) @@ -75,7 +75,7 @@ export async function createAppInstance() { ] }) - // Castle has no public view — every non-login route requires auth. + // Libra has no public view — every non-login route requires auth. installStrictAuthGuard(router) const pinia = createPinia() @@ -135,7 +135,7 @@ export async function createAppInstance() { ;(window as any).__container = container } - console.log('Castle app initialized') + console.log('Libra app initialized') return { app, router } } @@ -143,10 +143,10 @@ export async function startApp() { try { const { app } = await createAppInstance() app.mount('#app') - console.log('Castle app started!') + console.log('Libra app started!') eventBus.emit('app:started', {}, 'app') } catch (error) { - console.error('Failed to start Castle app:', error) + console.error('Failed to start Libra app:', error) document.getElementById('app')!.innerHTML = `

Failed to Start

diff --git a/src/accounting-app/composables/useExpenseDrafts.ts b/src/accounting-app/composables/useExpenseDrafts.ts index 54079c5..dbee59c 100644 --- a/src/accounting-app/composables/useExpenseDrafts.ts +++ b/src/accounting-app/composables/useExpenseDrafts.ts @@ -30,7 +30,7 @@ export interface ExpenseDraft { btc_price_snapshot?: BtcPriceSnapshot } -const STORAGE_KEY = 'castle-expense-drafts' +const STORAGE_KEY = 'libra-expense-drafts' /** * Composable for managing expense drafts in localStorage. diff --git a/src/accounting-app/main.ts b/src/accounting-app/main.ts index ed477b2..5460c87 100644 --- a/src/accounting-app/main.ts +++ b/src/accounting-app/main.ts @@ -14,7 +14,7 @@ registerSW({ }, intervalMS) }, onOfflineReady() { - console.log('Castle app ready to work offline') + console.log('Libra app ready to work offline') } }) diff --git a/src/accounting-app/views/AddIncome.vue b/src/accounting-app/views/AddIncome.vue index 1842df1..e3a009f 100644 --- a/src/accounting-app/views/AddIncome.vue +++ b/src/accounting-app/views/AddIncome.vue @@ -28,10 +28,10 @@ function handleClose() { - {{ t('castle.income.title') }} + {{ t('libra.income.title') }} - {{ t('castle.income.description') }} + {{ t('libra.income.description') }} @@ -41,7 +41,7 @@ function handleClose() {

- {{ t('castle.income.notAvailable') }} + {{ t('libra.income.notAvailable') }}