From e600c89655d777458b91328118c0977d3baaa280 Mon Sep 17 00:00:00 2001 From: Signal Bean <157260218+signalbean@users.noreply.github.com> Date: Mon, 15 Dec 2025 12:41:04 +0530 Subject: [PATCH 1/3] Refresh button on site (#57) * docs(contrib): update commit message examples with large file context * docs(readme): center align content and improve readability * feat(server): add support for large files - tested with files of 1, 1.5, 2, 2.5 GB - transfer times ranging 7-15 mins avg in ascending order - optimization needed for transfer speeds * feat: add backend API endpoints for refresh settings - Add RefreshSettings data class with enabled/intervalSeconds properties - Implement GET/POST /refresh-settings endpoints in KtorServer - Add refresh settings management to FileServerService - Support configurable auto-refresh intervals (5-300 seconds) * feat(ui): add manual and auto-refresh controls to footer - Replaced static footer text with interactive refresh section - Added manual refresh button with icon - Added auto-refresh status indicator - Added settings modal for enabling/disabling auto-refresh and setting interval - Updated HTML structure for better UX and configuration options * feat(auto-refresh): implement manual and auto-refresh logic with change detection - Added auto-refresh feature with interval, enable toggle, and countdown display - Implemented settings persistence via server and localStorage - Integrated change detection using file hash to avoid unnecessary reloads - Hooked up modal interactions for configuring refresh options - Replaced direct UI updates with forced refresh calls after file upload/delete * style(ui): add footer and refresh modal styling - Styled new footer layout with refresh controls and settings button - Added hover, active, and responsive styles for refresh controls - Styled settings modal form, inputs, and labels - Improved mobile layout with responsive adjustments * reverted changes in server file based on pr 56 feedback --- CONTRIBUTING.md | 6 +- README.md | 133 +++----- app/src/main/assets/index.html | 44 ++- app/src/main/assets/script.js | 314 +++++++++++++++++- app/src/main/assets/style.css | 134 ++++++++ .../transfer/server/FileServerService.kt | 17 +- .../com/matanh/transfer/server/KtorServer.kt | 210 ++++++++---- .../matanh/transfer/server/RefreshSettings.kt | 9 + 8 files changed, 706 insertions(+), 161 deletions(-) create mode 100644 app/src/main/java/com/matanh/transfer/server/RefreshSettings.kt diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9661b4e..0e318c2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,9 +53,9 @@ This setup live-reloads the site and forwards `/api/*` requests to the emulator. - for code changes, Use commit messages with tags, e.g.: - - `fix(server): handle large file uploads` - - `feat(main): add new button` - - `tests: add tests for upload endpoint` + - `fix(server): improve error handling for large file uploads` + - `feat(ui): add progress indicator for file transfers` + - `perf(server): optimize streaming for multi-GB files` - Fork the repo and create a branch for your change. - Open a pull request diff --git a/README.md b/README.md index 7100dd3..965fd76 100644 --- a/README.md +++ b/README.md @@ -1,97 +1,74 @@ -# Transfer - -A simple local file server app for Android. Download and upload files quickly across devices over Wi-Fi — no cables, no cloud. - -
-
-
-
-
-
-
- |
-
+A simple local file server for Android
-#### Other ways -Directly from [github releases](https://github.com/matan-h/Transfer/releases) (and you can also point Obtainium to this link.) ++ Transfer files instantly across devices over Wi-Fi – no cables, no cloud, no hassle. +
-## Getting Started +## Screenshots -1. Install and open Transfer on your Android device. -2. Grant necessary permissions and select a folder you wish to share (suggestion: create a new folder called `Storage` in your home directory). -3. Tap "Start Server." -4. The app will display an IP address (e.g., `http://192.168.1.X:8000`). -5. Open this address in a web browser on any other device connected to the same Wi-Fi network. -6. You're in! If IP permissions are on (default), you'll get a prompt on your phone to allow the new device. +
+
+
+
+
+
+
+