diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index 4ed4ca5..322cb94 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -16,10 +16,13 @@ jobs: run: | echo "${{ secrets.FORGEJO_PAT }}" | docker login git.elijahkuntz.com -u "${{ gitea.actor }}" --password-stdin - - name: Build and Push Image + - name: Build and Push Images run: | # Force the entire image path string to lowercase dynamically - IMAGE_PATH=$(echo "git.elijahkuntz.com/${{ gitea.actor }}/${{ github.event.repository.name }}:latest" | tr '[:upper:]' '[:lower:]') + BASE_IMAGE_PATH=$(echo "git.elijahkuntz.com/${{ gitea.actor }}/${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]') - docker build -t "$IMAGE_PATH" . - docker push "$IMAGE_PATH" \ No newline at end of file + docker build -t "${BASE_IMAGE_PATH}-frontend:latest" ./frontend + docker push "${BASE_IMAGE_PATH}-frontend:latest" + + docker build -t "${BASE_IMAGE_PATH}-backend:latest" ./backend + docker push "${BASE_IMAGE_PATH}-backend:latest" \ No newline at end of file diff --git a/.gitignore b/.gitignore index f185868..9d520e5 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,16 @@ build/ out/ # Local application run data +backend/storage/ +backend/data/ +.uploads/ +test/ +test*/ +Textbooks/ +*.pdf +*.jpg +*.jpeg +*.png +*.mp4 +*.mkv +*.mov diff --git a/frontend/src/components/FileExplorer.tsx b/frontend/src/components/FileExplorer.tsx index 68b7c86..d0a6e83 100644 --- a/frontend/src/components/FileExplorer.tsx +++ b/frontend/src/components/FileExplorer.tsx @@ -115,7 +115,7 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) { const loadMoveFolders = useCallback(async (path: string) => { try { const data = await api.listDirectory(path); - setMoveFolders(data.files?.filter((f: FileItem) => f.is_dir).sort((a: FileItem, b: FileItem) => a.name.localeCompare(b.name)) || []); + setMoveFolders(data.files?.filter((f: FileItem) => f.is_dir && f.name !== '.uploads').sort((a: FileItem, b: FileItem) => a.name.localeCompare(b.name)) || []); } catch { setMoveFolders([]); } @@ -425,27 +425,25 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) { ); } - if (isImage) { - return ( -
- -
- ); - } - - if (isVideo) { - return ( -
- -
- ); - } - const fallbackIcon = (() => { + if (isImage) { + return ( +
+ +
+ ); + } + + if (isVideo) { + return ( +
+ +
+ ); + } + let color = 'var(--color-text-tertiary)'; - if (['jpg', 'jpeg', 'png', 'gif', 'webp', 'svg'].includes(ext)) color = '#f59e0b'; - else if (['mp4', 'mkv', 'avi', 'mov', 'webm'].includes(ext)) color = '#ef4444'; - else if (['mp3', 'wav', 'flac', 'ogg', 'm4a'].includes(ext)) color = '#22c55e'; + if (['mp3', 'wav', 'flac', 'ogg', 'm4a'].includes(ext)) color = '#22c55e'; else if (['zip', 'tar', 'gz', 'rar', '7z'].includes(ext)) color = '#8b5cf6'; else if (['js', 'ts', 'py', 'go', 'rs', 'md', 'txt'].includes(ext)) color = '#3b82f6'; return ; @@ -789,7 +787,7 @@ export default function FileExplorer({ onLogout }: FileExplorerProps) { placeholder="Folder name" autoFocus className="flex-1 bg-transparent text-sm outline-none border-none ring-0" - style={{ color: 'var(--color-text-primary)' }} + style={{ color: 'var(--color-text-primary)', outline: 'none', boxShadow: 'none' }} /> +