Open-source download manager & offline media toolbox for YouTube, music, social media, learning platforms & 1,800+ sites. Built with Tauri 2.0, Rust & Svelte.
Rust downloadmanagerguihacktoberfesthomebrewlightweightlinuxlinux-distributionlocal-firstmacosmacos-packagemedia-toolboxopen-sourcerustsveltetauritrendingtrending-repositorieswindowswindows-desktopytdlp
feat(thinkific): add file import functionality for cookies JSON and update textarea placeholder
Tonhof2dc1f48d5cf
diff --git a/src/routes/courses/thinkific/+page.svelte b/src/routes/courses/thinkific/+page.svelteindex 483b8970..e8f19166 100644--- a/src/routes/courses/thinkific/+page.svelte+++ b/src/routes/courses/thinkific/+page.svelte@@ -17,6 +17,16 @@};let cookies = $state("");+ let fileInput: HTMLInputElement = $state() as HTMLInputElement;+ function onFileSelected(e: Event) {+ const input = e.target as HTMLInputElement;+ const file = input.files?.[0];+ if (!file) return;+ const reader = new FileReader();+ reader.onload = () => { cookies = reader.result as string; };+ reader.readAsText(file);+ input.value = "";+ }let siteUrl = $state("");let loading = $state(false);let error = $state("");@@ -322,15 +332,17 @@/></label><label class="field">- <span class="field-label">Cookies</span>+ <span class="field-label">Cookies JSON</span><textareaclass="input token-textarea"- placeholder="Paste your browser cookies here..."+ placeholder="Paste cookies JSON from browser extension or a raw token"bind:value={cookies}disabled={loading}rows="4"></textarea></label>+ <input type="file" accept=".json,.txt" class="hidden-file-input" bind:this={fileInput} onchange={onFileSelected} />+ <button class="button" onclick={() => fileInput?.click()} disabled={loading}>Import .json file</button>{#if error}<p class="error-msg">{error}</p>@@ -506,10 +518,15 @@margin-block: 0;}+ .hidden-file-input {+ display: none;+ }+.token-textarea {resize: vertical;min-height: 80px;- font-size: 12px;+ font-size: 11.5px;+ font-family: var(--font-mono);line-height: 1.5;}