[PR #178] [MERGED] fix: improve SSH key handling and public key modal UX #240

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

📋 Pull Request Information

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

Base: mainHead: fix/various_fixes


📝 Commits (2)

  • 106028c fix: increase IP input box width in installedScripts table
  • 3cbb21f fix: improve SSH key handling and public key modal UX

📊 Changes

4 files changed (+102 additions, -11 deletions)

View changed files

📝 src/app/_components/InstalledScriptsTab.tsx (+1 -1)
📝 src/app/_components/PublicKeyModal.tsx (+71 -1)
📝 src/app/_components/SSHKeyInput.tsx (+11 -2)
📝 src/app/_components/ServerForm.tsx (+19 -7)

📄 Description

Summary

This PR fixes several SSH key handling issues and improves the public key modal user experience.

Changes Made

🔧 SSH Key Import Fixes

  • Auto-trim whitespace: SSH keys now automatically have trailing whitespace and empty lines removed when pasted or uploaded
  • Prevents import failures: No more manual editing required to remove extra whitespace

🔧 Public Key Modal Improvements

  • Reduced textarea size: Public key textarea reduced from 120px to 60px min-height for better space usage
  • Quick command section: Added pre-filled echo command for adding keys to authorized_keys
  • One-click copy: Users can copy either just the key or the complete command
  • Better UX: Clear separation between key display and command sections

🔧 ServerForm Enhancements

  • View Public Key button: Added button in ServerForm for generated key pairs (works before saving server)
  • Immediate access: Users can view public keys right after generation

Technical Details

  • Modified to auto-trim whitespace in both paste and file upload handlers
  • Enhanced with smaller textarea and quick command functionality
  • Updated to include View Public Key button for generated keys
  • All changes maintain existing functionality while improving user experience

Testing

  • Build successful with no errors
  • All linting checks pass
  • No breaking changes to existing functionality

User Benefits

  • Faster SSH key setup with fewer manual steps
  • Reduced errors from whitespace issues
  • Better modal layout and usability
  • One-click access to public keys and commands

🔄 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/178 **Author:** [@michelroegl-brunner](https://github.com/michelroegl-brunner) **Created:** 10/17/2025 **Status:** ✅ Merged **Merged:** 10/17/2025 **Merged by:** [@michelroegl-brunner](https://github.com/michelroegl-brunner) **Base:** `main` ← **Head:** `fix/various_fixes` --- ### 📝 Commits (2) - [`106028c`](https://github.com/community-scripts/ProxmoxVE-Local/commit/106028c2f49d498c7d8405ad8b1781d26092ad80) fix: increase IP input box width in installedScripts table - [`3cbb21f`](https://github.com/community-scripts/ProxmoxVE-Local/commit/3cbb21f00dda6ada9a3dd291893df754ae346369) fix: improve SSH key handling and public key modal UX ### 📊 Changes **4 files changed** (+102 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `src/app/_components/InstalledScriptsTab.tsx` (+1 -1) 📝 `src/app/_components/PublicKeyModal.tsx` (+71 -1) 📝 `src/app/_components/SSHKeyInput.tsx` (+11 -2) 📝 `src/app/_components/ServerForm.tsx` (+19 -7) </details> ### 📄 Description ## Summary This PR fixes several SSH key handling issues and improves the public key modal user experience. ## Changes Made ### 🔧 SSH Key Import Fixes - **Auto-trim whitespace**: SSH keys now automatically have trailing whitespace and empty lines removed when pasted or uploaded - **Prevents import failures**: No more manual editing required to remove extra whitespace ### 🔧 Public Key Modal Improvements - **Reduced textarea size**: Public key textarea reduced from 120px to 60px min-height for better space usage - **Quick command section**: Added pre-filled echo command for adding keys to authorized_keys - **One-click copy**: Users can copy either just the key or the complete command - **Better UX**: Clear separation between key display and command sections ### 🔧 ServerForm Enhancements - **View Public Key button**: Added button in ServerForm for generated key pairs (works before saving server) - **Immediate access**: Users can view public keys right after generation ## Technical Details - Modified to auto-trim whitespace in both paste and file upload handlers - Enhanced with smaller textarea and quick command functionality - Updated to include View Public Key button for generated keys - All changes maintain existing functionality while improving user experience ## Testing - ✅ Build successful with no errors - ✅ All linting checks pass - ✅ No breaking changes to existing functionality ## User Benefits - Faster SSH key setup with fewer manual steps - Reduced errors from whitespace issues - Better modal layout and usability - One-click access to public keys and commands --- <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:41 -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#240