Refactor 'Learn How' button in Upload Modal to an inline link that auto-closes the modal.

- Replaced the button with a simple text link (`<a id="link-r2-help">`) inside the R2 credentials section.
- Added a click event listener in `UploadModal.js` to call `this.close()` when the link is clicked, allowing users to navigate to the setup guide without obstruction.
This commit is contained in:
google-labs-jules[bot] committed 2026-01-09 19:09:45 +00:00
1 parent c8ba54be4f
commit 66bfc3c395
4 files changed
+1456 -6

No files matched your search

+7 -6
View File
@@ -124,12 +124,13 @@
<h4 class="text-sm font-semibold text-text">Cloudflare R2 Credentials</h4>
<span id="storage-status" class="text-xs text-muted">Stored locally</span>
</div>
<div class="flex items-center justify-between">
<p class="text-xs text-muted">Required for direct file uploads.</p>
<a href="#view=upload-content" class="btn btn-ghost btn-xs text-accent gap-1 pl-1 pr-2">
<img src="assets/svg/upload-content-icon.svg" alt="" class="h-4 w-4" />
Learn How
</a>
<div class="mb-2">
<p class="text-xs text-muted">
Required for direct file uploads.
<a href="#view=upload-content" id="link-r2-help" class="text-accent hover:underline font-medium ml-1">
Read the setup guide.
</a>
</p>
</div>
<div class="grid gap-3 md:grid-cols-2">
+8
View File
@@ -182,6 +182,7 @@ export class UploadModal {
r2Advanced: $("#btn-r2-advanced"),
saveSettings: $("#btn-save-settings"),
browseThumbnail: $("#btn-thumbnail-file"),
r2HelpLink: $("#link-r2-help"),
};
// Status text
@@ -215,6 +216,13 @@ export class UploadModal {
await this.handleSaveSettings();
});
// Help Link
if (this.toggles.r2HelpLink) {
this.toggles.r2HelpLink.addEventListener("click", () => {
this.close();
});
}
// Automation
this.setupDescriptionMirror();
this.setupMutuallyExclusiveCheckboxes(this.toggles.nsfw, this.toggles.kids);
+9
View File
@@ -0,0 +1,9 @@
npm error Missing script: "start"
npm error
npm error Did you mean one of these?
npm error npm star # Mark your favorite packages
npm error npm stars # View packages marked as favorites
npm error
npm error To see a list of scripts, run:
npm error npm run
npm error A complete log of this run can be found in: /home/jules/.npm/_logs/2026-01-09T18_38_57_901Z-debug-0.log
+1432
View File
File diff suppressed because it is too large. Load diff