diff --git a/CHANGELOG.md b/CHANGELOG.md index 6eca25c..0815adf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,37 @@ # Changelog +## Changes 11/4/2025 (v1.8.2) + +release(v1.8.2): media progress tracking + watched badges; PWA scaffolding; mobile switcher (closes #37) + +- **Highlights** + - Video: auto-save playback progress and mark “Watched”, with resume-on-open and inline status chips on list/gallery. + - Mobile: introduced FileRise Mobile (Capacitor) companion repo + in-app server switcher and PWA bits. + +- **Details** + - API (new): + - POST /api/media/updateProgress.php — persist per-user progress (seconds/duration/completed). + - GET /api/media/getProgress.php — fetch per-file progress. + - GET /api/media/getViewedMap.php — folder map for badges. + +- **Frontend (media):** + - Video previews now resume from last position, periodically save progress, and mark completed on end, with toasts. + - Added status badges (“Watched” / %-complete) in table & gallery; CSS polish for badges. + - Badges render during list/gallery refresh; safer filename wrapping for badge injection. + +- **Mobile & PWA:** + - New in-app server switcher (Capacitor-aware) loaded only in app/standalone contexts. + - Service Worker + manifest added (root scope via /public/sw.js; worker body in /js/pwa/sw.js; manifest icons). + - main.js conditionally imports the mobile switcher and registers the SW on web origins only. + +- **Notes** + - Companion repo: **filerise-mobile** (Capacitor app shell) created for iOS/Android distribution. + - No breaking changes expected; endpoints are additive. + +Closes #37. + +--- + ## Changes 11/3/2025 (V1.8.1) release(v1.8.1): fix(security,onlyoffice): sanitize DS origin; safe api.js/iframe probes; better UX placeholder diff --git a/README.md b/README.md index 7142e43..34e3615 100644 --- a/README.md +++ b/README.md @@ -369,12 +369,13 @@ FileRise can open & edit office docs using your **self-hosted ONLYOFFICE Documen **Apache** ```apache - Header always set Content-Security-Policy "default-src 'self'; frame-src 'self' https://docs.example.com; script-src 'self' https://docs.example.com https://docs.example.com/web-apps/apps/api/documents/api.js; connect-src 'self' https://docs.example.com; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self'" + Header always set Content-Security-Policy "default-src 'self'; base-uri 'self'; frame-ancestors 'self'; object-src 'none'; script-src 'self' 'sha256-ajmGY+5VJOY6+8JHgzCqsqI8w9dCQfAmqIkFesOKItM=' https://your-onlyoffice-server.example.com https://your-onlyoffice-server.example.com/web-apps/apps/api/documents/api.js; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self'; connect-src 'self' https://your-onlyoffice-server.example.com; media-src 'self' blob:; worker-src 'self' blob:; form-action 'self'; frame-src 'self' https://your-onlyoffice-server.example.com" ``` **Nginx** - ```add_header Content-Security-Policy "default-src 'self'; frame-src 'self' https://docs.example.com; script-src 'self' https://docs.example.com https://docs.example.com/web-apps/apps/api/documents/api.js; connect-src 'self' https://docs.example.com; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self'" always; + ```nginx + add_header Content-Security-Policy "default-src 'self'; base-uri 'self'; frame-ancestors 'self'; object-src 'none'; script-src 'self' 'sha256-ajmGY+5VJOY6+8JHgzCqsqI8w9dCQfAmqIkFesOKItM=' https://your-onlyoffice-server.example.com https://your-onlyoffice-server.example.com/web-apps/apps/api/documents/api.js; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; font-src 'self'; connect-src 'self' https://your-onlyoffice-server.example.com; media-src 'self' blob:; worker-src 'self' blob:; form-action 'self'; frame-src 'self' https://your-onlyoffice-server.example.com" always; ``` **Notes** diff --git a/public/api/media/getProgress.php b/public/api/media/getProgress.php new file mode 100644 index 0000000..9ef3a3a --- /dev/null +++ b/public/api/media/getProgress.php @@ -0,0 +1,7 @@ +getProgress(); \ No newline at end of file diff --git a/public/api/media/getViewedMap.php b/public/api/media/getViewedMap.php new file mode 100644 index 0000000..737b2bb --- /dev/null +++ b/public/api/media/getViewedMap.php @@ -0,0 +1,7 @@ +getViewedMap(); \ No newline at end of file diff --git a/public/api/media/updateProgress.php b/public/api/media/updateProgress.php new file mode 100644 index 0000000..72564ce --- /dev/null +++ b/public/api/media/updateProgress.php @@ -0,0 +1,7 @@ +updateProgress(); \ No newline at end of file diff --git a/public/assets/icons/apple-touch-icon.png b/public/assets/icons/apple-touch-icon.png new file mode 100644 index 0000000..969aed7 Binary files /dev/null and b/public/assets/icons/apple-touch-icon.png differ diff --git a/public/assets/icons/base-1024.png b/public/assets/icons/base-1024.png new file mode 100644 index 0000000..fbfd104 Binary files /dev/null and b/public/assets/icons/base-1024.png differ diff --git a/public/assets/icons/icon-192.png b/public/assets/icons/icon-192.png new file mode 100644 index 0000000..4a72fdf Binary files /dev/null and b/public/assets/icons/icon-192.png differ diff --git a/public/assets/icons/icon-512.png b/public/assets/icons/icon-512.png new file mode 100644 index 0000000..43edf97 Binary files /dev/null and b/public/assets/icons/icon-512.png differ diff --git a/public/assets/icons/maskable-512.png b/public/assets/icons/maskable-512.png new file mode 100644 index 0000000..db415d2 Binary files /dev/null and b/public/assets/icons/maskable-512.png differ diff --git a/public/css/styles.css b/public/css/styles.css index 2b39410..17d8a29 100644 --- a/public/css/styles.css +++ b/public/css/styles.css @@ -1900,4 +1900,29 @@ body { background: #fafafa; border-color: #e2e2e2; } - \ No newline at end of file + /* media modal polish */ +.media-modal { background: var(--panel-bg, #121212); } +.media-header-bar .btn { padding: 6px 10px; } +.gallery-nav-btn { color: #fff; opacity: 0.85; } +.gallery-nav-btn:hover { opacity: 1; transform: scale(1.05); } + +/* badges */ +.status-badge { + display: inline-block; + margin-left: 6px; + padding: 2px 6px; + font-size: 11px; + line-height: 1.3; + border-radius: 999px; + border: 1px solid rgba(255,255,255,.15); + background: rgba(255,255,255,.08); + color: #fff; +} +.status-badge.watched { + border-color: rgba(34,197,94,.35); /* green-ish */ + background: rgba(34,197,94,.15); +} +.status-badge.progress { + border-color: rgba(250,204,21,.35); /* amber-ish */ + background: rgba(250,204,21,.15); +} \ No newline at end of file diff --git a/public/index.html b/public/index.html index 48adfa4..4e2b0aa 100644 --- a/public/index.html +++ b/public/index.html @@ -10,7 +10,8 @@ - + + @@ -27,8 +28,8 @@ - - + +