[PR #4090] Feat: Random Script picker for Website #4734

Closed
opened 2025-11-20 06:11:25 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/community-scripts/ProxmoxVE/pull/4090

State: closed
Merged: Yes


✍️ Description

Added a new /random-script page that displays a random script from the available scripts collection, with the ability to re-roll for a new random script.

Changes

  • Created new page at /frontend/src/app/random-script/page.tsx
  • Reuses existing ScriptItem component for consistent script display
  • Implements random script selection from all available scripts
  • Adds a "Re-Roll" button to get a new random script
  • Maintains consistent styling with the existing scripts page
  • Handles loading and error states appropriately

Technical Details

  • Uses fetchCategories to get all available scripts
  • Implements client-side random selection
  • No backend changes required
  • Fully responsive design
  • Maintains existing theme and styling patterns

Testing

  • Verify random script selection works
  • Check re-roll functionality
  • Confirm loading states display correctly
  • Ensure error state shows when no scripts are available
  • Verify responsive design on different screen sizes

Screenshot

image

https://community-scripts.github.io/ProxmoxVED/random-script

Link: #4046

Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.
**Original Pull Request:** https://github.com/community-scripts/ProxmoxVE/pull/4090 **State:** closed **Merged:** Yes --- <!--🛑 New scripts must be submitted to [ProxmoxVED](https://github.com/community-scripts/ProxmoxVED) for testing. PRs without prior testing will be closed. --> ## ✍️ Description Added a new `/random-script` page that displays a random script from the available scripts collection, with the ability to re-roll for a new random script. ### Changes - Created new page at `/frontend/src/app/random-script/page.tsx` - Reuses existing `ScriptItem` component for consistent script display - Implements random script selection from all available scripts - Adds a "Re-Roll" button to get a new random script - Maintains consistent styling with the existing scripts page - Handles loading and error states appropriately ### Technical Details - Uses `fetchCategories` to get all available scripts - Implements client-side random selection - No backend changes required - Fully responsive design - Maintains existing theme and styling patterns ### Testing - Verify random script selection works - Check re-roll functionality - Confirm loading states display correctly - Ensure error state shows when no scripts are available - Verify responsive design on different screen sizes ### Screenshot ![image](https://github.com/user-attachments/assets/59333188-e794-49f4-adb0-d741944e8f7a) https://community-scripts.github.io/ProxmoxVED/random-script ## 🔗 Related PR / Issue Link: #4046 ## ✅ Prerequisites (**X** in brackets) - [X] **Self-review completed** – Code follows project standards. - [X] **Tested thoroughly** – Changes work as expected. - [X] **No security risks** – No hardcoded secrets, unnecessary privilege escalations, or permission issues. --- ## 🛠️ Type of Change (**X** in brackets) - [ ] 🐞 **Bug fix** – Resolves an issue without breaking functionality. - [X] ✨ **New feature** – Adds new, non-breaking functionality. - [ ] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. - [ ] 🆕 **New script** – A fully functional and tested script or script set. - [ ] 🌍 **Website update** – Changes to website-related JSON files or metadata. - [ ] 🔧 **Refactoring / Code Cleanup** – Improves readability or maintainability without changing functionality. - [ ] 📝 **Documentation update** – Changes to `README`, `AppName.md`, `CONTRIBUTING.md`, or other docs.
saavagebueno added the pull-request label 2025-11-20 06:11:25 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#4734