feat: change tab title, add favicon, and fix pinned folder live refresh
All checks were successful
Automated Container Build / build-and-push (push) Successful in 35s
All checks were successful
Automated Container Build / build-and-push (push) Successful in 35s
This commit is contained in:
parent
5c2eaf49e4
commit
cf43dd0e5a
3 changed files with 8 additions and 2 deletions
|
|
@ -245,6 +245,7 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) {
|
|||
const [pinnedExpanded, setPinnedExpanded] = useState(false);
|
||||
const [pinnedOrder, setPinnedOrder] = useState<string[]>([]);
|
||||
const [dragOverPinnedItem, setDragOverPinnedItem] = useState<string | null>(null);
|
||||
const [pinnedRefreshCounter, setPinnedRefreshCounter] = useState(0);
|
||||
const [selectionBox, setSelectionBox] = useState<{ startX: number; startY: number; currentX: number; currentY: number } | null>(null);
|
||||
const [initialSelectedFiles, setInitialSelectedFiles] = useState<Set<string>>(new Set());
|
||||
const searchTimeoutRef = useRef<NodeJS.Timeout | undefined>(undefined);
|
||||
|
|
@ -437,7 +438,7 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) {
|
|||
setPinnedFiles(items);
|
||||
}).catch(console.error);
|
||||
}
|
||||
}, [pinnedExpanded, pinnedOrder]);
|
||||
}, [pinnedExpanded, pinnedOrder, pinnedRefreshCounter]);
|
||||
|
||||
async function handlePinnedDragEnd(sourcePath: string, destPath: string) {
|
||||
const newOrder = [...pinnedOrder];
|
||||
|
|
@ -608,6 +609,7 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) {
|
|||
async function handlePin(file: FileItem) {
|
||||
await api.togglePin(file.path);
|
||||
loadFiles(undefined, true);
|
||||
setPinnedRefreshCounter(c => c + 1);
|
||||
}
|
||||
|
||||
async function handleRename(path: string, originalName: string, isDir: boolean) {
|
||||
|
|
|
|||
Reference in a new issue