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

This commit is contained in:
Elijah 2026-05-23 10:39:30 -07:00
parent 5c2eaf49e4
commit cf43dd0e5a
3 changed files with 8 additions and 2 deletions

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#6366f1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-hard-drive"><line x1="22" x2="2" y1="12" y2="12"/><path d="M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"/><line x1="6" x2="6.01" y1="16" y2="16"/><line x1="10" x2="10.01" y1="16" y2="16"/></svg>

After

Width:  |  Height:  |  Size: 454 B

View file

@ -2,8 +2,11 @@ import type { Metadata } from 'next';
import './globals.css'; import './globals.css';
export const metadata: Metadata = { export const metadata: Metadata = {
title: 'Drive — Your Personal Cloud', title: "Eli's Drive",
description: 'A high-performance, self-hosted file storage and management platform.', description: 'A high-performance, self-hosted file storage and management platform.',
icons: {
icon: '/favicon.svg',
},
}; };
export default function RootLayout({ export default function RootLayout({

View file

@ -245,6 +245,7 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) {
const [pinnedExpanded, setPinnedExpanded] = useState(false); const [pinnedExpanded, setPinnedExpanded] = useState(false);
const [pinnedOrder, setPinnedOrder] = useState<string[]>([]); const [pinnedOrder, setPinnedOrder] = useState<string[]>([]);
const [dragOverPinnedItem, setDragOverPinnedItem] = useState<string | null>(null); 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 [selectionBox, setSelectionBox] = useState<{ startX: number; startY: number; currentX: number; currentY: number } | null>(null);
const [initialSelectedFiles, setInitialSelectedFiles] = useState<Set<string>>(new Set()); const [initialSelectedFiles, setInitialSelectedFiles] = useState<Set<string>>(new Set());
const searchTimeoutRef = useRef<NodeJS.Timeout | undefined>(undefined); const searchTimeoutRef = useRef<NodeJS.Timeout | undefined>(undefined);
@ -437,7 +438,7 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) {
setPinnedFiles(items); setPinnedFiles(items);
}).catch(console.error); }).catch(console.error);
} }
}, [pinnedExpanded, pinnedOrder]); }, [pinnedExpanded, pinnedOrder, pinnedRefreshCounter]);
async function handlePinnedDragEnd(sourcePath: string, destPath: string) { async function handlePinnedDragEnd(sourcePath: string, destPath: string) {
const newOrder = [...pinnedOrder]; const newOrder = [...pinnedOrder];
@ -608,6 +609,7 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) {
async function handlePin(file: FileItem) { async function handlePin(file: FileItem) {
await api.togglePin(file.path); await api.togglePin(file.path);
loadFiles(undefined, true); loadFiles(undefined, true);
setPinnedRefreshCounter(c => c + 1);
} }
async function handleRename(path: string, originalName: string, isDir: boolean) { async function handleRename(path: string, originalName: string, isDir: boolean) {