Files
pmomusic/pmoapp/webapp/src/assets/styles/drawers.css
Eric Coissac 8be250b167 [FE] Révise la stabilité, réactivité et performance du frontend
- Corrige fuites mémoire SSE via nettoyage des listeners (P0)
- Remplace shallowRef<Map> par reactive(new Map()) pour réactivité native Vue (P1)
- Ajoute timeout/AbortController aux requêtes fetch dans l'API client (P4)
- Déboucle les watch() de useTabs avec debounce unique et try/finally sur isRestoringFromStorage (P7)
- Limite notifications à 5 + nettoyage des timers dans UI store (P15)
- Protège routes debug avec import dynamique uniquement en DEV + wildcard 403 (P8)
- Déplace SVG par défaut dans assets/default-cover.svg et import ?raw (P10)
- Ajoute @media prefers-reduced-motion aux animations CSS globales
- Factorise styles drawer-btns avec .drawer-icon-classe + ajoute --opacity-disabled (P13)
- Encode les clés de cache browse avec encodeURIComponent + ':' séparateur (P14)
- Implémente pagination infinite scroll dans browseContainer/loadMore
+ Supprime formatMsToShortTime alias (P9)
- Corrige truncate() pour éviter dépassement maxLength si suffix >=maxLength (P10)
- Valide structure des commandes PMOPlayer avant traitement
+ Met à jour version Cargo.toml et lock (0.3.39)
2026-04-06 09:53:10 +02:00

272 lines
5.7 KiB
CSS

/**
* Styles communs pour les drawers (ServerDrawer, RendererDrawer)
*
* Chaque drawer ajoute uniquement ce qui le différencie :
* - position (left/right)
* - border (border-right / border-left)
* - box-shadow (direction)
* - backdrop spécifique (position)
*/
/* ========================================
BACKDROP
======================================== */
.drawer-backdrop {
position: fixed;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.35);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
z-index: 200;
}
@media (max-width: 768px) and (orientation: portrait) {
.drawer-backdrop {
display: none;
}
}
/* ========================================
PANNEAU DRAWER
======================================== */
.app-drawer {
position: fixed;
top: 0;
bottom: 0;
width: 50vw;
/* Fond opaque — évite la transparence empilée sur d'autres éléments glass */
background: rgba(22, 22, 32, 0.96);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
z-index: 201;
display: flex;
flex-direction: column;
overflow: hidden;
}
@media (prefers-color-scheme: light) {
.app-drawer {
background: rgba(245, 245, 250, 0.97);
}
}
@media (max-width: 768px) and (orientation: portrait) {
.app-drawer {
width: 100vw;
}
}
/* ========================================
HEADER
======================================== */
.drawer-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--spacing-sm);
padding: var(--spacing-lg);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
flex-shrink: 0;
}
@media (prefers-color-scheme: light) {
.drawer-header {
border-bottom-color: rgba(0, 0, 0, 0.1);
}
}
.drawer-title-section {
display: flex;
align-items: center;
gap: var(--spacing-sm);
color: var(--color-text);
flex: 1;
min-width: 0;
}
.drawer-title {
font-size: var(--text-xl);
font-weight: 700;
margin: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.drawer-title.small {
font-size: var(--text-base);
}
/* ========================================
ICONS COMMUNS POUR DRAWERS
======================================== */
/* Classe de base pour les boutons icônes des drawers */
.drawer-icon-btn {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
padding: 0;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 50%;
cursor: pointer;
transition: all var(--transition-fast) ease;
color: var(--color-text);
}
.drawer-icon-btn:hover {
background: rgba(255, 255, 255, 0.2);
}
.drawer-icon-btn:active {
transform: scale(0.95);
}
/* Bouton fermer */
.drawer-close-btn {
width: 40px;
height: 40px;
}
.drawer-close-btn:hover {
transform: scale(1.1);
}
/* Bouton retour (ServerDrawer navigation) */
.drawer-back-btn {
width: 36px;
height: 36px;
}
.drawer-back-btn:hover {
transform: scale(1.05);
}
/* ========================================
CONTENU
======================================== */
/* Add class="scrollbar-thin" on elements needing thin scrollbar (see pmocontrol.css) */
.drawer-content {
flex: 1;
overflow-y: auto;
padding: var(--spacing-md);
}
.drawer-section {
margin-bottom: var(--spacing-lg);
}
/* TODO: remplacer par la classe globale .section-title de pmocontrol.css */
.drawer-section-title {
font-size: var(--text-sm);
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--color-text-secondary);
margin: 0 0 var(--spacing-sm) 0;
padding: 0 var(--spacing-sm);
}
/* Liste d'items générique */
.drawer-item-list {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 4px;
}
.drawer-item {
display: flex;
align-items: center;
gap: var(--spacing-md);
padding: var(--spacing-md);
border-radius: 12px;
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
transition: all var(--transition-fast) ease;
}
.drawer-item.clickable {
cursor: pointer;
}
.drawer-item.clickable:hover {
background: rgba(255, 255, 255, 0.12);
border-color: rgba(255, 255, 255, 0.2);
}
.drawer-item.clickable:active {
background: rgba(255, 255, 255, 0.08);
}
.drawer-item.offline {
opacity: var(--opacity-disabled, 0.5);
cursor: not-allowed;
}
/* Icône dans un item */
.drawer-item-icon {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
flex-shrink: 0;
border-radius: 8px;
background: rgba(255, 255, 255, 0.1);
color: var(--color-text-secondary);
}
/* Info texte dans un item */
.drawer-item-info {
flex: 1;
min-width: 0;
}
.drawer-item-name {
font-size: var(--text-base);
font-weight: 600;
color: var(--color-text);
margin: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.drawer-item-sub {
font-size: var(--text-sm);
color: var(--color-text-secondary);
margin: 2px 0 0 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* ========================================
FOOTER
======================================== */
.drawer-footer {
padding: var(--spacing-md);
border-top: 1px solid rgba(255, 255, 255, 0.1);
flex-shrink: 0;
}
@media (prefers-color-scheme: light) {
.drawer-footer {
border-top-color: rgba(0, 0, 0, 0.1);
}
}
/* Les animations d'entrée/sortie sont définies dans chaque composant (scoped)
car elles diffèrent selon la direction (gauche/droite/bas) */