Interface : chemin dans la barre du haut et racine visible, comme Excalicloud
- Barre du haut : chemin du dossier affiché à côté du logo (Racine / … / dossier courant en gras), chaque niveau cliquable et cible de dépôt ; rendu par l'explorateur via un portail dans #topbar-path. Outils à droite séparés par un filet. - Liste : l'en-tête affiche le dossier courant (« Racine », « Infra »…) avec le tri sur la même ligne, à la place de l'ancien fil d'Ariane. - Favoris, Personnel et Poubelle aux couleurs d'Excalicloud (ambre, vert, orange), regroupés sur un fond distinct en vue liste. - Mobile : logo seul pour laisser la place au chemin. - Favicon et theme-color au violet de l'accent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LNfwm4sxyNKUC5XjUyrD88
This commit is contained in:
1 parent
e93280eb18
commit
5716c97712
4 files changed
+149
-23
No files matched your search
+2
-2
@@ -3,9 +3,9 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
||||||
<meta name="theme-color" content="#2f6fed" />
|
<meta name="theme-color" content="#6965db" />
|
||||||
<meta name="robots" content="noindex" />
|
<meta name="robots" content="noindex" />
|
||||||
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f6fed' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 18a4.5 4.5 0 0 1-.5-9 6 6 0 0 1 11.4 1.5A3.5 3.5 0 0 1 17.5 18'/%3E%3Cpath d='M9 14l3-3 3 3M12 11v9'/%3E%3C/svg%3E" />
|
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236965db' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 18a4.5 4.5 0 0 1-.5-9 6 6 0 0 1 11.4 1.5A3.5 3.5 0 0 1 17.5 18'/%3E%3Cpath d='M9 14l3-3 3 3M12 11v9'/%3E%3C/svg%3E" />
|
||||||
<title>Up And Down</title>
|
<title>Up And Down</title>
|
||||||
<script>
|
<script>
|
||||||
// Thème appliqué avant le premier rendu (évite un flash clair).
|
// Thème appliqué avant le premier rendu (évite un flash clair).
|
||||||
|
|||||||
@@ -188,7 +188,9 @@ function Shell({ me, reloadMe }: { me: Me; reloadMe: () => Promise<unknown> }) {
|
|||||||
{me.logo ? <img className="logo" src={api.logoUrl(me.logo)} alt="" /> : <CloudUpIcon size={26} />}
|
{me.logo ? <img className="logo" src={api.logoUrl(me.logo)} alt="" /> : <CloudUpIcon size={26} />}
|
||||||
<span>{title}</span>
|
<span>{title}</span>
|
||||||
</a>
|
</a>
|
||||||
<span className="spacer" />
|
{/* Chemin du dossier affiché : rempli par l'explorateur (chaque niveau cliquable, cible de dépôt). */}
|
||||||
|
<nav id="topbar-path" className="path" aria-label="Chemin" />
|
||||||
|
<div className="topbar-tools">
|
||||||
<button className="icon-btn" onClick={() => setSettings(me.admin ? "general" : "account")} aria-label="Paramètres" title="Paramètres">
|
<button className="icon-btn" onClick={() => setSettings(me.admin ? "general" : "account")} aria-label="Paramètres" title="Paramètres">
|
||||||
<SettingsIcon />
|
<SettingsIcon />
|
||||||
</button>
|
</button>
|
||||||
@@ -201,6 +203,7 @@ function Shell({ me, reloadMe }: { me: Me; reloadMe: () => Promise<unknown> }) {
|
|||||||
{me.admin && me.mode !== "none" && <ShieldIcon size={14} />}
|
{me.admin && me.mode !== "none" && <ShieldIcon size={14} />}
|
||||||
{!!me.pending && <small className="badge">{me.pending}</small>}
|
{!!me.pending && <small className="badge">{me.pending}</small>}
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div className="layout">
|
<div className="layout">
|
||||||
|
|||||||
+49
-16
@@ -1,4 +1,5 @@
|
|||||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||||
|
import { createPortal } from "react-dom";
|
||||||
import type { DragEvent, KeyboardEvent, MouseEvent, ReactNode } from "react";
|
import type { DragEvent, KeyboardEvent, MouseEvent, ReactNode } from "react";
|
||||||
import {
|
import {
|
||||||
api,
|
api,
|
||||||
@@ -121,6 +122,9 @@ interface Props {
|
|||||||
|
|
||||||
export function Explorer({ me, refreshKey, goto, onDirChange, onMutated, toolbarStart }: Props) {
|
export function Explorer({ me, refreshKey, goto, onDirChange, onMutated, toolbarStart }: Props) {
|
||||||
const [dir, setDir] = useState("");
|
const [dir, setDir] = useState("");
|
||||||
|
// Emplacement du chemin dans la barre du haut (rendu par App), rempli par un portail.
|
||||||
|
const [pathEl, setPathEl] = useState<HTMLElement | null>(null);
|
||||||
|
useEffect(() => setPathEl(document.getElementById("topbar-path")), []);
|
||||||
const [entries, setEntries] = useState<Entry[]>([]);
|
const [entries, setEntries] = useState<Entry[]>([]);
|
||||||
const [loaded, setLoaded] = useState(false);
|
const [loaded, setLoaded] = useState(false);
|
||||||
const [query, setQuery] = useState("");
|
const [query, setQuery] = useState("");
|
||||||
@@ -539,6 +543,7 @@ export function Explorer({ me, refreshKey, goto, onDirChange, onMutated, toolbar
|
|||||||
// --- Rendu ---------------------------------------------------------------
|
// --- Rendu ---------------------------------------------------------------
|
||||||
|
|
||||||
const crumbs = dir ? dir.split("/") : [];
|
const crumbs = dir ? dir.split("/") : [];
|
||||||
|
const here = crumbs.length ? label(crumbs[crumbs.length - 1]) : "Racine";
|
||||||
const where = (p: string) => displayPath(dirname(p)) || "Racine";
|
const where = (p: string) => displayPath(dirname(p)) || "Racine";
|
||||||
const deletedInfo = (e: Entry) =>
|
const deletedInfo = (e: Entry) =>
|
||||||
`Supprimé le ${fmtDate(e.modTime)}${e.by ? ` par ${e.by}` : ""}\nEmplacement d'origine : ${e.origin ? where(e.origin) : "inconnu"}`;
|
`Supprimé le ${fmtDate(e.modTime)}${e.by ? ` par ${e.by}` : ""}\nEmplacement d'origine : ${e.origin ? where(e.origin) : "inconnu"}`;
|
||||||
@@ -1038,26 +1043,54 @@ export function Explorer({ me, refreshKey, goto, onDirChange, onMutated, toolbar
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{pathEl &&
|
||||||
|
createPortal(
|
||||||
|
results ? (
|
||||||
|
<span className="seg">
|
||||||
|
<span className="current">Recherche</span>
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<span className="seg">
|
||||||
|
{crumbs.length ? (
|
||||||
|
<button className={dropTarget === "" ? "drop" : ""} onClick={() => setDir("")} {...dropProps("")}>
|
||||||
|
Racine
|
||||||
|
</button>
|
||||||
|
) : (
|
||||||
|
<span className="current">Racine</span>
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
{crumbs.map((c, i) => {
|
||||||
|
const p = crumbs.slice(0, i + 1).join("/");
|
||||||
|
const last = i === crumbs.length - 1;
|
||||||
|
return (
|
||||||
|
<span className="seg" key={p}>
|
||||||
|
<span className="sep" aria-hidden>
|
||||||
|
/
|
||||||
|
</span>
|
||||||
|
{last ? (
|
||||||
|
<span className="current" aria-current="page">
|
||||||
|
{label(c)}
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
|
<button className={dropTarget === p ? "drop" : ""} onClick={() => setDir(p)} {...dropProps(p)}>
|
||||||
|
{label(c)}
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</>
|
||||||
|
),
|
||||||
|
pathEl,
|
||||||
|
)}
|
||||||
<div className="listbar">
|
<div className="listbar">
|
||||||
{results ? (
|
{results ? (
|
||||||
<span className="muted count">{plural(results.length, "résultat")}</span>
|
<span className="muted count">{plural(results.length, "résultat")}</span>
|
||||||
) : (
|
) : (
|
||||||
<nav className="crumbs">
|
<h2 className="here" title={dir ? displayPath(dir) : "Racine"}>
|
||||||
<button className={dropTarget === "" ? "drop" : ""} onClick={() => setDir("")} {...dropProps("")}>
|
{here}
|
||||||
Racine
|
</h2>
|
||||||
</button>
|
|
||||||
{crumbs.map((c, i) => {
|
|
||||||
const p = crumbs.slice(0, i + 1).join("/");
|
|
||||||
return (
|
|
||||||
<span key={p}>
|
|
||||||
<span className="muted"> / </span>
|
|
||||||
<button className={dropTarget === p ? "drop" : ""} onClick={() => setDir(p)} {...dropProps(p)}>
|
|
||||||
{label(c)}
|
|
||||||
</button>
|
|
||||||
</span>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</nav>
|
|
||||||
)}
|
)}
|
||||||
{view !== "details" && !results && (
|
{view !== "details" && !results && (
|
||||||
<label className="sort" title="Trier">
|
<label className="sort" title="Trier">
|
||||||
|
|||||||
+94
-4
@@ -377,6 +377,65 @@ select {
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
/* Chemin du dossier affiché, comme dans Excalicloud : chaque niveau cliquable,
|
||||||
|
le dossier courant en gras. */
|
||||||
|
.topbar .path {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-left: 0.6rem;
|
||||||
|
padding-left: 0.6rem;
|
||||||
|
border-left: 1px solid var(--border);
|
||||||
|
}
|
||||||
|
.topbar .path .seg {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
min-width: 2.5em;
|
||||||
|
flex-shrink: 1;
|
||||||
|
}
|
||||||
|
.topbar .path .seg:last-child {
|
||||||
|
flex-shrink: 0;
|
||||||
|
max-width: 60%;
|
||||||
|
}
|
||||||
|
.topbar .path .sep {
|
||||||
|
padding: 0 2px;
|
||||||
|
color: var(--muted);
|
||||||
|
}
|
||||||
|
.topbar .path button,
|
||||||
|
.topbar .path .current {
|
||||||
|
min-width: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
height: auto;
|
||||||
|
padding: 4px 6px;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
background: transparent;
|
||||||
|
font: inherit;
|
||||||
|
color: var(--fg);
|
||||||
|
border-radius: var(--radius);
|
||||||
|
}
|
||||||
|
.topbar .path button:hover {
|
||||||
|
background: var(--hover);
|
||||||
|
}
|
||||||
|
.topbar .path button.drop {
|
||||||
|
background: var(--accent-soft);
|
||||||
|
outline: 2px dashed var(--accent);
|
||||||
|
}
|
||||||
|
.topbar .path .current {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.topbar-tools {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.25rem;
|
||||||
|
margin-left: auto;
|
||||||
|
padding-left: 0.5rem;
|
||||||
|
border-left: 1px solid var(--border);
|
||||||
|
}
|
||||||
.logo {
|
.logo {
|
||||||
width: 32px;
|
width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
@@ -608,6 +667,16 @@ select {
|
|||||||
padding: 0.2rem 1rem 0.5rem;
|
padding: 0.2rem 1rem 0.5rem;
|
||||||
min-height: 2.4rem;
|
min-height: 2.4rem;
|
||||||
}
|
}
|
||||||
|
.listbar .here {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 0.45rem;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 600;
|
||||||
|
min-width: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
.crumbs {
|
.crumbs {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
@@ -796,11 +865,28 @@ tr:hover .more,
|
|||||||
.icon.special {
|
.icon.special {
|
||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
}
|
}
|
||||||
.icon.special.poubelle {
|
/* Mêmes couleurs qu'Excalicloud : Favoris ambre, Personnel vert, Poubelle orange. */
|
||||||
color: var(--muted);
|
.icon.special.favoris {
|
||||||
|
color: #f59f00;
|
||||||
}
|
}
|
||||||
.icon.special.poubelle.full {
|
.icon.special.perso {
|
||||||
color: var(--danger);
|
color: #2f9e44;
|
||||||
|
}
|
||||||
|
:root[data-theme="dark"] .icon.special.perso {
|
||||||
|
color: #51cf66;
|
||||||
|
}
|
||||||
|
.icon.special.poubelle {
|
||||||
|
color: #f76707;
|
||||||
|
}
|
||||||
|
:root[data-theme="dark"] .icon.special.poubelle {
|
||||||
|
color: #ff922b;
|
||||||
|
}
|
||||||
|
/* Entrées de la racine propres à l'utilisateur, sur fond distinct en vue liste. */
|
||||||
|
.entries.list .item.special > .row {
|
||||||
|
background: var(--panel-2);
|
||||||
|
border-radius: var(--radius);
|
||||||
|
/* Pas de case à cocher : on réserve sa place pour aligner l'icône sur celles des dossiers. */
|
||||||
|
padding-left: 28px;
|
||||||
}
|
}
|
||||||
.meta {
|
.meta {
|
||||||
flex: none;
|
flex: none;
|
||||||
@@ -1913,6 +1999,10 @@ th.c-size .th-btn {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@media (max-width: 860px) {
|
@media (max-width: 860px) {
|
||||||
|
/* Logo seul : la place va au chemin. */
|
||||||
|
.brand span {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
.layout {
|
.layout {
|
||||||
grid-template-columns: minmax(0, 1fr);
|
grid-template-columns: minmax(0, 1fr);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user