mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-19 13:13:35 +02:00
fix(manacore/web): build fixes for unified app — toast store, Svelte 5 syntax, icon imports
Add missing toast.svelte.ts store for zitare module, fix onclick|stopPropagation to Svelte 5 syntax in calendar, replace non-existent StarFill with Star weight="fill" in contacts, fix calc skins import path, add app-specific shared packages to vite config, and improve login error handling for invalid credentials. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
709e781ecd
commit
76ae64a4d6
9 changed files with 67 additions and 154 deletions
|
|
@ -67,6 +67,9 @@
|
|||
"@manacore/shared-ui": "workspace:*",
|
||||
"@manacore/shared-utils": "workspace:*",
|
||||
"@manacore/wallpaper-generator": "workspace:*",
|
||||
"@calc/shared": "workspace:*",
|
||||
"@clock/shared": "workspace:*",
|
||||
"@zitare/content": "workspace:*",
|
||||
"date-fns": "^4.1.0",
|
||||
"svelte-dnd-action": "^0.9.68",
|
||||
"svelte-i18n": "^4.0.0"
|
||||
|
|
|
|||
33
apps/manacore/apps/web/src/lib/stores/toast.svelte.ts
Normal file
33
apps/manacore/apps/web/src/lib/stores/toast.svelte.ts
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
// Simple toast notification store
|
||||
|
||||
type ToastType = 'success' | 'error' | 'info' | 'warning';
|
||||
|
||||
interface Toast {
|
||||
id: string;
|
||||
message: string;
|
||||
type: ToastType;
|
||||
}
|
||||
|
||||
let toasts = $state<Toast[]>([]);
|
||||
|
||||
function addToast(message: string, type: ToastType = 'info', duration = 3000) {
|
||||
const id = crypto.randomUUID();
|
||||
toasts = [...toasts, { id, message, type }];
|
||||
|
||||
setTimeout(() => {
|
||||
toasts = toasts.filter((t) => t.id !== id);
|
||||
}, duration);
|
||||
}
|
||||
|
||||
export const toast = {
|
||||
get toasts() {
|
||||
return toasts;
|
||||
},
|
||||
success: (message: string) => addToast(message, 'success'),
|
||||
error: (message: string) => addToast(message, 'error'),
|
||||
info: (message: string) => addToast(message, 'info'),
|
||||
warning: (message: string) => addToast(message, 'warning'),
|
||||
dismiss: (id: string) => {
|
||||
toasts = toasts.filter((t) => t.id !== id);
|
||||
},
|
||||
};
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
CasioSkin,
|
||||
TI84Skin,
|
||||
MinimalSkin,
|
||||
} from '$lib/modules/calc/components/skins';
|
||||
} from '$lib/modules/calc/components';
|
||||
|
||||
const allCalculations = useAllCalculations();
|
||||
|
||||
|
|
|
|||
|
|
@ -291,7 +291,10 @@
|
|||
)}"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
onclick|stopPropagation={() => openEditEvent(event)}
|
||||
onclick={(e) => {
|
||||
e.stopPropagation();
|
||||
openEditEvent(event);
|
||||
}}
|
||||
onkeydown={(e) => e.key === 'Enter' && openEditEvent(event)}
|
||||
>
|
||||
{event.title}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
MagnifyingGlass,
|
||||
Plus,
|
||||
Star,
|
||||
StarFill,
|
||||
Archive,
|
||||
Trash,
|
||||
PencilSimple,
|
||||
|
|
@ -260,7 +259,7 @@
|
|||
{getDisplayName(contact)}
|
||||
</span>
|
||||
{#if contact.isFavorite}
|
||||
<StarFill size={14} class="flex-shrink-0 text-amber-500" />
|
||||
<Star weight="fill" size={14} class="flex-shrink-0 text-amber-500" />
|
||||
{/if}
|
||||
</div>
|
||||
{#if contact.company || contact.jobTitle}
|
||||
|
|
@ -290,7 +289,7 @@
|
|||
title={contact.isFavorite ? 'Favorit entfernen' : 'Zu Favoriten'}
|
||||
>
|
||||
{#if contact.isFavorite}
|
||||
<StarFill size={14} />
|
||||
<Star weight="fill" size={14} />
|
||||
{:else}
|
||||
<Star size={14} />
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
import {
|
||||
CaretLeft,
|
||||
Star,
|
||||
StarFill,
|
||||
Archive,
|
||||
Trash,
|
||||
PencilSimple,
|
||||
|
|
@ -132,7 +131,7 @@
|
|||
<div class="flex items-center gap-2">
|
||||
<h1 class="text-xl font-bold text-foreground">{getDisplayName(contact)}</h1>
|
||||
{#if contact.isFavorite}
|
||||
<StarFill size={18} class="text-amber-500" />
|
||||
<Star weight="fill" size={18} class="text-amber-500" />
|
||||
{/if}
|
||||
</div>
|
||||
{#if contact.company || contact.jobTitle}
|
||||
|
|
@ -157,7 +156,7 @@
|
|||
title={contact.isFavorite ? 'Favorit entfernen' : 'Zu Favoriten'}
|
||||
>
|
||||
{#if contact.isFavorite}
|
||||
<StarFill size={18} class="text-amber-500" />
|
||||
<Star weight="fill" size={18} class="text-amber-500" />
|
||||
{:else}
|
||||
<Star size={18} />
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@ import { SvelteKitPWA } from '@vite-pwa/sveltekit';
|
|||
import { createPWAConfig } from '@manacore/shared-pwa';
|
||||
import { MANACORE_SHARED_PACKAGES, getBuildDefines } from '@manacore/shared-vite-config';
|
||||
|
||||
/** App-specific shared packages used by migrated modules */
|
||||
const APP_SHARED_PACKAGES = ['@clock/shared', '@zitare/content', '@calc/shared'];
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
tailwindcss(),
|
||||
|
|
@ -27,10 +30,10 @@ export default defineConfig({
|
|||
strictPort: true,
|
||||
},
|
||||
ssr: {
|
||||
noExternal: [...MANACORE_SHARED_PACKAGES],
|
||||
noExternal: [...MANACORE_SHARED_PACKAGES, ...APP_SHARED_PACKAGES],
|
||||
},
|
||||
optimizeDeps: {
|
||||
exclude: [...MANACORE_SHARED_PACKAGES],
|
||||
exclude: [...MANACORE_SHARED_PACKAGES, ...APP_SHARED_PACKAGES],
|
||||
},
|
||||
define: {
|
||||
...getBuildDefines(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue