[PR #105] [MERGED] feat: Add confirmation modal for script installation and server sorting #188

Closed
opened 2025-11-20 04:13:26 -05:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE-Local/pull/105
Author: @michelroegl-brunner
Created: 10/10/2025
Status: Merged
Merged: 10/10/2025
Merged by: @michelroegl-brunner

Base: mainHead: fix/script_execution


📝 Commits (1)

  • 05b7e1c feat: Add confirmation modal for script installation and server sorting

📊 Changes

3 files changed (+118 additions, -63 deletions)

View changed files

📝 src/app/_components/ColorCodedDropdown.tsx (+3 -1)
📝 src/app/_components/ExecutionModeModal.tsx (+110 -61)
📝 src/app/_components/SettingsModal.tsx (+5 -1)

📄 Description

Summary

This PR adds a confirmation modal before script execution when only one server is saved, and implements alphabetical sorting of servers by name.

Changes

Confirmation Modal

  • Single Server: Shows confirmation modal with script name and server details
  • Multiple Servers: Preserves existing behavior with server selection dropdown
  • Auto-selection: Single server is auto-selected but requires user confirmation
  • No Auto-execution: Removed immediate execution when only one server exists

Server Sorting

  • Alphabetical Order: Servers are now sorted by name (PROX2 before PROX3)
  • Consistent Sorting: Applied across all components (dropdown, settings modal, confirmation modal)
  • Safe Sorting: Uses nullish coalescing operators for proper handling of undefined names

Technical Details

  • Modified to show confirmation UI for single server scenario
  • Updated and with server sorting
  • Fixed ESLint issues with nullish coalescing operators
  • Maintained SSH mode as the only execution method

Testing

  • Build passes successfully
  • No linting errors
  • TypeScript compilation successful
  • Confirmation modal displays correctly for single server
  • Server sorting works in all components

Screenshots

Single Server Confirmation:

  • Shows script name prominently
  • Displays server details (name, IP) in styled card
  • "Install" and "Cancel" buttons

Multiple Servers:

  • Server selection dropdown with no pre-selection
  • "Run on Server" button (disabled until selection)

Fixes the issue where PROX3 appeared before PROX2 in server lists.


🔄 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/community-scripts/ProxmoxVE-Local/pull/105 **Author:** [@michelroegl-brunner](https://github.com/michelroegl-brunner) **Created:** 10/10/2025 **Status:** ✅ Merged **Merged:** 10/10/2025 **Merged by:** [@michelroegl-brunner](https://github.com/michelroegl-brunner) **Base:** `main` ← **Head:** `fix/script_execution` --- ### 📝 Commits (1) - [`05b7e1c`](https://github.com/community-scripts/ProxmoxVE-Local/commit/05b7e1cf927f67c9b97c21843a0b530a3b76a5cb) feat: Add confirmation modal for script installation and server sorting ### 📊 Changes **3 files changed** (+118 additions, -63 deletions) <details> <summary>View changed files</summary> 📝 `src/app/_components/ColorCodedDropdown.tsx` (+3 -1) 📝 `src/app/_components/ExecutionModeModal.tsx` (+110 -61) 📝 `src/app/_components/SettingsModal.tsx` (+5 -1) </details> ### 📄 Description ## Summary This PR adds a confirmation modal before script execution when only one server is saved, and implements alphabetical sorting of servers by name. ## Changes ### Confirmation Modal - **Single Server**: Shows confirmation modal with script name and server details - **Multiple Servers**: Preserves existing behavior with server selection dropdown - **Auto-selection**: Single server is auto-selected but requires user confirmation - **No Auto-execution**: Removed immediate execution when only one server exists ### Server Sorting - **Alphabetical Order**: Servers are now sorted by name (PROX2 before PROX3) - **Consistent Sorting**: Applied across all components (dropdown, settings modal, confirmation modal) - **Safe Sorting**: Uses nullish coalescing operators for proper handling of undefined names ## Technical Details - Modified to show confirmation UI for single server scenario - Updated and with server sorting - Fixed ESLint issues with nullish coalescing operators - Maintained SSH mode as the only execution method ## Testing - ✅ Build passes successfully - ✅ No linting errors - ✅ TypeScript compilation successful - ✅ Confirmation modal displays correctly for single server - ✅ Server sorting works in all components ## Screenshots **Single Server Confirmation:** - Shows script name prominently - Displays server details (name, IP) in styled card - "Install" and "Cancel" buttons **Multiple Servers:** - Server selection dropdown with no pre-selection - "Run on Server" button (disabled until selection) Fixes the issue where PROX3 appeared before PROX2 in server lists. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2025-11-20 04:13:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE-Local#188