Chore: Flathub Support (Tinkering Around)

This commit is contained in:
Youwes09
2026-04-15 18:24:46 -05:00
parent 64f63ceaa2
commit ff5fcc4fc0
12 changed files with 283 additions and 154 deletions
+14 -1
View File
@@ -272,6 +272,14 @@
migrateFrom = null; migrateTo = null; migrateError = null; migrateProgress = null;
}
async function browseDownloadsFolder() {
const picked = await invoke<string | null>("pick_downloads_folder");
if (picked) {
downloadsPathInput = picked;
pathsFieldError = { ...pathsFieldError, dl: undefined };
}
}
function addExtraScanDir() {
const dir = newScanDir.trim();
if (!dir || extraScanDirs.includes(dir)) return;
@@ -1633,6 +1641,11 @@
onkeydown={(e) => e.key === "Enter" && savePaths()}
oninput={() => { pathsFieldError = { ...pathsFieldError, dl: undefined }; }}
/>
{#if !isExternalServer}
<button class="sec-action-btn" onclick={browseDownloadsFolder} title="Browse for folder">
Browse
</button>
{/if}
<div class="path-actions">
{#if pathsFieldError.dl}
<span class="path-field-error">{pathsFieldError.dl}</span>
@@ -3118,4 +3131,4 @@
.content-action-btn:hover { color: var(--text-muted); border-color: var(--border-strong); background: var(--bg-overlay); }
.content-action-active-allow { color: var(--color-success) !important; border-color: color-mix(in srgb, var(--color-success) 40%, transparent) !important; background: color-mix(in srgb, var(--color-success) 10%, transparent) !important; }
.content-action-active-block { color: var(--color-error) !important; border-color: color-mix(in srgb, var(--color-error) 40%, transparent) !important; background: color-mix(in srgb, var(--color-error) 10%, transparent) !important; }
</style>
</style>