feat(spotify): show the current track as an activity
OpenSSF Scorecard / Scorecard analysis (push) Waiting to run
CI / Build & test (Node 20) (push) Canceled after 0s
CI / Build & test (Node 24) (push) Canceled after 0s
CI / Build & test (push) Canceled after 0s
CodeQL / Analyze (javascript-typescript) (push) Canceled after 0s
Security / Secret scan (gitleaks) (push) Canceled after 0s
Security / Dependency scan (OSV-Scanner) (push) Canceled after 0s
Security / IaC/config scan (Trivy) (push) Canceled after 0s
Security / License compliance scan (Trivy) (push) Canceled after 0s
OpenSSF Scorecard / Scorecard analysis (push) Waiting to run
CI / Build & test (Node 20) (push) Canceled after 0s
CI / Build & test (Node 24) (push) Canceled after 0s
CI / Build & test (push) Canceled after 0s
CodeQL / Analyze (javascript-typescript) (push) Canceled after 0s
Security / Secret scan (gitleaks) (push) Canceled after 0s
Security / Dependency scan (OSV-Scanner) (push) Canceled after 0s
Security / IaC/config scan (Trivy) (push) Canceled after 0s
Security / License compliance scan (Trivy) (push) Canceled after 0s
OAuth Authorization Code flow, with tokens kept server-side: refreshing needs the client secret, so the browser never holds a Spotify token — it asks this instance what is playing and this instance calls Spotify. The callback arrives as a plain browser redirect with no Authorization header, so the OAuth state carries the user id signed with the instance secret and is compared in constant time; without that, anyone could bind their Spotify account to another user. Activities are now tracked per producer. pushActivities replaced the whole list, so the desktop game detector and Spotify would erase each other — losing exactly the case this is for, a game and Spotify at once. Polling backs off when the tab is hidden and keeps the last known track on a network error rather than reporting 'stopped listening'. A rejected refresh token (access revoked on Spotify's side) drops the row so the UI stops claiming a live connection. Scope is read-only: user-read-currently-playing and user-read-playback-state. Per the fork's language rule, the new UI ships in en and pt-BR, and this round also translates the privacy panel.
This commit is contained in:
@@ -33,6 +33,25 @@ export const en = {
|
||||
'settings.voice.micTest.idle': 'Test your mic without joining a call.',
|
||||
'settings.voice.micTest.failed': 'Could not open the microphone. Check the device and its permission.',
|
||||
|
||||
// Settings — privacy
|
||||
'privacy.title': 'Privacy',
|
||||
'privacy.discoverable.label': 'Allow others to find my profile',
|
||||
'privacy.discoverable.description': 'When enabled, your profile appears in Discover People. Others can always add you by exact username.',
|
||||
'privacy.activity.label': 'Share Activity Status',
|
||||
'privacy.activity.description': "Allow others to see what you're up to, like games you're playing or music you're listening to.",
|
||||
|
||||
// Settings — connections
|
||||
'connections.title': 'Connections',
|
||||
'connections.spotify.description': 'Show what you are listening to on your profile.',
|
||||
'connections.spotify.connect': 'Connect Spotify',
|
||||
'connections.spotify.disconnect': 'Disconnect',
|
||||
'connections.spotify.connected': 'Connected',
|
||||
'connections.spotify.notConfigured': 'This instance has no Spotify credentials configured.',
|
||||
'connections.spotify.hint': 'Only what is playing is read — playback cannot be controlled.',
|
||||
'connections.spotify.error.denied': 'Authorisation was cancelled on Spotify.',
|
||||
'connections.spotify.error.invalid_state': 'The authorisation link expired. Try again.',
|
||||
'connections.spotify.error.exchange_failed': 'Spotify refused the authorisation. Try again.',
|
||||
|
||||
// Profile card
|
||||
'profile.aboutMe': 'About Me',
|
||||
'profile.memberSince': 'Member Since',
|
||||
|
||||
@@ -32,6 +32,25 @@ export const ptBR: Partial<Dictionary> = {
|
||||
'settings.voice.micTest.idle': 'Teste seu microfone sem entrar numa call.',
|
||||
'settings.voice.micTest.failed': 'Não foi possível abrir o microfone. Verifique o dispositivo e a permissão.',
|
||||
|
||||
// Configurações — privacidade
|
||||
'privacy.title': 'Privacidade',
|
||||
'privacy.discoverable.label': 'Permitir que me encontrem',
|
||||
'privacy.discoverable.description': 'Quando ativado, seu perfil aparece em Descobrir Pessoas. Qualquer um sempre pode te adicionar pelo nome de usuário exato.',
|
||||
'privacy.activity.label': 'Compartilhar atividade',
|
||||
'privacy.activity.description': 'Permite que os outros vejam o que você está fazendo, como jogos que está jogando ou música que está ouvindo.',
|
||||
|
||||
// Configurações — conexões
|
||||
'connections.title': 'Conexões',
|
||||
'connections.spotify.description': 'Mostre no seu perfil o que você está ouvindo.',
|
||||
'connections.spotify.connect': 'Conectar Spotify',
|
||||
'connections.spotify.disconnect': 'Desconectar',
|
||||
'connections.spotify.connected': 'Conectado',
|
||||
'connections.spotify.notConfigured': 'Esta instância não tem credenciais do Spotify configuradas.',
|
||||
'connections.spotify.hint': 'Só é lido o que está tocando — não é possível controlar a reprodução.',
|
||||
'connections.spotify.error.denied': 'A autorização foi cancelada no Spotify.',
|
||||
'connections.spotify.error.invalid_state': 'O link de autorização expirou. Tente de novo.',
|
||||
'connections.spotify.error.exchange_failed': 'O Spotify recusou a autorização. Tente de novo.',
|
||||
|
||||
// Cartão de perfil
|
||||
'profile.aboutMe': 'Sobre mim',
|
||||
'profile.memberSince': 'Membro desde',
|
||||
|
||||
Reference in New Issue
Block a user