mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:41:09 +02:00
feat: integrate shared-links into Calendar, Contacts, and ManaCore
Add @manacore/shared-links to Calendar, Contacts, and ManaCore apps. Link store initializes alongside tag store in each app's layout, syncs when authenticated, and is ready for cross-app linking. Also fix broken workspace references in moodlit (shared-feedback-service → feedback, shared-feedback-ui removed, shared-subscription-ui → subscriptions). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
06e5d9e22b
commit
1bbf0ef41e
7 changed files with 66 additions and 2 deletions
|
|
@ -43,6 +43,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@calendar/shared": "workspace:*",
|
||||
"@manacore/shared-links": "workspace:*",
|
||||
"@manacore/shared-api-client": "workspace:*",
|
||||
"@manacore/shared-app-onboarding": "workspace:*",
|
||||
"@manacore/shared-auth": "workspace:*",
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
tagMutations,
|
||||
useAllTags as useAllSharedTags,
|
||||
} from '@manacore/shared-stores';
|
||||
import { linkLocalStore, linkMutations } from '@manacore/shared-links';
|
||||
import { useAllCalendars, useAllEvents, getDefaultCalendar } from '$lib/data/queries';
|
||||
import { settingsStore } from '$lib/stores/settings.svelte';
|
||||
import { birthdaysStore } from '$lib/stores/birthdays.svelte';
|
||||
|
|
@ -449,7 +450,11 @@
|
|||
|
||||
async function handleAuthReady() {
|
||||
// Initialize local-first databases (opens IndexedDB, seeds guest data)
|
||||
await Promise.all([calendarStore.initialize(), tagLocalStore.initialize()]);
|
||||
await Promise.all([
|
||||
calendarStore.initialize(),
|
||||
tagLocalStore.initialize(),
|
||||
linkLocalStore.initialize(),
|
||||
]);
|
||||
|
||||
// Initialize split-panel from URL/localStorage
|
||||
splitPanel.initialize();
|
||||
|
|
@ -464,6 +469,7 @@
|
|||
const getToken = () => authStore.getValidToken();
|
||||
calendarStore.startSync(getToken);
|
||||
tagMutations.startSync(getToken);
|
||||
linkMutations.startSync(getToken);
|
||||
|
||||
// Load user settings (requires auth)
|
||||
await userSettings.load();
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
"@manacore/feedback": "workspace:*",
|
||||
"@manacore/help": "workspace:*",
|
||||
"@manacore/local-store": "workspace:*",
|
||||
"@manacore/shared-links": "workspace:*",
|
||||
"@manacore/shared-i18n": "workspace:*",
|
||||
"@manacore/shared-icons": "workspace:*",
|
||||
"@manacore/shared-profile-ui": "workspace:*",
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@
|
|||
tagMutations,
|
||||
useAllTags as useAllSharedTags,
|
||||
} from '@manacore/shared-stores';
|
||||
import { linkLocalStore, linkMutations } from '@manacore/shared-links';
|
||||
import { contactsOnboarding } from '$lib/stores/app-onboarding.svelte';
|
||||
import { MiniOnboardingModal } from '@manacore/shared-app-onboarding';
|
||||
import { SessionExpiredBanner, AuthGate, GuestWelcomeModal } from '@manacore/shared-auth-ui';
|
||||
|
|
@ -305,13 +306,18 @@
|
|||
|
||||
async function handleAuthReady() {
|
||||
// Initialize local-first databases (opens IndexedDB, seeds guest data)
|
||||
await Promise.all([contactsLocalStore.initialize(), tagLocalStore.initialize()]);
|
||||
await Promise.all([
|
||||
contactsLocalStore.initialize(),
|
||||
tagLocalStore.initialize(),
|
||||
linkLocalStore.initialize(),
|
||||
]);
|
||||
|
||||
// If authenticated, start syncing to server
|
||||
if (authStore.isAuthenticated) {
|
||||
const getToken = () => authStore.getValidToken();
|
||||
contactsLocalStore.startSync(getToken);
|
||||
tagMutations.startSync(getToken);
|
||||
linkMutations.startSync(getToken);
|
||||
}
|
||||
|
||||
// Initialize split-panel from URL/localStorage
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
"dependencies": {
|
||||
"@manacore/credits": "workspace:^",
|
||||
"@manacore/local-store": "workspace:*",
|
||||
"@manacore/shared-links": "workspace:*",
|
||||
"@manacore/qr-export": "workspace:*",
|
||||
"@manacore/shared-auth": "workspace:*",
|
||||
"@manacore/shared-auth-stores": "workspace:*",
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
import { PillNavigation, TagStrip } from '@manacore/shared-ui';
|
||||
import type { PillNavItem, PillDropdownItem } from '@manacore/shared-ui';
|
||||
import { tagLocalStore, tagMutations, useAllTags } from '$lib/stores/tags.svelte';
|
||||
import { linkLocalStore, linkMutations } from '@manacore/shared-links';
|
||||
import { manacoreStore } from '$lib/data/local-store';
|
||||
import {
|
||||
todoReader,
|
||||
|
|
@ -220,6 +221,7 @@
|
|||
await Promise.all([
|
||||
manacoreStore.initialize(),
|
||||
tagLocalStore.initialize(),
|
||||
linkLocalStore.initialize(),
|
||||
// Cross-app readers (read-only, no sync — owning apps handle sync)
|
||||
todoReader.initialize(),
|
||||
calendarReader.initialize(),
|
||||
|
|
@ -239,6 +241,7 @@
|
|||
const getToken = () => authStore.getValidToken();
|
||||
manacoreStore.startSync(getToken);
|
||||
tagMutations.startSync(getToken);
|
||||
linkMutations.startSync(getToken);
|
||||
|
||||
// Initialize dashboard from IndexedDB
|
||||
await dashboardStore.initialize();
|
||||
|
|
|
|||
46
apps/moodlit/apps/web/package.json
Normal file
46
apps/moodlit/apps/web/package.json
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"name": "@moodlit/web",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||
"lint": "eslint .",
|
||||
"format": "prettier --write .",
|
||||
"type-check": "echo 'Skipping type-check for now'"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sveltejs/adapter-auto": "^3.0.0",
|
||||
"@sveltejs/kit": "^2.0.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
||||
"@tailwindcss/vite": "^4.1.7",
|
||||
"@types/node": "^20.0.0",
|
||||
"prettier": "^3.1.1",
|
||||
"prettier-plugin-svelte": "^3.1.2",
|
||||
"svelte": "^5.0.0",
|
||||
"svelte-check": "^4.0.0",
|
||||
"tailwindcss": "^4.1.7",
|
||||
"tslib": "^2.4.1",
|
||||
"typescript": "^5.0.0",
|
||||
"vite": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@manacore/shared-auth": "workspace:*",
|
||||
"@manacore/shared-auth-ui": "workspace:*",
|
||||
"@manacore/shared-branding": "workspace:*",
|
||||
"@manacore/feedback": "workspace:*",
|
||||
"@manacore/shared-i18n": "workspace:*",
|
||||
"@manacore/shared-icons": "workspace:*",
|
||||
"@manacore/shared-profile-ui": "workspace:*",
|
||||
"@manacore/subscriptions": "workspace:*",
|
||||
"@manacore/shared-tailwind": "workspace:*",
|
||||
"@manacore/shared-theme": "workspace:*",
|
||||
"@manacore/shared-theme-ui": "workspace:*",
|
||||
"@manacore/shared-ui": "workspace:*",
|
||||
"svelte-i18n": "^4.0.1"
|
||||
},
|
||||
"type": "module"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue