Paramètres : choix du canal d'Excalidraw (stable ou préversion)
- Dialogue « Paramètres » (icône engrenage) : sections Apparence (titre, logo) et Excalidraw (canal latest/next, versions publiées, commande de reconstruction ; rappel qu'Excalidraw est compilé dans l'image). - L'icône de mise à jour suit le canal choisi et compare par égalité (les numéros next sont inférieurs à la dernière stable) ; elle ouvre les paramètres sur la section Excalidraw. - Compatibilité avec le canal next : la prop excalidrawAPI y devient onExcalidrawAPI, les deux sont passées (image next construite et testée). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019EuvvuTv7AUc8ksDHv8VKx
This commit is contained in:
1 parent
7da52b6755
commit
88f7750577
9 files changed
+361
-255
No files matched your search
+10
-2
@@ -14,15 +14,20 @@ export interface MoveResult {
|
||||
error?: string;
|
||||
}
|
||||
|
||||
/** Personnalisation partagée ; logo = "" sans logo, sinon sa version. */
|
||||
/** Canal npm d'Excalidraw : latest (stable) ou next (préversion). */
|
||||
export type Channel = "latest" | "next";
|
||||
|
||||
/** Paramètres partagés ; logo = "" sans logo, sinon sa version. */
|
||||
export interface Settings {
|
||||
title: string;
|
||||
logo: string;
|
||||
channel: Channel;
|
||||
}
|
||||
|
||||
/** Dernière version d'Excalidraw publiée sur npm (vide si inconnue ou désactivé). */
|
||||
/** Versions d'Excalidraw publiées sur npm par canal (vide si inconnu ou désactivé). */
|
||||
export interface UpdateStatus {
|
||||
enabled: boolean;
|
||||
tags?: Partial<Record<Channel, string>>;
|
||||
latest?: string;
|
||||
checkedAt?: string;
|
||||
}
|
||||
@@ -108,6 +113,9 @@ export const api = {
|
||||
setTitle: async (title: string): Promise<Settings> =>
|
||||
(await request("/api/settings", { ...json({ title }), method: "PUT" })).json(),
|
||||
|
||||
setChannel: async (channel: Channel): Promise<Settings> =>
|
||||
(await request("/api/settings", { ...json({ channel }), method: "PUT" })).json(),
|
||||
|
||||
/** Le serveur recadre au centre et ramène le PNG à 64x64. */
|
||||
uploadLogo: async (png: Blob): Promise<Settings> =>
|
||||
(
|
||||
|
||||
Reference in new issue
Block a user