Fix : Saison 00 et double slash chemin
Organize worker : Traiter la saison 0 comme "Spéciaux" au lieu de "Saison 0". FolderPicker : Ajouter un bouton "accueil" pour naviguer vers la racine, nettoyer le chemin sélectionné en supprimant les slashes de fin (avec un repli sur "/" pour la racine), et fiabiliser joinPath pour éviter les doubles slashes lorsque la base se termine par un slash
This commit is contained in:
1 parent
a39a98615b
commit
f92b3c5fb9
2 files changed
+13
-3
No files matched your search
@@ -241,7 +241,9 @@ async function downloadGitlabFolder(serieTitle: string, destRoot: string): Promi
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ─── Filesystem ops ───────────────────────────────────────────
|
// ─── Filesystem ops ───────────────────────────────────────────
|
||||||
function seasonFolder(n: number): string { return `Saison ${n}` }
|
function seasonFolder(n: number): string {
|
||||||
|
return n === 0 ? 'Specials' : `Saison ${n}`
|
||||||
|
}
|
||||||
|
|
||||||
function tryHardlink(src: string, dest: string): boolean {
|
function tryHardlink(src: string, dest: string): boolean {
|
||||||
try { fs.linkSync(src, dest); return true }
|
try { fs.linkSync(src, dest); return true }
|
||||||
|
|||||||
@@ -14,6 +14,12 @@
|
|||||||
|
|
||||||
<!-- Chemin éditable -->
|
<!-- Chemin éditable -->
|
||||||
<div class="px-5 py-3 border-b border-border shrink-0 flex gap-2">
|
<div class="px-5 py-3 border-b border-border shrink-0 flex gap-2">
|
||||||
|
<button @click="navigateTo('/')" class="btn-secondary px-2 text-muted hover:text-primary" title="Retour à la racine">
|
||||||
|
<svg width="14" height="14" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" fill="none">
|
||||||
|
<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
|
||||||
|
<polyline points="9 22 9 12 15 12 15 22"/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
<input
|
<input
|
||||||
v-model="inputPath"
|
v-model="inputPath"
|
||||||
@keydown.enter="navigateTo(inputPath)"
|
@keydown.enter="navigateTo(inputPath)"
|
||||||
@@ -62,7 +68,7 @@
|
|||||||
<!-- Footer -->
|
<!-- Footer -->
|
||||||
<div class="flex items-center justify-between px-5 py-4 border-t border-border shrink-0">
|
<div class="flex items-center justify-between px-5 py-4 border-t border-border shrink-0">
|
||||||
<span class="text-xs text-muted font-mono truncate max-w-xs">{{ current }}</span>
|
<span class="text-xs text-muted font-mono truncate max-w-xs">{{ current }}</span>
|
||||||
<button @click="$emit('select', current)" class="btn-primary">
|
<button @click="$emit('select', current.replace(/\\/+$/, '') || '/')" class="btn-primary">
|
||||||
Choisir
|
Choisir
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -86,7 +92,9 @@ const loading = ref(false)
|
|||||||
const error = ref('')
|
const error = ref('')
|
||||||
|
|
||||||
function joinPath(base: string, name: string): string {
|
function joinPath(base: string, name: string): string {
|
||||||
return base === '/' ? `/${name}` : `${base}/${name}`
|
if (base === '/') return `/${name}`
|
||||||
|
const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base
|
||||||
|
return `${cleanBase}/${name}`
|
||||||
}
|
}
|
||||||
|
|
||||||
async function navigateTo(p: string) {
|
async function navigateTo(p: string) {
|
||||||
|
|||||||
Reference in new issue
Block a user