Commit Graph

31 Commits

Author SHA1 Message Date
Diocrafts cd3733b459 feat: pluggable storage backends (S3, Azure, local) with admin UI
Implement 4-phase external storage backends architecture:

Phase 1 - Foundation:
- BlobStorageBackend trait (application/ports/blob_storage_ports.rs)
- LocalBlobBackend: extracted all tokio::fs ops from DedupService
- S3BlobBackend: AWS SDK with custom endpoint support (MinIO, R2, B2)
- DedupService refactored to use Arc<dyn BlobStorageBackend>

Phase 2 - Admin Panel:
- StorageSettingsService with DB persistence + env override
- Storage tab in admin panel (backend selector, S3 form, provider presets)
- GET/PUT/POST endpoints for storage settings + connection test
- i18n keys (en/es) and BEM CSS

Phase 3 - Migration:
- MigrationBlobBackend decorator (dual-read: target-first + source fallback)
- Background migration job with parallel transfers + progress tracking
- Migration UI (progress bar, ETA, pause/resume/verify/complete)
- 6 admin API endpoints for migration lifecycle

Phase 4 - Enterprise Extras:
- CachedBlobBackend: LRU disk cache for remote backends
- EncryptedBlobBackend: AES-256-GCM at-rest encryption
- AzureBlobBackend: Azure Blob Storage support
- RetryBlobBackend: exponential backoff for transient errors
- Decorator composition in DI: retry → encryption → cache

All 223 tests passing, clippy clean, fmt verified.
2026-04-14 21:33:38 +02:00
Diocrafts 1dbe7e4553 fix: resolve all biome ci errors and warnings
- Format all 14 locale JSON files (2-space → 4-space indent per biome config)
- Fix publicShare.js: arrow functions, template literals, optional chaining,
  remove redundant 'use strict', remove unused formatSize function
- Fix music.js: template literal, unused _trackId parameter
- Fix contextMenus.js, fileOperations.js, fileSharing.js: unused parameters
- Fix auth.js, music.css, share-public.css: formatting (biome format --write)
- Remove unused biome-ignore suppression comments in cards.css and reset.css
- Remove empty .share-state block in share-public.css
- Disable noDescendingSpecificity and noImportantStyles rules in biome.json
  (intentional CSS patterns for utility classes and theme overrides)
2026-04-12 02:13:08 +02:00
Diocrafts 37975afb39 fix(i18n): sync all 14 locale files to 575 keys each
- Move 38 misplaced root-level shared_* keys into shared.shared_* in
  de, es, fr, pt (values preserved, just re-nested correctly)
- Add 17 missing music.* keys to all non-en languages (en fallback)
- Add missing dialogs.*, actions.*, shared.*, notifications.* keys to
  fa (33), zh (71), de (20), fr (22), it (22), nl (20), pt (22)
- Sync language_selector.languages across all 14 locales (was missing
  ar, hi, it, ja, ko, nl, ru in most files)

All 14 languages now have exactly 575 keys matching en.json.
2026-04-12 02:02:21 +02:00
Diocrafts f08cffc0e8 feat: add VitePress docs site, music file picker modal, Dockerfile optimization, i18n keys for 14 locales
- Add docs/ with VitePress site (19 pages): guide, config, architecture, FAQ
- Add GitHub Actions workflow for auto-deploy to GitHub Pages
- Replace music 'Add Tracks' upload picker with in-app audio file browser modal
- Add music picker CSS styles with dark theme support
- Add missing i18n keys (search_audio, no_audio_files, etc.) to all 14 locales
- Optimize Dockerfile: shared base stage, COPY --chmod, consolidated RUN, HEALTHCHECK
- Improve README: docs links, updated stats (222+ tests, 14 languages), feature status
2026-04-11 20:58:34 +02:00
Diocrafts 3ce8ec25d6 feat(music): complete music UI overhaul - bugs, UX, missing features & styling
- Fix dead buttons (fa-edit/fa-share → fa-pen/fa-share-alt matching icon registry)
- Fix volume icon, shuffle bias, queue removal, repeat-one CSS
- Replace native prompt/confirm/alert with Modal system
- Add click-to-select, dblclick-to-play, playback error notifications
- Add loading indicators, success toasts, close player button
- Implement remove track from playlist (DELETE endpoint)
- Implement drag & drop track reorder (PUT reorder endpoint)
- Implement manage shares dialog (GET/DELETE shares endpoints)
- Implement cover art upload & display (cover_file_id in UpdatePlaylistDto)
- Implement public/private toggle (is_public in UpdatePlaylistDto)
- Mount get_audio_metadata route in backend routes.rs
- Redesign empty state: full-width centered onboarding when 0 playlists
- Move create button into sidebar header as compact + button
- Add music.css to build.rs production CSS bundle
- Add 16+ i18n keys in en.json and es.json
- Add CSS for drag handles, track remove, cover overlay, shares dialog, public badge
2026-04-11 10:59:01 +02:00
Andrey Tkachenko da066f47fa Music Player & Playlist Manager 2026-04-08 15:14:03 +03:00
Edouard Vanbelle 1ce29c101d style: apply biome CSS/JS format 2026-04-08 00:09:27 +02:00
Edouard Vanbelle badf35f08f chore: remove all executable attributes on non bash files 2026-04-01 23:14:42 +02:00
BillionClaw 0c812d9390 fix(i18n): use translation keys for upload notification titles
Replace hardcoded English/Spanish strings with proper i18n translations
for upload notification titles and file count labels.

- Add upload.files translation key to all locale files
- Update notifications.js to use window.i18n.t() for:
  - upload.uploading title
  - upload.files file count label
  - upload.complete completion message

Fixes #108
2026-03-17 14:17:39 +08:00
BillionClaw 2288daedec fix(i18n): add missing dialogs.share_folder translation key
The share dialog for folders was failing because dialogs.share_folder
key was missing from all locale files. The contextMenus.js code
references this key when opening the share dialog for folders:

  window.i18n.t('dialogs.share_folder')

Added the missing key to all 14 locale files with appropriate
translations for each language.

Fixes #189
2026-03-17 10:51:10 +08:00
Diocrafts df336da679 feat(frontend): i18n expansion, admin/profile i18n, grid/list view fix, empty state
- Add 5 new locales (hi, ar, ru, ja, ko) — now 14 total
- Admin panel: 117 i18n keys, confirm modal, animated tabs, no inline handlers
- Profile page: 58 i18n keys with data-i18n attributes
- Fix i18n safeT() shadowing bug and translationsLoaded timing
- Fix grid/list view: list header no longer shows in grid mode on login
- Fix classList.toggle hidden sync for view switching across all nav functions
- Revert .hidden important that broke login page rendering
- Add files empty state (no_files + empty_hint) with translations
- Fix language selector dropdown scroll and styling
- Fix admin panel scroll with sticky tabs
2026-03-09 00:08:34 +01:00
Jared Wolff 6a84a5c44e fix(photos): fix SQL type mismatch, pagination panic, missing icons, and add day/month/year grouping
- Fix photos endpoint 500: remove ::uuid cast on user_id WHERE clause (VARCHAR column)
- Fix pagination underflow panic when total_pages is 0
- Add missing 'images' and 'play' icons to SVG icon registry
- Add day/month/year grouping toggle with localStorage persistence
- Improve grid spacing and group header styling per mode
- Add i18n translations for grouping labels (all 9 locales)
2026-03-05 17:32:28 -05:00
Jared Wolff 53e4f5afe6 feat(photos): add Photos timeline view with lightbox and infinite scroll
Backend: new GET /api/photos endpoint with cursor-based pagination that
queries image/video files sorted by EXIF captured_at (falling back to
created_at), joining file_metadata for sort dates.

Frontend: dense photo grid grouped by day with lazy-loaded thumbnails,
IntersectionObserver infinite scroll, multi-select with batch
download/delete, and a full-screen lightbox with prev/next navigation,
EXIF metadata display, and download/favorite/delete toolbar.

Includes navigation wiring, CSS (with dark theme), and i18n translations
for all 9 locales.
2026-03-05 17:32:28 -05:00
Dionisio f2d35ca792 feat: auto-persist JWT secret, remove setup token requirement
- JWT secret auto-generates and persists to <STORAGE_PATH>/.jwt_secret
- Remove setup token: first admin setup is open until system initialized
- Fix schema.sql: move CREATE EXTENSION pg_trgm/ltree to top
- Update login UI and auth.js to remove setup token fields
2026-03-05 22:12:53 +01:00
George Wu ca4037da8f feat: improve move dialog with folder navigation
- Remove 'Root' option from move dialog (users move within their home folder)
- Show children of current folder instead of flat folder list
- Add breadcrumb navigation for folder browsing
- Add 'go to parent' navigation option
- Add 'select this folder' option to choose current location
- Add CSS styles for new navigation elements
- Add dark mode support for move dialog
- Add i18n translations for new strings (en, es)
2026-02-24 17:56:25 -08:00
Diocrafts 0d7c8bc019 perf: optimize UI rendering and event lifecycle 2026-02-18 10:53:43 +01:00
Dionisio 5a679dfc90 fix(security): patch 3 vulnerabilities — IDOR, ownership bypass, XSS
V1: Add owner-scoped folder pagination (list_folders_by_owner_paginated)
  - New method in FolderRepository trait, PG implementation, service & handler
  - Prevents IDOR by filtering folder listings to authenticated user

V2: Enforce ownership checks on folder mutations
  - rename_folder, move_folder, delete_folder now require caller_id
  - Service verifies folder.owner_id == caller_id (returns 404 on mismatch)
  - Propagated to folder_handler, batch_handler, batch_operations, webdav_handler
  - delete_folder_with_trash upgraded from OptionalAuthUser to AuthUser
  - download_folder_zip now checks ownership before streaming

V3: Fix XSS in frontend via DOM APIs
  - sharedView.js: innerHTML → createElement + textContent
  - contextMenus.js: innerHTML → DOM construction for share dialog

Cleanup: removed unused OptionalAuthUser import, updated all stubs/mocks
2026-02-16 00:22:42 +01:00
Dionisio 1672889044 feat(#93): notification bell with upload progress
Replace the floating upload toast with a notification bell in the top bar
(between language selector and user avatar). All upload progress, completion,
and quota errors now flow through the bell dropdown panel.

- Add notification bell button with animated badge counter
- Dropdown panel shows per-file upload progress bars and overall batch progress
- Bell rings on new notifications when panel is closed
- Upload success/error states with color-coded icons
- Quota exceeded errors shown as notification items
- Clear all button to dismiss notifications
- Panel auto-opens when upload starts
- Full dark mode support
- Mutual exclusion with user menu (opening one closes the other)
- i18n keys for en/es (notifications.title, notifications.empty)
- SW cache bump to v10

Files:
- static/js/notifications.js (new module)
- static/index.html: bell markup + remove old toast
- static/css/style.css: bell + panel styles + dark mode
- static/js/fileOperations.js: redirect upload progress to notification bell
- static/js/app.js: close bell when user menu opens
- static/locales/{en,es}.json: i18n keys
- static/sw.js: cache v10 + notifications.js asset
2026-02-14 10:46:23 +01:00
Dionisio aba7ea9d79 feat: add file upload progress toast with per-file tracking (#93)
Replaced the hidden dropzone-only progress bar with a floating
upload toast that appears at the bottom-right corner whenever
files are being uploaded (button or drag-and-drop).

Features:
- Per-file progress bar with real byte-level tracking via XHR
- Spinning icon while uploading, green check on success, red on error
- Overall progress bar and file counter in the footer
- Auto-hides 4 seconds after all uploads complete
- Dismiss button to minimise the toast
- Works for both file and folder uploads
- i18n keys added to all 8 locale files
- Service worker cache bumped to v3
2026-02-13 22:08:36 +01:00
Dionisio 53625776cb Fix: Add OIDC/SSO login button and hide password form when OIDC-only
- Added SSO login button on login page that appears when OIDC is configured
- Button shows provider name (e.g. 'Sign in with Authentik')
- When 'Disable password login' is enabled, hides password form and
  shows only the SSO button
- Added auth divider between password and SSO sections
- Added i18n keys (or, sso_login, sso_login_provider) for all 8 locales
- Fixed missing comma in it.json locale file

Fixes #88, Fixes #89
2026-02-13 19:59:13 +01:00
Dionisio 3050955f9c feat: add admin/profile UI, i18n (fr/de/pt), fix CI pipelines
- Add admin panel link and profile modal in user menu dropdown
- Add French, German and Portuguese locale support (full translations)
- Register new locales across JS frontend and Rust backend
- Create CI pipeline (fmt, clippy, test, audit, build)
- Fix docker-build.yml (cache, real tests, reduced timeout)
- Fix docker-publish.yml (multi-arch via QEMU, latest tag, pre-publish tests)
- Add dependabot.yml for automated dependency updates
2026-02-11 12:37:03 +01:00
Diocrafts 5bd505ccd7 modernizing frontend 2026-02-08 22:44:42 +01:00
Goudarz Jafari 7008c22c12 feat(i18n): add Persian(fa) to language list 2026-02-06 10:29:13 +03:30
Dionisio 8f2b0a354c big refactoring 2026-02-03 17:59:04 +01:00
DioCrafts a79c335b73 adding recent feature + bug fixed 2025-04-02 05:08:30 +02:00
DioCrafts 705cb5b069 adding pdf and image viewer 2025-04-02 01:22:05 +02:00
DioCrafts cfae57061b fix translation 2025-03-28 09:03:04 +01:00
DioCrafts fb276d9b24 adding ui sharing 2025-03-28 08:09:18 +01:00
DioCrafts 7affff379d adding search engine 2025-03-27 01:13:34 +01:00
DioCrafts cafad0fbfd adding user authentication 2025-03-20 09:22:31 +01:00
root fe19bc8505 Initial commit 2025-03-17 21:28:08 +01:00