feat: Initial commit - Base application with Next.js - Configuration, Auth, Library navigation, CBZ/CBR reader, Cache, Responsive design

This commit is contained in:
Julien Froidefond
2025-02-11 21:04:40 +01:00
commit 33bdc43442
48 changed files with 9813 additions and 0 deletions

27
src/types/auth.ts Normal file
View File

@@ -0,0 +1,27 @@
import { KomgaUser } from "./komga";
export interface AuthConfig {
serverUrl: string;
credentials?: {
username: string;
password: string;
};
}
export interface AuthState {
isAuthenticated: boolean;
user: KomgaUser | null;
serverUrl: string | null;
}
export interface AuthError {
code: AuthErrorCode;
message: string;
}
export type AuthErrorCode =
| "INVALID_CREDENTIALS"
| "INVALID_SERVER_URL"
| "SERVER_UNREACHABLE"
| "NETWORK_ERROR"
| "UNKNOWN_ERROR";