[PR #21] Add CLI Update Button to Settings Dashboard #33

Open
opened 2026-02-27 16:46:50 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/router-for-me/EasyCLI/pull/21
Author: @benzntech
Created: 11/25/2025
Status: 🔄 Open

Base: mainHead: feature/cli-update-button


📝 Commits (2)

  • bba014f Add CLI update button to settings dashboard
  • 1b4114d fix: resolve UI layout issue in server status container

📊 Changes

3 files changed (+423 additions, -4 deletions)

View changed files

📝 css/settings.css (+103 -4)
js/settings-update.js (+275 -0)
📝 settings.html (+45 -0)

📄 Description

Summary

Adds a CLI update feature to the EasyCLI settings dashboard, allowing users to check for and install CLIProxyAPI updates directly from the GUI without returning to the login screen.

Changes

New Features

  • Version Display: Shows current CLIProxyAPI version in the sidebar
  • Check Update Button: Manual update checking with one click
  • Update Dialog: Displays version comparison (current vs latest) before updating
  • Progress Tracking: Real-time download progress with percentage and file size
  • Auto-restart: Automatically restarts CLIProxyAPI process after successful update

Implementation Details

Frontend:

  • Added version display and update button in sidebar (Local mode only)
  • Created update confirmation dialog with version comparison
  • Added progress dialog for download tracking
  • Integrated with existing Tauri event system for real-time progress

Backend:

  • Leverages existing check_version_and_download and download_cliproxyapi Tauri commands
  • Reuses existing download infrastructure from login flow
  • Supports proxy configuration from settings

Styling:

  • Consistent with existing design system (purple accent color)
  • Responsive layout with smooth transitions
  • Progress bar with real-time updates

Files Changed

Added

  • js/settings-update.js - Update logic, event handling, and UI management

Modified

  • settings.html - Added UI elements (version display, update button, dialogs)
  • css/settings.css - Styles for CLI version container and update components

Technical Notes

  • Local Mode Only: Update feature only visible in Local mode (uses local-only class)
  • Proxy Support: Respects proxy settings from localStorage
  • Event-Driven: Listens to download-progress and download-status events from Tauri backend
  • Version Source: Reads current version from localStorage.getItem('cliproxyapi-version')
  • No Backend Changes: Reuses all existing Tauri commands and infrastructure

Testing Checklist

  • Update button appears in Local mode sidebar
  • Update button hidden in Remote mode
  • Version display shows current CLI version correctly
  • Clicking "Check Update" queries GitHub API for latest version
  • Update dialog shows correct version comparison
  • Download progress displays percentage and file sizes
  • Update completes successfully and extracts files
  • CLIProxyAPI process restarts after update
  • Version display updates to show new version
  • Proxy settings are respected during download
  • Error messages display correctly on failure

Screenshots

(To be added during review)

(If applicable)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/router-for-me/EasyCLI/pull/21 **Author:** [@benzntech](https://github.com/benzntech) **Created:** 11/25/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feature/cli-update-button` --- ### 📝 Commits (2) - [`bba014f`](https://github.com/router-for-me/EasyCLI/commit/bba014fcaa0d89c1f10b859bb6b683b2f073386a) Add CLI update button to settings dashboard - [`1b4114d`](https://github.com/router-for-me/EasyCLI/commit/1b4114d2a5c6e525d3ba805e8fe78e9022c07b7e) fix: resolve UI layout issue in server status container ### 📊 Changes **3 files changed** (+423 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `css/settings.css` (+103 -4) ➕ `js/settings-update.js` (+275 -0) 📝 `settings.html` (+45 -0) </details> ### 📄 Description ## Summary Adds a CLI update feature to the EasyCLI settings dashboard, allowing users to check for and install CLIProxyAPI updates directly from the GUI without returning to the login screen. ## Changes ### New Features - **Version Display**: Shows current CLIProxyAPI version in the sidebar - **Check Update Button**: Manual update checking with one click - **Update Dialog**: Displays version comparison (current vs latest) before updating - **Progress Tracking**: Real-time download progress with percentage and file size - **Auto-restart**: Automatically restarts CLIProxyAPI process after successful update ### Implementation Details **Frontend:** - Added version display and update button in sidebar (Local mode only) - Created update confirmation dialog with version comparison - Added progress dialog for download tracking - Integrated with existing Tauri event system for real-time progress **Backend:** - Leverages existing `check_version_and_download` and `download_cliproxyapi` Tauri commands - Reuses existing download infrastructure from login flow - Supports proxy configuration from settings **Styling:** - Consistent with existing design system (purple accent color) - Responsive layout with smooth transitions - Progress bar with real-time updates ## Files Changed ### Added - `js/settings-update.js` - Update logic, event handling, and UI management ### Modified - `settings.html` - Added UI elements (version display, update button, dialogs) - `css/settings.css` - Styles for CLI version container and update components ## Technical Notes - **Local Mode Only**: Update feature only visible in Local mode (uses `local-only` class) - **Proxy Support**: Respects proxy settings from localStorage - **Event-Driven**: Listens to `download-progress` and `download-status` events from Tauri backend - **Version Source**: Reads current version from `localStorage.getItem('cliproxyapi-version')` - **No Backend Changes**: Reuses all existing Tauri commands and infrastructure ## Testing Checklist - [ ] Update button appears in Local mode sidebar - [ ] Update button hidden in Remote mode - [ ] Version display shows current CLI version correctly - [ ] Clicking "Check Update" queries GitHub API for latest version - [ ] Update dialog shows correct version comparison - [ ] Download progress displays percentage and file sizes - [ ] Update completes successfully and extracts files - [ ] CLIProxyAPI process restarts after update - [ ] Version display updates to show new version - [ ] Proxy settings are respected during download - [ ] Error messages display correctly on failure ## Screenshots *(To be added during review)* ## Related Issues *(If applicable)* --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/EasyCLI#33
No description provided.