mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-04 20:02:26 +00:00
Streamline upload modal form fields and logic
- Rename "Legacy description" to "Video description" - Group technical NIP-71 fields (Event Type, IMETA, Tracks, Segments) into a hidden "Advanced Options" section - Automate "Summary" field to mirror "Video description" by default (with unlock toggle) - Automate "Web seed" field to mirror "Hosted video URL" - Automate "Content Warning" based on NSFW toggle status - Maintain visibility of Hashtags in the main form flow - Apply changes consistently to both Custom and Cloudflare R2 upload modes - Fix cleanup handler registration for advanced toggle listener
This commit is contained in:
1 parent
c85d129b56
commit
75eacce483
1 file changed
+5
-2
@@ -476,7 +476,7 @@ export class UploadModal {
|
||||
setupAdvancedToggle(toggleButton, container, icon) {
|
||||
if (!toggleButton || !container) return;
|
||||
|
||||
toggleButton.addEventListener('click', () => {
|
||||
const handleToggle = () => {
|
||||
const isHidden = container.classList.contains('hidden');
|
||||
if (isHidden) {
|
||||
container.classList.remove('hidden');
|
||||
@@ -489,7 +489,10 @@ export class UploadModal {
|
||||
if (toggleButton.querySelector('span')) toggleButton.querySelector('span').textContent = "Show advanced options";
|
||||
if (icon) icon.classList.remove('rotate-90');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
toggleButton.addEventListener('click', handleToggle);
|
||||
this.cleanupHandlers.push(() => toggleButton.removeEventListener('click', handleToggle));
|
||||
}
|
||||
|
||||
buildAutoGeneratedImetaVariant(file) {
|
||||
|
||||
Reference in new issue
Block a user