feat(audio): add alsa-utils help modal with distro-specific install commands
- Add check_alsa_utils_installed and get_linux_distro Tauri commands - Detect Linux distribution from /etc/os-release - Show appropriate package manager command for each distro - Add (?) help icon next to ALSA Direct device dropdown in Settings - Modal explains why alsa-utils is needed for bit-perfect detection - Updated PKGBUILDs to list alsa-utils as optdepend
This commit is contained in:
1 parent
2838b25738
commit
5b03af41bc
6 files changed
+397
-10
No files matched your search
@@ -4,10 +4,11 @@
|
||||
import ViewTransition from '../ViewTransition.svelte';
|
||||
import { getCurrentWebview } from '@tauri-apps/api/webview';
|
||||
import { writeText as copyToClipboard } from '@tauri-apps/plugin-clipboard-manager';
|
||||
import { ArrowLeft, ChevronRight, ChevronDown, ChevronUp, Loader2, Sun, Moon, SunMoon } from 'lucide-svelte';
|
||||
import { ArrowLeft, ChevronRight, ChevronDown, ChevronUp, Loader2, Sun, Moon, SunMoon, HelpCircle } from 'lucide-svelte';
|
||||
import Toggle from '../Toggle.svelte';
|
||||
import Dropdown from '../Dropdown.svelte';
|
||||
import DeviceDropdown from '../DeviceDropdown.svelte';
|
||||
import AlsaUtilsHelpModal from '../AlsaUtilsHelpModal.svelte';
|
||||
import VolumeSlider from '../VolumeSlider.svelte';
|
||||
import UpdateCheckResultModal from '../updates/UpdateCheckResultModal.svelte';
|
||||
import WhatsNewModal from '../updates/WhatsNewModal.svelte';
|
||||
@@ -141,6 +142,9 @@
|
||||
let showMigrationModal = $state(false);
|
||||
let legacyTracksCount = $state(0);
|
||||
|
||||
// ALSA Utils help modal
|
||||
let showAlsaUtilsHelpModal = $state(false);
|
||||
|
||||
// Offline mode state
|
||||
let offlineStatus = $state<OfflineStatus>(getOfflineStatus());
|
||||
let offlineSettings = $state<OfflineSettings>(getOfflineSettings());
|
||||
@@ -1931,14 +1935,23 @@
|
||||
{#if isLoadingDevices}
|
||||
<span class="loading-text">Loading devices...</span>
|
||||
{:else if selectedBackend === 'ALSA Direct'}
|
||||
<DeviceDropdown
|
||||
value={outputDevice}
|
||||
devices={groupedDeviceOptions}
|
||||
onchange={handleBackendDeviceChange}
|
||||
backend="alsa"
|
||||
wide
|
||||
expandLeft
|
||||
/>
|
||||
<div class="dropdown-with-help">
|
||||
<DeviceDropdown
|
||||
value={outputDevice}
|
||||
devices={groupedDeviceOptions}
|
||||
onchange={handleBackendDeviceChange}
|
||||
backend="alsa"
|
||||
wide
|
||||
expandLeft
|
||||
/>
|
||||
<button
|
||||
class="help-icon-btn"
|
||||
onclick={() => showAlsaUtilsHelpModal = true}
|
||||
title="Help with bit-perfect device detection"
|
||||
>
|
||||
<HelpCircle size={16} />
|
||||
</button>
|
||||
</div>
|
||||
{:else if selectedBackend === 'PipeWire'}
|
||||
<DeviceDropdown
|
||||
value={outputDevice}
|
||||
@@ -2806,6 +2819,32 @@ flatpak override --user --filesystem=/home/USUARIO/Música com.blitzfc.qbz</pre>
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.dropdown-with-help {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.help-icon-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
transition: all 150ms ease;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.help-icon-btn:hover {
|
||||
background: var(--bg-hover);
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.loading-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
@@ -3668,3 +3707,8 @@ flatpak override --user --filesystem=/home/USUARIO/Música com.blitzfc.qbz</pre>
|
||||
onClose={closeMigrationModal}
|
||||
totalTracks={legacyTracksCount}
|
||||
/>
|
||||
|
||||
<AlsaUtilsHelpModal
|
||||
isOpen={showAlsaUtilsHelpModal}
|
||||
onClose={() => showAlsaUtilsHelpModal = false}
|
||||
/>
|
||||
Reference in new issue
Block a user