feat(shared): Phase 6 — update app URLs and navigation for unified app

mana-apps.ts:
- Change all APP_URLS from subdomains to internal paths
  (e.g., https://todo.mana.howhttps://mana.how/todo)
- Keep separate subdomains only for games (arcade) and matrix

PillNavigation, AppDrawer, GlobalSpotlight:
- Detect internal URLs and navigate directly instead of window.open
- External URLs (games, matrix) still open in new tab

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-01 21:19:14 +02:00
parent 8fe16b20f4
commit 59e1e8e833
4 changed files with 72 additions and 88 deletions

View file

@ -723,40 +723,49 @@ export const APP_SLIDER_LABELS = {
/**
* Default app URLs for local development and production
*/
/**
* App URLs unified app uses internal paths, separate apps use subdomains.
*
* All productivity apps are now served under mana.how/{appId}.
* Games and Matrix remain on separate subdomains.
*/
export const APP_URLS: Record<AppIconId, { dev: string; prod: string }> = {
chat: { dev: 'http://localhost:5174', prod: 'https://chat.mana.how' },
memoro: { dev: 'http://localhost:5175', prod: 'https://memoro.mana.how' },
presi: { dev: 'http://localhost:5176', prod: 'https://presi.mana.how' },
cards: { dev: 'http://localhost:5177', prod: 'https://cards.mana.how' },
picture: { dev: 'http://localhost:5185', prod: 'https://picture.mana.how' },
zitare: { dev: 'http://localhost:5180', prod: 'https://zitare.mana.how' },
wisekeep: { dev: 'http://localhost:5181', prod: 'https://wisekeep.mana.how' },
nutriphi: { dev: 'http://localhost:5182', prod: 'https://nutriphi.mana.how' },
// ─── Unified App (internal paths) ─────────────────────────
manacore: { dev: 'http://localhost:5173', prod: 'https://mana.how' },
mana: { dev: 'http://localhost:5173', prod: 'https://mana.how' },
moodlit: { dev: 'http://localhost:5182', prod: 'https://moodlit.mana.how' },
contacts: { dev: 'http://localhost:5184', prod: 'https://contacts.mana.how' },
calendar: { dev: 'http://localhost:5179', prod: 'https://calendar.mana.how' },
storage: { dev: 'http://localhost:5185', prod: 'https://storage.mana.how' },
clock: { dev: 'http://localhost:5187', prod: 'https://clock.mana.how' },
todo: { dev: 'http://localhost:5188', prod: 'https://todo.mana.how' },
mail: { dev: 'http://localhost:5186', prod: 'https://mail.mana.how' },
inventory: { dev: 'http://localhost:5189', prod: 'https://inventory.mana.how' },
questions: { dev: 'http://localhost:5111', prod: 'https://questions.mana.how' },
matrix: { dev: 'http://localhost:5180', prod: 'https://matrix.mana.how' },
playground: { dev: 'http://localhost:5190', prod: 'https://playground.mana.how' },
context: { dev: 'http://localhost:5192', prod: 'https://context.mana.how' },
citycorners: { dev: 'http://localhost:5196', prod: 'https://citycorners.mana.how' },
times: { dev: 'http://localhost:5197', prod: 'https://times.mana.how' },
uload: { dev: 'http://localhost:5173', prod: 'https://ulo.ad' },
todo: { dev: 'http://localhost:5173/todo', prod: 'https://mana.how/todo' },
calendar: { dev: 'http://localhost:5173/calendar', prod: 'https://mana.how/calendar' },
contacts: { dev: 'http://localhost:5173/contacts', prod: 'https://mana.how/contacts' },
chat: { dev: 'http://localhost:5173/chat', prod: 'https://mana.how/chat' },
picture: { dev: 'http://localhost:5173/picture', prod: 'https://mana.how/picture' },
cards: { dev: 'http://localhost:5173/cards', prod: 'https://mana.how/cards' },
zitare: { dev: 'http://localhost:5173/zitare', prod: 'https://mana.how/zitare' },
clock: { dev: 'http://localhost:5173/clock', prod: 'https://mana.how/clock' },
mukke: { dev: 'http://localhost:5173/mukke', prod: 'https://mana.how/mukke' },
storage: { dev: 'http://localhost:5173/storage', prod: 'https://mana.how/storage' },
presi: { dev: 'http://localhost:5173/presi', prod: 'https://mana.how/presi' },
inventar: { dev: 'http://localhost:5173/inventar', prod: 'https://mana.how/inventar' },
inventory: { dev: 'http://localhost:5173/inventar', prod: 'https://mana.how/inventar' },
photos: { dev: 'http://localhost:5173/photos', prod: 'https://mana.how/photos' },
skilltree: { dev: 'http://localhost:5173/skilltree', prod: 'https://mana.how/skilltree' },
citycorners: { dev: 'http://localhost:5173/citycorners', prod: 'https://mana.how/citycorners' },
times: { dev: 'http://localhost:5173/times', prod: 'https://mana.how/times' },
context: { dev: 'http://localhost:5173/context', prod: 'https://mana.how/context' },
questions: { dev: 'http://localhost:5173/questions', prod: 'https://mana.how/questions' },
nutriphi: { dev: 'http://localhost:5173/nutriphi', prod: 'https://mana.how/nutriphi' },
planta: { dev: 'http://localhost:5173/planta', prod: 'https://mana.how/planta' },
uload: { dev: 'http://localhost:5173/uload', prod: 'https://mana.how/uload' },
calc: { dev: 'http://localhost:5173/calc', prod: 'https://mana.how/calc' },
moodlit: { dev: 'http://localhost:5173/moodlit', prod: 'https://mana.how/moodlit' },
memoro: { dev: 'http://localhost:5173/memoro', prod: 'https://mana.how/memoro' },
playground: { dev: 'http://localhost:5173/playground', prod: 'https://mana.how/playground' },
guides: { dev: 'http://localhost:5173/guides', prod: 'https://mana.how/guides' },
wisekeep: { dev: 'http://localhost:5173/wisekeep', prod: 'https://mana.how/wisekeep' },
news: { dev: 'http://localhost:5173/news', prod: 'https://mana.how/news' },
mail: { dev: 'http://localhost:5173/mail', prod: 'https://mana.how/mail' },
reader: { dev: 'exp://localhost:8081', prod: 'https://reader.mana.how' },
news: { dev: 'http://localhost:5174', prod: 'https://news.mana.how' },
calc: { dev: 'http://localhost:5198', prod: 'https://calc.mana.how' },
guides: { dev: 'http://localhost:5200', prod: 'https://guides.mana.how' },
mukke: { dev: 'http://localhost:5191', prod: 'https://mukke.mana.how' },
photos: { dev: 'http://localhost:5193', prod: 'https://photos.mana.how' },
planta: { dev: 'http://localhost:5194', prod: 'https://planta.mana.how' },
skilltree: { dev: 'http://localhost:5195', prod: 'https://skilltree.mana.how' },
// ─── Separate Apps (own subdomains) ───────────────────────
matrix: { dev: 'http://localhost:5180', prod: 'https://matrix.mana.how' },
arcade: { dev: 'http://localhost:5201', prod: 'https://arcade.mana.how' },
};