feat(ui): visionneuse et vignettes, retrait du popup identifiants, en-tete fige (#7)
CD — Déploiement / deploy (push) Successful in 20s

- MediaViewer (image/video/audio/pdf/texte) et MediaThumb (vignette video 1re frame, icones audio/archive)
- Gallery/Browser cables sur le viewer et les vignettes ; lib/media.ts + previewUrl
- Admin: bandeau de succes au lieu du popup "Identifiants generes"
- AppShell/PageHeader: hauteur fixe du viewport + en-tete de page sticky (filtres, recherche, stats figes)

---------

Co-authored-by: xEsiah <[email protected]>
Reviewed-on: #7
Reviewed-by: Esiah <[email protected]>
Co-authored-by: Gitea Actions <-[email protected]>
This commit was merged in pull request #7.
This commit is contained in:
Gitea Actions
2026-10-16 13:13:25 +00:00
committed by Esiah
co-authored by Esiah
parent c5df5c05f1
commit d49435bbd6
19 changed files with 683 additions and 216 deletions
+3 -2
View File
@@ -294,6 +294,7 @@ export const api = {
deleteFile: (id: string) => del<{ ok: boolean }>(`/files/${encodeURIComponent(id)}`),
downloadUrl: (id: string) => `${BASE}/files/${encodeURIComponent(id)}/download`,
thumbnailUrl: (id: string) => `${BASE}/files/${encodeURIComponent(id)}/thumbnail`,
previewUrl: (id: string) => `${BASE}/files/${encodeURIComponent(id)}/preview`,
// --- Corbeille, recherche, galerie ------------------------------------
trash: () =>
@@ -324,7 +325,7 @@ export const api = {
role_slug: string;
quota_bytes?: number | null;
max_file_bytes?: number | null;
}) => post<{ user: AdminUser; password: string }>("/admin/users", payload),
}) => post<{ user: AdminUser }>("/admin/users", payload),
adminUpdateUser: (
id: string,
payload: Partial<{
@@ -338,7 +339,7 @@ export const api = {
) => patch<{ user: AdminUser }>(`/admin/users/${encodeURIComponent(id)}`, payload),
adminDeleteUser: (id: string) => del<{ ok: boolean }>(`/admin/users/${encodeURIComponent(id)}`),
adminResetPassword: (id: string) =>
post<{ password: string }>(`/admin/users/${encodeURIComponent(id)}/reset-password`),
post<{ ok: boolean }>(`/admin/users/${encodeURIComponent(id)}/reset-password`),
adminStorageLocations: () =>
request<{ locations: StorageLocation[] }>("/admin/storage-locations"),
adminCreateStorageLocation: (payload: {
+30
View File
@@ -0,0 +1,30 @@
export type MediaKind = "image" | "video" | "audio" | "document" | "archive" | "other";
/** Miroir de `classify()` cote backend, pour choisir la vignette d'un fichier. */
export const mediaKind = (mime: string | null): MediaKind => {
const value = (mime ?? "").toLowerCase();
if (value.startsWith("image/")) return "image";
if (value.startsWith("video/")) return "video";
if (value.startsWith("audio/")) return "audio";
if (
value === "application/pdf" ||
value.startsWith("text/") ||
value.includes("word") ||
value.includes("excel") ||
value.includes("presentation") ||
value.includes("opendocument")
) {
return "document";
}
if (
value.includes("zip") ||
value.includes("tar") ||
value.includes("gzip") ||
value.includes("rar") ||
value.includes("7z") ||
value.includes("compressed")
) {
return "archive";
}
return "other";
};