Interface : explorateur redimensionnable, bouton clair/sombre, titre et logo
- poignée entre l'explorateur et le canevas (souris, tactile, clavier), largeur mémorisée - bouton clair/sombre à droite de la barre, synchronisé avec le menu d'Excalidraw - dialogue Personnaliser : titre et logo PNG affiché en rond - README Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013WSSWgbf7gUzTzEqhjqtzN
This commit was merged in pull request #3.
This commit is contained in:
1 parent
baa412d02e
commit
9ecaab550a
7 files changed
+489
-17
No files matched your search
@@ -14,6 +14,12 @@ export interface MoveResult {
|
||||
error?: string;
|
||||
}
|
||||
|
||||
/** Personnalisation partagée ; logo = "" sans logo, sinon sa version. */
|
||||
export interface Settings {
|
||||
title: string;
|
||||
logo: string;
|
||||
}
|
||||
|
||||
export class ApiError extends Error {
|
||||
constructor(public status: number, message: string) {
|
||||
super(message);
|
||||
@@ -88,6 +94,21 @@ export const api = {
|
||||
});
|
||||
},
|
||||
|
||||
settings: async (): Promise<Settings> => (await request("/api/settings")).json(),
|
||||
|
||||
setTitle: async (title: string): Promise<Settings> =>
|
||||
(await request("/api/settings", { ...json({ title }), method: "PUT" })).json(),
|
||||
|
||||
/** Le serveur recadre au centre et ramène le PNG à 64x64. */
|
||||
uploadLogo: async (png: Blob): Promise<Settings> =>
|
||||
(
|
||||
await request("/api/logo", { method: "PUT", headers: { "Content-Type": "image/png" }, body: png })
|
||||
).json(),
|
||||
|
||||
removeLogo: async (): Promise<Settings> => (await request("/api/logo", { method: "DELETE" })).json(),
|
||||
|
||||
logoUrl: (v: string) => `/api/logo?v=${q(v)}`,
|
||||
|
||||
downloadUrl: (path: string) => `/api/file?path=${q(path)}`,
|
||||
|
||||
/** v = date du schéma : l'URL change à chaque nouvelle version (cache navigateur). */
|
||||
|
||||
Reference in new issue
Block a user