mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 22:01:09 +02:00
🎨 refactor(shared-ui): improve LoginPage and InputBar components
This commit is contained in:
parent
ceebb5dda6
commit
9bfc20b8d5
3 changed files with 37 additions and 4 deletions
|
|
@ -119,11 +119,18 @@
|
|||
|
||||
const t = $derived({ ...defaultTranslations, ...translations });
|
||||
|
||||
// Check if we're in development mode (early for state init)
|
||||
const isDevMode = typeof import.meta !== 'undefined' && import.meta.env?.DEV;
|
||||
// Local dev credentials (run `pnpm db:seed:dev` in mana-core-auth to create this user)
|
||||
const DEV_EMAIL = 'dev@manacore.local';
|
||||
const DEV_PASSWORD = 'devpassword123';
|
||||
|
||||
let loading = $state(false);
|
||||
let error = $state<string | null>(null);
|
||||
let errorField = $state<'email' | 'password' | 'general' | null>(null);
|
||||
let email = $state(initialEmail);
|
||||
let password = $state(initialPassword);
|
||||
// In dev mode, pre-fill with test credentials
|
||||
let email = $state(initialEmail || (isDevMode ? DEV_EMAIL : ''));
|
||||
let password = $state(initialPassword || (isDevMode ? DEV_PASSWORD : ''));
|
||||
let showPassword = $state(false);
|
||||
let rememberMe = $state(false);
|
||||
let showSuccess = $state(false);
|
||||
|
|
@ -278,8 +285,8 @@
|
|||
}
|
||||
|
||||
function fillDevCredentials() {
|
||||
email = 't@t.de';
|
||||
password = 'testtesttest';
|
||||
email = DEV_EMAIL;
|
||||
password = DEV_PASSWORD;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue