diff --git a/src/lib/components/RemoteControlSetupGuide.svelte b/src/lib/components/RemoteControlSetupGuide.svelte new file mode 100644 index 000000000..265b88edb --- /dev/null +++ b/src/lib/components/RemoteControlSetupGuide.svelte @@ -0,0 +1,746 @@ + + + + +{#if isOpen} + +{/if} + + diff --git a/src/lib/components/views/SettingsView.svelte b/src/lib/components/views/SettingsView.svelte index 7651690d1..e0f3884b6 100644 --- a/src/lib/components/views/SettingsView.svelte +++ b/src/lib/components/views/SettingsView.svelte @@ -11,6 +11,7 @@ import DeviceDropdown from '../DeviceDropdown.svelte'; import AlsaUtilsHelpModal from '../AlsaUtilsHelpModal.svelte'; import DACSetupWizard from '../DACSetupWizard.svelte'; + import RemoteControlSetupGuide from '../RemoteControlSetupGuide.svelte'; import VolumeSlider from '../VolumeSlider.svelte'; import UpdateCheckResultModal from '../updates/UpdateCheckResultModal.svelte'; import WhatsNewModal from '../updates/WhatsNewModal.svelte'; @@ -645,6 +646,7 @@ let remoteControlQrOpen = $state(false); let remoteControlQrData = $state(''); let remoteControlUrl = $state(''); + let showRemoteControlGuide = $state(false); // Load saved settings on mount onMount(() => { @@ -2820,7 +2822,13 @@
-

{$t('settings.integrations.remoteControl')}

+
+

{$t('settings.integrations.remoteControl')}

+ {$t('settings.integrations.remoteControlExperimental')} + +
@@ -3531,6 +3539,48 @@ flatpak override --user --filesystem=/home/USUARIO/Música com.blitzfc.qbz margin-bottom: 16px; } + .section-title-row { + display: flex; + align-items: center; + gap: 12px; + margin-bottom: 16px; + } + + .section-title-row .section-title { + margin-bottom: 0; + } + + .experimental-badge { + font-size: 10px; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.5px; + padding: 3px 8px; + border-radius: 4px; + background: rgba(239, 68, 68, 0.15); + color: #ef4444; + border: 1px solid rgba(239, 68, 68, 0.3); + } + + .setup-guide-btn { + margin-left: auto; + padding: 6px 12px; + font-size: 12px; + font-weight: 500; + border-radius: 6px; + border: 1px solid var(--border-subtle); + background: var(--bg-secondary); + color: var(--text-secondary); + cursor: pointer; + transition: all 150ms ease; + } + + .setup-guide-btn:hover { + background: var(--bg-tertiary); + color: var(--text-primary); + border-color: var(--accent-primary); + } + .subsection-title { font-size: 13px; font-weight: 600; @@ -4294,3 +4344,8 @@ flatpak override --user --filesystem=/home/USUARIO/Música com.blitzfc.qbz isOpen={showDACWizardModal} onClose={() => showDACWizardModal = false} /> + + showRemoteControlGuide = false} +/> diff --git a/src/lib/i18n/locales/en.json b/src/lib/i18n/locales/en.json index a1711b6fa..4ee70b1d7 100644 --- a/src/lib/i18n/locales/en.json +++ b/src/lib/i18n/locales/en.json @@ -613,7 +613,9 @@ "musicbrainzCache": "MusicBrainz Cache", "listenbrainz": "ListenBrainz", "remoteControl": "Remote Control", + "remoteControlExperimental": "Experimental", "remoteControlDesc": "Control QBZ from another device on the same network.", + "remoteControlSetupGuide": "Setup Guide", "remoteControlEnable": "Enable Remote Control", "remoteControlPort": "Port", "remoteControlPortDesc": "Default is 8182.", @@ -1194,5 +1196,115 @@ "verify": "Verify", "done": "Done" } + }, + "remoteControlWizard": { + "steps": { + "welcome": "Welcome", + "enable": "Enable", + "https": "HTTPS", + "certificate": "Certificate", + "pair": "Pair", + "done": "Done" + }, + "welcome": { + "title": "Remote Control Setup", + "subtitle": "Control QBZ from another device", + "intro": "This guide will help you set up remote control so you can control QBZ from your phone, tablet, or another device on the same network.", + "feature1": "Control playback (play, pause, skip)", + "feature2": "Manage your queue", + "feature3": "Search and add tracks", + "feature4": "Install as PWA on your device", + "start": "Get Started", + "screenshot": "[Screenshot: Remote control PWA on mobile]" + }, + "enable": { + "title": "Enable Remote Control", + "subtitle": "Turn on the local API server", + "step1": "Go to Settings → Remote Control", + "step2": "Toggle \"Enable Remote Control\" ON", + "step3": "Note the port number (default: 8182)", + "portNote": "The default port is 8182. You can change it if needed, but you'll need to update it during pairing.", + "screenshot": "[Screenshot: Settings > Remote Control toggle]" + }, + "https": { + "title": "Enable Secure Connection", + "subtitle": "Required for PWA installation", + "intro": "HTTPS is required to install the remote control as a Progressive Web App (PWA) on your phone or tablet.", + "step1": "Enable \"Secure Connection (HTTPS)\"", + "step2": "QBZ will generate a self-signed certificate", + "step3": "A certificate URL will appear", + "whyRequired": "Why HTTPS?", + "whyReason1": "Modern browsers require HTTPS for PWA installation", + "whyReason2": "Secure connection protects your pairing token", + "whyReason3": "Required for service workers and offline features", + "screenshot": "[Screenshot: HTTPS toggle enabled]" + }, + "certificate": { + "title": "Install Certificate", + "subtitle": "Trust the QBZ certificate on your device", + "intro": "Since QBZ uses a self-signed certificate, you need to install and trust it on your controlling device.", + "step1": "Copy the certificate URL from QBZ settings", + "step2": "Open the URL on your controlling device's browser", + "step3": "Download and install the certificate", + "step4": "Trust the certificate for web browsing", + "iosTitle": "iOS (iPhone/iPad)", + "iosStep1": "Open the certificate URL in Safari", + "iosStep2": "Tap \"Allow\" to download the profile", + "iosStep3": "Go to Settings → Profile Downloaded → Install", + "iosStep4": "Go to Settings → General → About → Certificate Trust Settings", + "iosStep5": "Enable full trust for the QBZ certificate", + "macosTitle": "macOS", + "macosStep1": "Open the certificate URL in Safari", + "macosStep2": "Open the downloaded .crt file", + "macosStep3": "Keychain Access will open - add to login keychain", + "macosStep4": "Double-click the certificate, expand Trust", + "macosStep5": "Set \"When using this certificate\" to \"Always Trust\"", + "windowsTitle": "Windows", + "windowsStep1": "Open the certificate URL in any browser", + "windowsStep2": "Open the downloaded .crt file", + "windowsStep3": "Click \"Install Certificate...\"", + "windowsStep4": "Select \"Local Machine\" then \"Next\"", + "windowsStep5": "Select \"Place all certificates in: Trusted Root Certification Authorities\"", + "windowsStep6": "Finish the wizard and confirm", + "androidTitle": "Android", + "androidStep1": "Open the certificate URL in Chrome", + "androidStep2": "Open the downloaded .crt file", + "androidStep3": "Enter a name (e.g., \"QBZ\")", + "androidStep4": "Select \"VPN and apps\" or \"Wi-Fi\" as usage type", + "androidStep5": "Tap OK to install", + "screenshot": "[Screenshot: Certificate URL in QBZ settings]" + }, + "pair": { + "title": "Pair Your Device", + "subtitle": "Connect to QBZ", + "intro": "Now connect your controlling device to QBZ using the QR code or manual entry.", + "qrMethod": "QR Code (Recommended)", + "qrStep1": "Click \"Show QR\" in QBZ settings", + "qrStep2": "Open the QBZ Control URL on your device", + "qrStep3": "Scan the QR code to auto-fill connection details", + "manualMethod": "Manual Entry", + "manualStep1": "Note the Local URL shown in QBZ", + "manualStep2": "Open this URL on your controlling device", + "manualStep3": "Enter the URL and token manually", + "troubleshooting": "If connection fails:", + "trouble1": "Make sure both devices are on the same network", + "trouble2": "Check that the firewall allows port 8182", + "trouble3": "Verify HTTPS is enabled and certificate is trusted", + "screenshot": "[Screenshot: QR code pairing screen]" + }, + "done": { + "title": "Setup Complete!", + "subtitle": "You can now control QBZ remotely", + "pwaHint": "For the best experience, install QBZ Control as a PWA:", + "pwaStep1": "Open the control URL on your device", + "pwaStep2": "Use \"Add to Home Screen\" or \"Install App\"", + "pwaStep3": "Launch from your home screen for fullscreen experience", + "close": "Close" + }, + "buttons": { + "next": "Next", + "back": "Back", + "close": "Close" + } } } diff --git a/src/lib/i18n/locales/es.json b/src/lib/i18n/locales/es.json index 6d2386121..22b288c5d 100644 --- a/src/lib/i18n/locales/es.json +++ b/src/lib/i18n/locales/es.json @@ -613,7 +613,9 @@ "musicbrainzCache": "Caché de MusicBrainz", "listenbrainz": "ListenBrainz", "remoteControl": "Control Remoto", + "remoteControlExperimental": "Experimental", "remoteControlDesc": "Controla QBZ desde otro dispositivo en la misma red.", + "remoteControlSetupGuide": "Guía de configuración", "remoteControlEnable": "Activar control remoto", "remoteControlPort": "Puerto", "remoteControlPortDesc": "El valor por defecto es 8182.", @@ -1194,5 +1196,115 @@ "verify": "Verificar", "done": "Completado" } + }, + "remoteControlWizard": { + "steps": { + "welcome": "Bienvenida", + "enable": "Activar", + "https": "HTTPS", + "certificate": "Certificado", + "pair": "Emparejar", + "done": "Completado" + }, + "welcome": { + "title": "Configuración del Control Remoto", + "subtitle": "Controla QBZ desde otro dispositivo", + "intro": "Esta guía te ayudará a configurar el control remoto para que puedas controlar QBZ desde tu teléfono, tablet u otro dispositivo en la misma red.", + "feature1": "Controla la reproducción (play, pausa, siguiente)", + "feature2": "Administra tu cola de reproducción", + "feature3": "Busca y añade pistas", + "feature4": "Instala como PWA en tu dispositivo", + "start": "Comenzar", + "screenshot": "[Captura: PWA de control remoto en móvil]" + }, + "enable": { + "title": "Activar Control Remoto", + "subtitle": "Enciende el servidor API local", + "step1": "Ve a Ajustes → Control Remoto", + "step2": "Activa \"Activar control remoto\"", + "step3": "Anota el número de puerto (por defecto: 8182)", + "portNote": "El puerto por defecto es 8182. Puedes cambiarlo si es necesario, pero tendrás que actualizarlo durante el emparejamiento.", + "screenshot": "[Captura: Ajustes > toggle de Control Remoto]" + }, + "https": { + "title": "Activar Conexión Segura", + "subtitle": "Requerido para instalar como PWA", + "intro": "HTTPS es necesario para instalar el control remoto como Progressive Web App (PWA) en tu teléfono o tablet.", + "step1": "Activa \"Conexión segura (HTTPS)\"", + "step2": "QBZ generará un certificado autofirmado", + "step3": "Aparecerá una URL del certificado", + "whyRequired": "¿Por qué HTTPS?", + "whyReason1": "Los navegadores modernos requieren HTTPS para instalar PWAs", + "whyReason2": "La conexión segura protege tu token de emparejamiento", + "whyReason3": "Requerido para service workers y funciones offline", + "screenshot": "[Captura: Toggle de HTTPS activado]" + }, + "certificate": { + "title": "Instalar Certificado", + "subtitle": "Confía en el certificado QBZ en tu dispositivo", + "intro": "Como QBZ usa un certificado autofirmado, necesitas instalarlo y confiar en él en tu dispositivo de control.", + "step1": "Copia la URL del certificado desde los ajustes de QBZ", + "step2": "Abre la URL en el navegador de tu dispositivo de control", + "step3": "Descarga e instala el certificado", + "step4": "Confía en el certificado para navegación web", + "iosTitle": "iOS (iPhone/iPad)", + "iosStep1": "Abre la URL del certificado en Safari", + "iosStep2": "Toca \"Permitir\" para descargar el perfil", + "iosStep3": "Ve a Ajustes → Perfil Descargado → Instalar", + "iosStep4": "Ve a Ajustes → General → Información → Configuración de Confianza del Certificado", + "iosStep5": "Activa la confianza completa para el certificado QBZ", + "macosTitle": "macOS", + "macosStep1": "Abre la URL del certificado en Safari", + "macosStep2": "Abre el archivo .crt descargado", + "macosStep3": "Se abrirá Acceso a Llaveros - añade al llavero de inicio de sesión", + "macosStep4": "Haz doble clic en el certificado, expande Confianza", + "macosStep5": "Configura \"Al usar este certificado\" como \"Confiar siempre\"", + "windowsTitle": "Windows", + "windowsStep1": "Abre la URL del certificado en cualquier navegador", + "windowsStep2": "Abre el archivo .crt descargado", + "windowsStep3": "Haz clic en \"Instalar certificado...\"", + "windowsStep4": "Selecciona \"Equipo local\" y luego \"Siguiente\"", + "windowsStep5": "Selecciona \"Colocar todos los certificados en: Entidades de certificación raíz de confianza\"", + "windowsStep6": "Finaliza el asistente y confirma", + "androidTitle": "Android", + "androidStep1": "Abre la URL del certificado en Chrome", + "androidStep2": "Abre el archivo .crt descargado", + "androidStep3": "Ingresa un nombre (ej: \"QBZ\")", + "androidStep4": "Selecciona \"VPN y aplicaciones\" o \"Wi-Fi\" como tipo de uso", + "androidStep5": "Toca OK para instalar", + "screenshot": "[Captura: URL del certificado en ajustes de QBZ]" + }, + "pair": { + "title": "Emparejar Tu Dispositivo", + "subtitle": "Conecta a QBZ", + "intro": "Ahora conecta tu dispositivo de control a QBZ usando el código QR o entrada manual.", + "qrMethod": "Código QR (Recomendado)", + "qrStep1": "Haz clic en \"Mostrar QR\" en ajustes de QBZ", + "qrStep2": "Abre la URL de QBZ Control en tu dispositivo", + "qrStep3": "Escanea el código QR para autocompletar los datos de conexión", + "manualMethod": "Entrada Manual", + "manualStep1": "Anota la URL Local mostrada en QBZ", + "manualStep2": "Abre esta URL en tu dispositivo de control", + "manualStep3": "Ingresa la URL y el token manualmente", + "troubleshooting": "Si falla la conexión:", + "trouble1": "Asegúrate de que ambos dispositivos estén en la misma red", + "trouble2": "Verifica que el firewall permita el puerto 8182", + "trouble3": "Confirma que HTTPS esté activado y el certificado sea de confianza", + "screenshot": "[Captura: Pantalla de emparejamiento con código QR]" + }, + "done": { + "title": "¡Configuración Completa!", + "subtitle": "Ahora puedes controlar QBZ remotamente", + "pwaHint": "Para la mejor experiencia, instala QBZ Control como PWA:", + "pwaStep1": "Abre la URL de control en tu dispositivo", + "pwaStep2": "Usa \"Añadir a pantalla de inicio\" o \"Instalar app\"", + "pwaStep3": "Abre desde tu pantalla de inicio para experiencia a pantalla completa", + "close": "Cerrar" + }, + "buttons": { + "next": "Siguiente", + "back": "Atrás", + "close": "Cerrar" + } } }