mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:01:09 +02:00
chore(theme): theme-track shared-auth-ui primaryColor + drop dead tailwind.config.js
shared-auth-ui components (PasskeyManager, SessionManager, TwoFactorSetup, AuditLog, ChangePassword, SecurityOnboarding) take a primaryColor prop that gets written as inline --primary-color on the component root. The mana app was passing a literal "#6366f1" (indigo) everywhere, so the Security tab and auth pages used a fixed indigo accent that ignored the user's theme. Pass "hsl(var(--color-primary))" instead — the nested var resolves live, so theme switches carry through. tailwind.config.js in apps/mana/apps/web was fully vestigial: - no @config directive in app.css, no reference from vite/svelte configs - imported @mana/shared-tailwind/preset, which the package doesn't export - only themes.css is exported, and it's loaded directly from app.css Tailwind v4 with CSS-first config is the real setup. Delete the file and remove its entry from SETUP.md. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7822340ea0
commit
531190953f
7 changed files with 8 additions and 40 deletions
|
|
@ -69,7 +69,6 @@ mana-web/
|
|||
├── .env # Environment variables
|
||||
├── .env.example # Environment template
|
||||
├── svelte.config.js # SvelteKit configuration
|
||||
├── tailwind.config.js # Tailwind configuration
|
||||
├── vite.config.ts # Vite configuration
|
||||
├── tsconfig.json # TypeScript configuration
|
||||
└── package.json # Dependencies
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
onRefresh={async () => {
|
||||
passkeys = await authStore.listPasskeys();
|
||||
}}
|
||||
primaryColor="#6366f1"
|
||||
primaryColor="hsl(var(--color-primary))"
|
||||
/>
|
||||
</SettingsPanel>
|
||||
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
sessions = await authStore.listSessions();
|
||||
sessionsLoading = false;
|
||||
}}
|
||||
primaryColor="#6366f1"
|
||||
primaryColor="hsl(var(--color-primary))"
|
||||
/>
|
||||
</SettingsPanel>
|
||||
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
onEnable={(password) => authStore.enableTwoFactor(password)}
|
||||
onDisable={(password) => authStore.disableTwoFactor(password)}
|
||||
onGenerateBackupCodes={(password) => authStore.generateBackupCodes(password)}
|
||||
primaryColor="#6366f1"
|
||||
primaryColor="hsl(var(--color-primary))"
|
||||
/>
|
||||
</SettingsPanel>
|
||||
|
||||
|
|
@ -86,6 +86,6 @@
|
|||
securityEvents = await authStore.getSecurityEvents();
|
||||
securityEventsLoading = false;
|
||||
}}
|
||||
primaryColor="#6366f1"
|
||||
primaryColor="hsl(var(--color-primary))"
|
||||
/>
|
||||
</SettingsPanel>
|
||||
|
|
|
|||
|
|
@ -963,7 +963,7 @@
|
|||
{currentLanguageLabel}
|
||||
showLogout={authStore.isAuthenticated}
|
||||
loginHref="/login"
|
||||
primaryColor="#6366f1"
|
||||
primaryColor="hsl(var(--color-primary))"
|
||||
showAppSwitcher={false}
|
||||
showAiTierSelector={true}
|
||||
aiTierItems={aiTier.items}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<ForgotPasswordPage
|
||||
appName="Mana"
|
||||
logo={ManaLogo}
|
||||
primaryColor="#6366f1"
|
||||
primaryColor="hsl(var(--color-primary))"
|
||||
onForgotPassword={handleForgotPassword}
|
||||
{goto}
|
||||
loginPath="/login"
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
<LoginPage
|
||||
appName="Mana"
|
||||
logo={ManaLogo}
|
||||
primaryColor="#6366f1"
|
||||
primaryColor="hsl(var(--color-primary))"
|
||||
onSignIn={handleSignIn}
|
||||
onResendVerification={handleResendVerification}
|
||||
passkeyAvailable={authStore.isPasskeyAvailable()}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
<RegisterPage
|
||||
appName="Mana"
|
||||
logo={ManaLogo}
|
||||
primaryColor="#6366f1"
|
||||
primaryColor="hsl(var(--color-primary))"
|
||||
onSignUp={handleSignUp}
|
||||
onResendVerification={handleResendVerification}
|
||||
{goto}
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
import preset from '@mana/shared-tailwind/preset';
|
||||
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
export default {
|
||||
presets: [preset],
|
||||
content: [
|
||||
'./src/**/*.{html,js,svelte,ts}',
|
||||
'../../../packages/shared-ui/src/**/*.{html,js,svelte,ts}',
|
||||
'../../../packages/shared-auth-ui/src/**/*.{html,js,svelte,ts}',
|
||||
],
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
// Mana specific primary blue
|
||||
primary: {
|
||||
50: '#eff6ff',
|
||||
100: '#dbeafe',
|
||||
200: '#bfdbfe',
|
||||
300: '#93c5fd',
|
||||
400: '#60a5fa',
|
||||
500: '#3b82f6',
|
||||
600: '#0055FF',
|
||||
700: '#1d4ed8',
|
||||
800: '#1e40af',
|
||||
900: '#1e3a8a',
|
||||
950: '#172554',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue