feat: Add page number string reordering to Organize PDF tool

This commit introduces a new feature to the "Organize PDF" tool that allows users to reorder pages by providing a comma-separated string of page numbers.

An "Advanced Settings" section has been added to the UI, containing a text input for the page order and an "Apply Order" button. The implementation includes validation for the input and updates the page thumbnail grid accordingly.
This commit is contained in:
sheing-google
2026-01-14 21:11:11 +00:00
parent 8f628e2b5a
commit 4a23dabd52
4 changed files with 94 additions and 5 deletions

View File

@@ -174,6 +174,18 @@
class="hidden grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 gap-4 my-6"
></div>
<!-- Advanced Settings -->
<div id="advanced-settings" class="hidden mt-6">
<h3 class="text-lg font-semibold text-white mb-2">Advanced Settings</h3>
<div class="bg-gray-700 p-4 rounded-lg">
<label for="page-order-input" class="block text-sm font-medium text-gray-300 mb-2">Page Order (comma-separated)</label>
<div class="flex gap-2">
<input type="text" id="page-order-input" class="w-full bg-gray-900 text-white rounded-md px-3 py-2 text-sm focus:ring-2 focus:ring-indigo-500 border border-gray-600" placeholder="e.g., 3,1,4,2">
<button id="apply-order-btn" class="btn-secondary">Apply Order</button>
</div>
</div>
</div>
<button id="process-btn" class="hidden btn-gradient w-full mt-6">
Save Changes
</button>