Skip to content

Commit 4aaf6e5

Browse files
committed
Move audio quality selector into Video + Audio section and remove help text
- Remove help text under profile labels to save space - Move audio quality selector into Video + Audio section for clearer hierarchy - Remove conditional rendering - selector always visible in video section - Update CSS to use inline label+select layout instead of separate group - Remove unused selectedIsVideoProfile derived variable - Keep existing logic that only applies audio quality flag to video profiles
1 parent cdcc412 commit 4aaf6e5

1 file changed

Lines changed: 24 additions & 28 deletions

File tree

src/lib/components/download/DownloadForm.svelte

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -940,10 +940,6 @@
940940
profiles.filter((p: any) => p.isSystem && p.audioOnly).slice(0, 3),
941941
);
942942
let customProfiles = $derived(profiles.filter((p: any) => !p.isSystem));
943-
let selectedIsVideoProfile = $derived(() => {
944-
const profile = profiles.find((p: any) => p.id === selectedProfileId);
945-
return profile && !profile.audioOnly;
946-
});
947943
</script>
948944

949945
<div class="download-form">
@@ -1003,7 +999,6 @@
1003999
<div class="profile-quick-select">
10041000
<div class="profile-group">
10051001
<span class="profile-group-label">Video + Audio</span>
1006-
<p class="profile-help-text">Complete video with AAC audio</p>
10071002
<div class="profile-buttons">
10081003
{#each videoProfiles as profile}
10091004
<button
@@ -1018,11 +1013,18 @@
10181013
</button>
10191014
{/each}
10201015
</div>
1016+
<div class="audio-quality-row">
1017+
<span class="audio-quality-label">Audio Quality</span>
1018+
<select bind:value={audioQuality} disabled={loading} class="audio-quality-select">
1019+
<option value="0">High</option>
1020+
<option value="5">Medium</option>
1021+
<option value="9">Low</option>
1022+
</select>
1023+
</div>
10211024
</div>
10221025

10231026
<div class="profile-group">
10241027
<span class="profile-group-label">Audio Only</span>
1025-
<p class="profile-help-text">Extract audio in MP3, FLAC, or AAC</p>
10261028
<div class="profile-buttons">
10271029
{#each audioProfiles as profile}
10281030
<button
@@ -1071,18 +1073,6 @@
10711073
</div>
10721074
</div>
10731075

1074-
{#if selectedIsVideoProfile()}
1075-
<div class="profile-group">
1076-
<span class="profile-group-label">Audio Quality</span>
1077-
<div class="audio-quality-select">
1078-
<select bind:value={audioQuality} disabled={loading}>
1079-
<option value="0">High</option>
1080-
<option value="5">Medium</option>
1081-
<option value="9">Low</option>
1082-
</select>
1083-
</div>
1084-
</div>
1085-
{/if}
10861076
</div>
10871077
{:else if customProfiles.length > 0}
10881078
<div class="profile-quick-select">
@@ -1438,14 +1428,6 @@
14381428
letter-spacing: 0.05em;
14391429
}
14401430
1441-
.profile-help-text {
1442-
font-size: 0.75rem;
1443-
color: var(--text-tertiary);
1444-
margin-top: 2px;
1445-
margin-bottom: var(--spacing-xs);
1446-
line-height: 1.3;
1447-
}
1448-
14491431
.profile-buttons {
14501432
display: flex;
14511433
gap: var(--spacing-sm);
@@ -1515,7 +1497,21 @@
15151497
color: var(--text-primary);
15161498
}
15171499
1518-
.audio-quality-select select {
1500+
.audio-quality-row {
1501+
display: flex;
1502+
align-items: center;
1503+
gap: var(--spacing-sm);
1504+
margin-top: var(--spacing-sm);
1505+
}
1506+
1507+
.audio-quality-label {
1508+
font-size: 0.75rem;
1509+
color: var(--text-tertiary);
1510+
font-weight: 500;
1511+
}
1512+
1513+
.audio-quality-select {
1514+
flex: 1;
15191515
padding: var(--spacing-sm) var(--spacing-md);
15201516
background: var(--bg-tertiary);
15211517
border: 1px solid var(--border);
@@ -1526,7 +1522,7 @@
15261522
transition: all var(--transition-fast);
15271523
}
15281524
1529-
.audio-quality-select select:focus {
1525+
.audio-quality-select:focus {
15301526
outline: none;
15311527
border-color: var(--accent-primary);
15321528
}

0 commit comments

Comments
 (0)