v1.1.0: keyboard shortcuts (CH), onboarding tour, admin projects tab, remember-me login, Luftbild CH removed, hose settings in admin, credit link, font Barlow, map auto-save viewport, rate-limit 10/5min

This commit is contained in:
Pepe Ziberi
2026-02-24 19:49:42 +01:00
parent cb575f9a82
commit d893373bd9
16 changed files with 618 additions and 54 deletions

View File

@@ -29,7 +29,7 @@ interface AuthContextType {
user: User | null
tenant: TenantInfo | null
loading: boolean
login: (email: string, password: string) => Promise<{ success: boolean; error?: string }>
login: (email: string, password: string, rememberMe?: boolean) => Promise<{ success: boolean; error?: string }>
logout: () => Promise<void>
canEdit: () => boolean
isAdmin: () => boolean
@@ -62,12 +62,12 @@ export function AuthProvider({ children }: { children: ReactNode }) {
}
}
const login = async (email: string, password: string) => {
const login = async (email: string, password: string, rememberMe = false) => {
try {
const res = await fetch('/api/auth/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ email, password }),
body: JSON.stringify({ email, password, rememberMe }),
})
const data = await res.json()