Commit Graph

507 Commits

Author SHA1 Message Date
Dionisio Pozo d75917433f Merge pull request #219 from BillionClaw/fix/size-column-alignment
fix(css): align size values in table view
2026-03-17 08:58:01 +01:00
BillionClaw b363ca3a88 fix(css): align size values in table view using tabular-nums
Adds font-variant-numeric: tabular-nums to size-cell class to ensure
file size values align properly in the list view. Numeric characters
now use equal-width glyphs, preventing misalignment of values like
"1 B", "2.5 KB", and "100 MB".

Fixes #101
2026-03-17 15:55:48 +08:00
Dionisio Pozo 5279e0c266 Merge pull request #218 from BillionClaw/clawoss/fix/dark-mode-and-search 2026-03-17 07:59:02 +01:00
Dionisio Pozo b2b37d763f Merge pull request #217 from BillionClaw/fix/upload-notification-i18n 2026-03-17 07:58:21 +01:00
BillionClaw 91e907bef6 fix(ui): resolve dark mode toggle and file search errors
- Fix dark mode toggle not responding by deriving theme state from
  localStorage instead of UI pill state. Added syncThemePill() to ensure
  UI and document theme stay synchronized.

- Fix file search error when folder_id is empty by validating the
  currentPath before setting it in search options. Empty folder_id
  now correctly triggers global search instead of causing a backend
  error with invalid UUID.

Fixes #102
2026-03-17 14:19:09 +08: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
Dionisio Pozo b7e3fb13f5 Merge pull request #216 from BillionClaw/clawoss/fix/batch-folder-deletion 2026-03-17 04:34:21 +01:00
Dionisio Pozo f2ad601a75 Merge pull request #215 from BillionClaw/clawoss/fix/i18n-share-folder-translation 2026-03-17 04:33:30 +01:00
Dionisio Pozo 07bc7e564d Merge pull request #214 from BillionClaw/clawoss/fix/docker-publish-postgres 2026-03-17 04:32:42 +01:00
BillionClaw 665220dd0b fix(files): batch folder deletion fails
Add debug logging to diagnose batch trash failures for folders.
When batch trash operations fail, the specific error was not being
logged, making it difficult to diagnose issues like #124.

- Add tracing::debug! logs for failed file and folder trash operations
  in batch_operations.rs
- Add unit tests for batch operation result handling to verify
  correct success/failure counting

Fixes #124
2026-03-17 11:21:16 +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
BillionClaw 3569c5fa5a fix(ci): add PostgreSQL service to Docker publish workflow
The Docker Hub Release workflow's test job was missing the PostgreSQL
service required by the test suite. This caused the workflow to fail
before building and pushing the Docker image, resulting in missing
container images (e.g., v0.5.2).

Add the PostgreSQL service configuration matching ci.yml:
- PostgreSQL 16-alpine service container
- Health check configuration
- DATABASE_URL environment variable
- Database initialization step

Fixes #193
2026-03-17 10:49:02 +08:00
Dionisio Pozo f6a2985dbc Merge pull request #213 from BillionClaw/clawoss/docs/fix-incorrect-branch-path 2026-03-17 02:16:01 +01:00
BillionClaw 282626cce7 docs: fix incorrect path in development guide 2026-03-17 08:19:13 +08:00
Dionisio Pozo 0e8f910904 Merge pull request #212 from BillionClaw/clawoss/fix/menu-navigation 2026-03-16 23:47:22 +01:00
BillionClaw 0a6d733be5 fix(ui): resolve broken menu navigation
The sidebar CSS had incorrect :nth-child() selectors for nav item colors.
When the Photos menu item was added, the CSS wasn't updated to account
for the new 6th position of the Trash item.

Changes:
- Add color styling for Photos nav item (5th child, pink)
- Update Trash nav item to use :nth-child(6) instead of :nth-child(5)
- Add active state colors for both Photos and updated Trash positions

Fixes #194
2026-03-17 06:25:35 +08:00
Dionisio Pozo 9565f25dc2 Merge pull request #211 from BillionClaw/clawoss/fix/csp-session-loop
fix(auth): resolve CSP blocking inline styles and fix session refresh loop
2026-03-16 23:17:19 +01:00
BillionClaw 2daee68d20 fix(auth): resolve CSP blocking and session refresh loop
Fix two issues causing login loop after successful admin setup:

1. CSP blocking inline styles: The frontend JavaScript dynamically sets
   inline styles (e.g., element.style.display = 'none') for UI state
   management. The CSP header only allowed 'self' for style-src, blocking
   these dynamic styles. Added 'unsafe-inline' to style-src directive.

2. Session refresh 401 errors: The cookie Secure flag defaulted to true
   when OXICLOUD_BASE_URL was not set, causing cookies to not be sent
   over HTTP in Docker deployments. Changed the default to false when
   the base URL is not explicitly set to HTTPS, with clear logging to
   guide users to set OXICLOUD_COOKIE_SECURE=true for production.

Fixes #203
2026-03-17 06:14:02 +08:00
Dionisio Pozo c669c24036 Merge pull request #210 from BillionClaw/clawoss/docs/feature-status-table 2026-03-16 22:59:36 +01:00
BillionClaw 2d4fa1e17f docs(readme): add feature status table 2026-03-17 05:47:09 +08:00
Dionisio Pozo 907ffaa0a3 Merge pull request #209 from BillionClaw/clawoss/fix/armv7-overflow 2026-03-16 21:55:57 +01:00
BillionClaw 0cbbb6b7ac fix: ARMv7 32-bit compilation overflow
The constant 10 * 1024 * 1024 * 1024 (10 GB) overflows on 32-bit systems
where usize is 32-bit (max ~4GB). This caused compilation failures on
ARMv7 architecture.

Fix by using architecture-appropriate limits:
- 64-bit: 10 GB (unchanged)
- 32-bit: 1 GB (safe maximum for 32-bit usize)

Fixes #206
2026-03-17 04:39:18 +08:00
Dionisio Pozo c9ca1f8885 Merge pull request #208 from BillionClaw/clawoss/fix/calendar-owner-id-uuid-type 2026-03-16 20:18:47 +01:00
BillionClaw 7645792d5a fix(calendar): change owner_id from String to Uuid type
The database schema defines owner_id as UUID, but the Calendar entity
stored it as String. This caused a type mismatch error when creating
calendars via CalDAV clients like DAVx:

  column "owner_id" is of type uuid but expression is of type text

Changes:
- Change Calendar.owner_id from String to Uuid
- Update new() and with_id() to accept Uuid
- Update owner_id() getter to return &Uuid
- Update belongs_to() to accept &Uuid
- Update calendar_storage_adapter to pass Uuid directly
- Update tests to use Uuid::new_v4()

Fixes #200
2026-03-17 02:58:34 +08:00
Dionisio Pozo 036a345b4e Merge pull request #207 from jaredwolff/fix/nextcloud-sync-conflict
Fix Nextcloud sync conflict caused by static UUID ETags
2026-03-15 20:28:39 +01:00
Jared Wolff b6bcb7d366 Fix RUSTSEC-2026-0037: update quinn-proto to 0.11.14
Patch denial-of-service vulnerability where invalid QUIC transport
parameters could cause a panic in quinn-proto.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-15 14:42:34 -04:00
Jared Wolff 1fcd02a519 Fix Nextcloud sync conflict by using content-hash ETags
The Nextcloud Android client compares ETags before and after upload to
verify its write landed. OxiCloud was returning the stable file UUID as
the ETag, which never changed on content updates, causing false
SYNC_CONFLICT errors on every upload.

Five fixes applied:
1. Thread blob_hash (SHA-256) through File entity, FileDto, all read/write
   queries, and all WebDAV/PROPFIND responses as the ETag — changes on
   every content update, no DB migration needed.
2. Honor X-OC-Mtime header: parse the client-supplied mtime and use it
   for updated_at via COALESCE(to_timestamp($n), NOW()).
3. Disable phantom checksum capability (preferredUploadType/supportedTypes)
   that the server never actually implemented, stopping retry loops.
4. Add nc:creation_time and nc:upload_time to PROPFIND responses.
5. Return oc-etag header in chunked upload MOVE (assemble) responses.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 14:14:24 -04:00
Dionisio Pozo 5fb3e31ad7 Merge pull request #202 from JVMerkle/bugfix/cal-color-validation 2026-03-14 16:35:57 +01:00
Julian Merkle 85663ef050 calendar.rs: Allow RGBA colors
The android app "DAVx" creates calendars with RGBA color codes.

fixes #199
2026-03-14 15:48:11 +01:00
Dionisio Pozo 04be94026e Merge pull request #198 from nk-designz/helm-chart 2026-03-12 17:20:02 +01:00
Nico Kahlert 080b87a277 Add documentation for the helm chart 2026-03-12 13:07:19 +01:00
Nico Kahlert a166bd4a99 Created a helm chart for oxicloud with optional wopi 2026-03-12 12:48:22 +01:00
Dionisio Pozo f2cf6e0193 Merge pull request #197 from raenur/documentation-suggestions
Documentation suggestions for accessing oxicloud remotely after first install
2026-03-11 10:37:38 +01:00
Nathan Shepperd 017e82aca0 Update README.md 2026-03-11 08:48:14 +00:00
Nathan Shepperd 769c95fac9 Update example.env
Note in example.env file about accessing remotely via the server's domain name
2026-03-11 08:46:12 +00:00
Dionisio Pozo 5b7ca30060 Merge pull request #195 from jaredwolff/fix/migration-media-sort-date
fix(migrations): handle pre-existing tables missing media_sort_date
2026-03-11 08:38:53 +01:00
Dionisio Pozo f737dc09ce Merge pull request #196 from jaredwolff/fix/ui-fixes
fix(ui): photos view bleeding into trash view
2026-03-11 08:38:03 +01:00
Jared Wolff a0ee538cb7 fix(docker): remove target-cpu=native from Dockerfile
target-cpu=native causes SIGILL in CI because the build script is
compiled with CPU-specific instructions that the Docker builder
doesn't support. Docker images should use generic CPU targets for
portability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 21:24:49 -04:00
Jared Wolff 9fbc6bf2a4 fix(ui): photos view bleeding into trash view
The trash nav handler manually set view flags instead of calling
setCurrentSection('trash'), which meant the photos container was
never hidden when switching to trash. Use the central view-switching
function so all other views (photos, shared) are properly cleaned up.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 21:22:53 -04:00
Jared Wolff 9ec0f0e0d6 fix(migrations): add ALTER TABLE fallback for media_sort_date column
When the storage.files table already exists from a manual migration,
CREATE TABLE IF NOT EXISTS is skipped entirely, so the new
media_sort_date column is never added. Add an ALTER TABLE ADD COLUMN
IF NOT EXISTS immediately after the CREATE TABLE to handle both fresh
and pre-existing databases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 21:17:34 -04:00
Dionisio Pozo 7e67db8c98 Merge pull request #192 from jaredwolff/chore/update-claude-md
chore: add pre-commit checks to CLAUDE.md
2026-03-10 11:18:13 +01:00
Dionisio Pozo f1cfed248a Merge pull request #191 from jaredwolff/feat/sql-migration-system
feat: add SQL migration system using sqlx::migrate!()
2026-03-09 20:54:42 +01:00
Jared Wolff f6e2b30688 fix(ci): update references from db/schema.sql to sqlx migrations
CI and Docker builds broke after removing db/ in favor of migrations/.
- ci.yml: point psql init at migrations/20260307000000_initial_schema.sql
- Dockerfile: COPY migrations instead of db; remove unused db copy in final stage
- docker-build.yml: remove db/schema.sql presence check

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 15:43:15 -04:00
Jared Wolff 66c5456a42 chore: add pre-commit checks and update schema refs in CLAUDE.md
- Add pre-commit section: cargo fmt then cargo clippy before committing
- Update db/schema.sql references to migrations/ (sqlx migrations)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 15:35:01 -04:00
Jared Wolff 036390a242 feat: add SQL migration system using sqlx::migrate!()
Replace manual schema.sql application with sqlx's built-in migration
system. Migrations are embedded at compile time and tracked in the
_sqlx_migrations table. Pending migrations run automatically on startup.

- Move db/schema.sql → migrations/20260307000000_initial_schema.sql
- Remove apply_schema() and split_sql_statements() from db.rs
- Add run_migrations() using sqlx::migrate!() macro
- Remove docker-compose schema.sql mount (app handles it now)
- Enable sqlx "migrate" feature in Cargo.toml

Future schema changes: add a new timestamped .sql in migrations/.

Closes #190

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 15:30:52 -04:00
Dionisio Pozo 47638224f3 Merge pull request #188 from zjean/fix/ci-clippy-fmt
fix: resolve clippy and rustfmt CI failures
2026-03-09 14:48:46 +01:00
zjean 18518bedaf fix: resolve clippy warnings and rustfmt issues for CI compliance
Fix all clippy lints (collapsible if, clone on Copy, needless borrow,
redundant bindings, unused params) and apply rustfmt across the codebase.
Update test mocks to match Uuid-based trait signatures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 14:34:07 +01:00
Diocrafts cf9fe82b5f chore: bump version to v0.5.2 2026-03-09 00:11:47 +01: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
Diocrafts f409a9edd7 perf(frontend): add build.rs asset pipeline with oxc + lightningcss
- Bundle 31 JS files → single app.{hash}.js (oxc minifier)
- Bundle 36 CSS files → single app.{hash}.css (lightningcss)
- Resolve CSS @import chains at build time
- Inline theme-init.js to eliminate render-blocking script
- Minify all individual JS/CSS/JSON assets in static-dist/
- Auto-update Service Worker cache manifest with bundle hashes
- FNV hash-based cache-busting filenames

Results: 88 → 12 requests, 640 kB → 96.5 kB transferred (-85%)

Build modes:
- Debug: copies HTML to OUT_DIR, serves original static/
- Release: generates static-dist/ with processed assets

Also:
- Update Dockerfile to include build.rs in cacher stage
- Serve static-dist/ in release Docker builds
- Remove host static/ bind mount from docker-compose
- Switch include_str!() to OUT_DIR for all HTML pages
2026-03-08 13:10:38 +01:00