mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-10 21:27:02 +01:00
Some checks are pending
Pre-commit checks / pre-commit (push) Waiting to run
Replace dufs's plain file list with a React 19 + Vite + TypeScript SPA served same-origin by dufs, so the cloud URL becomes a real gallery behind the existing auth: thumbnail grid, image lightbox (zoom + keyboard nav), inline video, drag/ pick upload, download, confirm-guarded delete, and a simple .txt/.md editor. Serving architecture (de-risked against the real dufs 0.46.0): --assets does not override the UI, so dufs `render-spa` serves the app shell, the SPA lists dirs via WebDAV PROPFIND (render-flag-immune) and streams files via GET (Range for video seeking), with HashRouter so navigation stays at "/". Verified render-spa leaves KeePass file GET/PUT/?hash intact (Phase 1 unaffected). Adds generate_thumbnails.sh (ImageMagick images + ffmpeg video posters → ~/cloud/.thumbs, idempotent) and setup_cloud_gallery.sh (build + deploy the SPA into the cloud root, enable render-spa, wire thumbnail refresh into the Phase-2 media sync). setup_dufs_cloud.sh now emits render-spa only when the SPA is deployed, so a fresh dufs keeps its default listing. Verified: pnpm build + lint (strictTypeChecked) clean; 38 vitest tests, coverage 92.8% stmts / 96% lines (dufs-client 100%); local dufs --render-spa serves shell + assets + thumbnails + PROPFIND (all 200). Live deploy left for the user (needs sudo; enables render-spa on the public service). Note: host ffmpeg is broken (libvpx.so.11) so video posters are skipped until it's fixed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126QvdMrv2WNeUVShFiLTc3
42 lines
1.1 KiB
JSON
42 lines
1.1 KiB
JSON
{
|
|
"name": "cloud-gallery",
|
|
"private": true,
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"description": "Media-gallery SPA served by dufs at the self-hosted cloud",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc -b && vite build",
|
|
"lint": "tsc --noEmit && eslint src",
|
|
"preview": "vite preview",
|
|
"test": "vitest run",
|
|
"coverage": "vitest run --coverage"
|
|
},
|
|
"engines": {
|
|
"node": ">=22",
|
|
"pnpm": ">=10"
|
|
},
|
|
"dependencies": {
|
|
"react": "^19.1.0",
|
|
"react-dom": "^19.1.0"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@testing-library/jest-dom": "^6.9.1",
|
|
"@testing-library/react": "^16.3.2",
|
|
"@testing-library/user-event": "^14.6.1",
|
|
"@types/react": "^19.1.0",
|
|
"@types/react-dom": "^19.1.0",
|
|
"@vitejs/plugin-react": "^4.5.2",
|
|
"@vitest/coverage-v8": "^4.1.9",
|
|
"eslint": "^10.6.0",
|
|
"eslint-plugin-react": "^7.37.5",
|
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
"jsdom": "^29.1.1",
|
|
"typescript": "~5.8.3",
|
|
"typescript-eslint": "^8.62.0",
|
|
"vite": "^6.3.5",
|
|
"vitest": "^4.1.9"
|
|
}
|
|
}
|