chore: brand pass, part two
- the favicon and the four PNG icons are in the colours of the current theme (#08161d ground, #37e0c2 wave)
- IT: Rimuovi for every remove, Elimina where a file is deleted
- EN: Create (not Make) for an invite, a playlist and a token; '{{genre}} mix' in lower case
- phone tabs: the Friends bar is amber only when Friends is the open tab
- README: songs in the prose, tracks only in paths and fields
- a short description in the page head
|
|
@ -10,6 +10,7 @@
|
|||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-title" content="Sonda" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="description" content="Your own music, on your own server." />
|
||||
<title>Sonda</title>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.2 KiB |
|
|
@ -1 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><rect width="512" height="512" rx="112" fill="#041d3a"/><svg x="88" y="88" width="336" height="336" viewBox="56.1 4.3 756.1 746.2"><path fill="#70e7d4" fill-rule="evenodd" d="M 400 25 C 345.5 31, 294.8 46, 257.5 67.2 C 255.3 68.5, 249.3 71.9, 244 74.9 C 235.9 79.5, 226.3 85.9, 213.1 95.6 C 190.5 112, 160.2 142, 143.4 164.6 C 123.9 190.7, 106.9 219.8, 99.5 239.8 C 98.8 241.8, 97.2 246, 96 249 C 89.8 265, 85.2 279.7, 83.9 288 C 83.5 291, 82.4 296.4, 81.6 300 C 80.7 303.6, 80 308.5, 80 311 C 80 313.5, 79.3 318.7, 78.4 322.5 C 76.3 331.5, 75.2 396.8, 76.9 413 C 80.2 445.4, 83.4 462.6, 91.4 491.1 C 104.2 536.7, 145 601.2, 182.4 635.2 C 213.5 663.4, 255.9 690.1, 291.5 704 C 297.6 706.3, 304.6 709.1, 307.2 710.1 C 309.8 711.2, 312.5 712, 313.2 712 C 313.9 712, 316.7 712.9, 319.5 713.9 C 322.2 715, 328.1 716.8, 332.5 717.9 C 336.9 719, 344.2 720.8, 348.6 721.9 C 353.1 723.1, 358.2 724, 360 724 C 361.8 724, 365.8 724.7, 368.9 725.5 C 372 726.3, 379.9 727.2, 386.5 727.5 C 393.1 727.8, 403.2 728.5, 409 729.1 C 445.3 732.9, 496 728.5, 537.2 718.1 C 598.3 702.5, 654.3 668.7, 703.2 617.9 C 745.9 573.5, 780.7 500.6, 788 440.5 C 788.7 435, 789.8 429.5, 790.6 428.3 C 792.7 425, 792.7 337, 790.6 333.7 C 789.8 332.5, 788.7 327.2, 788.1 321.9 C 784.1 285.4, 766.6 232.4, 747.1 197.7 C 706.1 124.5, 633.8 65.9, 555 42 C 550.9 40.8, 545.7 39.2, 543.5 38.4 C 531.9 34.6, 500 28, 492.5 28 C 489.8 27.9, 484.8 27.2, 481.5 26.4 C 474.6 24.6, 413.2 23.5, 400 25 M 405.9 144.1 C 329.6 150.4, 257.7 199.4, 228 265.5 C 208.9 307.9, 199.7 377.3, 207.6 418.8 C 208.5 423.3, 211.8 421.5, 214.8 414.8 C 216.4 411.3, 218.4 407.9, 219.3 407.2 C 220.2 406.4, 221.4 404.2, 222.1 402.2 C 223.9 396.4, 237.1 377, 239.1 377 C 239.6 377, 240 377.7, 240 378.5 C 240 380.9, 241.9 380.3, 243.8 377.2 C 244.7 375.7, 248.4 371.4, 252 367.7 C 261.7 357.4, 264.8 352.6, 261.9 352.2 C 260 351.9, 260.4 351.1, 266.1 345.4 C 272.9 338.5, 274 337.9, 274 341 C 274 343.9, 276.8 342.5, 285.6 335 C 293 328.7, 294.1 326.4, 288.1 329.4 C 281.3 333, 284.3 329, 293.5 322.5 C 311.5 309.7, 345 295.5, 365.5 292.1 C 389.4 288, 391.7 287.8, 407.5 288.3 C 422.8 288.7, 435.7 291.3, 429.8 292.7 C 427.1 293.4, 427.7 295, 430.5 295 C 431.9 295, 433.3 294.3, 433.6 293.5 C 436 287.2, 478.4 302.9, 497.8 317.2 C 512.6 328.2, 520.8 336.7, 530.5 351.2 C 535.4 358.5, 536.1 361.5, 533 362.3 C 531.4 362.7, 531 363.7, 531 367.3 C 531 376.8, 527.9 380, 518.8 380 C 510.3 380, 516.4 383.6, 525.3 383.9 C 530.1 384, 529.8 386.1, 524.8 387.4 C 520.8 388.4, 514.8 385.9, 502 378 C 486.2 368.2, 479.7 366.1, 464.5 366 C 384.2 365.8, 344.9 457.7, 397.7 522.2 C 441.3 575.6, 525.5 588.8, 582.7 551.4 C 613.4 531.3, 632.1 509.1, 644.3 478.5 C 647.6 470.2, 649 465.9, 654.1 448 C 656.3 440.3, 659.1 424.5, 659.5 417.5 C 662.4 361.5, 659.8 332.9, 648 290.5 C 638.4 256.2, 607.5 211.1, 578.9 189.5 C 565.9 179.7, 533.4 161, 529.5 161 C 528.3 161, 510.4 153.7, 509.6 152.9 C 509 152.4, 507.5 152, 506.1 152 C 504.6 152, 500.4 151.1, 496.5 150.1 C 473.6 143.8, 437.7 141.4, 405.9 144.1 M 567.3 414 C 554.8 420.3, 541.8 443.8, 545.9 452.6 C 547.5 456.3, 548.9 454.6, 549.7 448.1 C 550 445.3, 550.7 442.7, 551.1 442.4 C 551.6 442.1, 551.7 443.2, 551.4 444.9 C 550.2 450.9, 553.5 457.5, 561.1 464 C 564.9 467.3, 568.8 470, 569.8 470 C 570.7 470, 573 470.9, 574.8 472 C 583 477, 586.8 475.9, 597.4 465.5 C 603.8 459.2, 606 454.7, 606 447.7 C 606 436, 609.7 437.1, 612.3 449.5 C 612.6 450.6, 612.8 449, 612.9 445.9 C 613.1 437.1, 610.8 431.2, 604.4 424.1 C 596.2 415.1, 586.2 410.6, 583 414.5 C 581.4 416.4, 579.3 416.4, 578.3 414.5 C 576.8 411.9, 571.9 411.7, 567.3 414 M 398.5 723.8 C 379.5 724.8, 401.3 727.5, 424.5 727.1 C 438.2 726.9, 442.1 726, 439 723.9 C 437.6 723, 414.9 723, 398.5 723.8"/></svg></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><rect width="512" height="512" rx="112" fill="#08161d"/><svg x="88" y="88" width="336" height="336" viewBox="56.1 4.3 756.1 746.2"><path fill="#37e0c2" fill-rule="evenodd" d="M 400 25 C 345.5 31, 294.8 46, 257.5 67.2 C 255.3 68.5, 249.3 71.9, 244 74.9 C 235.9 79.5, 226.3 85.9, 213.1 95.6 C 190.5 112, 160.2 142, 143.4 164.6 C 123.9 190.7, 106.9 219.8, 99.5 239.8 C 98.8 241.8, 97.2 246, 96 249 C 89.8 265, 85.2 279.7, 83.9 288 C 83.5 291, 82.4 296.4, 81.6 300 C 80.7 303.6, 80 308.5, 80 311 C 80 313.5, 79.3 318.7, 78.4 322.5 C 76.3 331.5, 75.2 396.8, 76.9 413 C 80.2 445.4, 83.4 462.6, 91.4 491.1 C 104.2 536.7, 145 601.2, 182.4 635.2 C 213.5 663.4, 255.9 690.1, 291.5 704 C 297.6 706.3, 304.6 709.1, 307.2 710.1 C 309.8 711.2, 312.5 712, 313.2 712 C 313.9 712, 316.7 712.9, 319.5 713.9 C 322.2 715, 328.1 716.8, 332.5 717.9 C 336.9 719, 344.2 720.8, 348.6 721.9 C 353.1 723.1, 358.2 724, 360 724 C 361.8 724, 365.8 724.7, 368.9 725.5 C 372 726.3, 379.9 727.2, 386.5 727.5 C 393.1 727.8, 403.2 728.5, 409 729.1 C 445.3 732.9, 496 728.5, 537.2 718.1 C 598.3 702.5, 654.3 668.7, 703.2 617.9 C 745.9 573.5, 780.7 500.6, 788 440.5 C 788.7 435, 789.8 429.5, 790.6 428.3 C 792.7 425, 792.7 337, 790.6 333.7 C 789.8 332.5, 788.7 327.2, 788.1 321.9 C 784.1 285.4, 766.6 232.4, 747.1 197.7 C 706.1 124.5, 633.8 65.9, 555 42 C 550.9 40.8, 545.7 39.2, 543.5 38.4 C 531.9 34.6, 500 28, 492.5 28 C 489.8 27.9, 484.8 27.2, 481.5 26.4 C 474.6 24.6, 413.2 23.5, 400 25 M 405.9 144.1 C 329.6 150.4, 257.7 199.4, 228 265.5 C 208.9 307.9, 199.7 377.3, 207.6 418.8 C 208.5 423.3, 211.8 421.5, 214.8 414.8 C 216.4 411.3, 218.4 407.9, 219.3 407.2 C 220.2 406.4, 221.4 404.2, 222.1 402.2 C 223.9 396.4, 237.1 377, 239.1 377 C 239.6 377, 240 377.7, 240 378.5 C 240 380.9, 241.9 380.3, 243.8 377.2 C 244.7 375.7, 248.4 371.4, 252 367.7 C 261.7 357.4, 264.8 352.6, 261.9 352.2 C 260 351.9, 260.4 351.1, 266.1 345.4 C 272.9 338.5, 274 337.9, 274 341 C 274 343.9, 276.8 342.5, 285.6 335 C 293 328.7, 294.1 326.4, 288.1 329.4 C 281.3 333, 284.3 329, 293.5 322.5 C 311.5 309.7, 345 295.5, 365.5 292.1 C 389.4 288, 391.7 287.8, 407.5 288.3 C 422.8 288.7, 435.7 291.3, 429.8 292.7 C 427.1 293.4, 427.7 295, 430.5 295 C 431.9 295, 433.3 294.3, 433.6 293.5 C 436 287.2, 478.4 302.9, 497.8 317.2 C 512.6 328.2, 520.8 336.7, 530.5 351.2 C 535.4 358.5, 536.1 361.5, 533 362.3 C 531.4 362.7, 531 363.7, 531 367.3 C 531 376.8, 527.9 380, 518.8 380 C 510.3 380, 516.4 383.6, 525.3 383.9 C 530.1 384, 529.8 386.1, 524.8 387.4 C 520.8 388.4, 514.8 385.9, 502 378 C 486.2 368.2, 479.7 366.1, 464.5 366 C 384.2 365.8, 344.9 457.7, 397.7 522.2 C 441.3 575.6, 525.5 588.8, 582.7 551.4 C 613.4 531.3, 632.1 509.1, 644.3 478.5 C 647.6 470.2, 649 465.9, 654.1 448 C 656.3 440.3, 659.1 424.5, 659.5 417.5 C 662.4 361.5, 659.8 332.9, 648 290.5 C 638.4 256.2, 607.5 211.1, 578.9 189.5 C 565.9 179.7, 533.4 161, 529.5 161 C 528.3 161, 510.4 153.7, 509.6 152.9 C 509 152.4, 507.5 152, 506.1 152 C 504.6 152, 500.4 151.1, 496.5 150.1 C 473.6 143.8, 437.7 141.4, 405.9 144.1 M 567.3 414 C 554.8 420.3, 541.8 443.8, 545.9 452.6 C 547.5 456.3, 548.9 454.6, 549.7 448.1 C 550 445.3, 550.7 442.7, 551.1 442.4 C 551.6 442.1, 551.7 443.2, 551.4 444.9 C 550.2 450.9, 553.5 457.5, 561.1 464 C 564.9 467.3, 568.8 470, 569.8 470 C 570.7 470, 573 470.9, 574.8 472 C 583 477, 586.8 475.9, 597.4 465.5 C 603.8 459.2, 606 454.7, 606 447.7 C 606 436, 609.7 437.1, 612.3 449.5 C 612.6 450.6, 612.8 449, 612.9 445.9 C 613.1 437.1, 610.8 431.2, 604.4 424.1 C 596.2 415.1, 586.2 410.6, 583 414.5 C 581.4 416.4, 579.3 416.4, 578.3 414.5 C 576.8 411.9, 571.9 411.7, 567.3 414 M 398.5 723.8 C 379.5 724.8, 401.3 727.5, 424.5 727.1 C 438.2 726.9, 442.1 726, 439 723.9 C 437.6 723, 414.9 723, 398.5 723.8"/></svg></svg>
|
||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
|
|
@ -68,6 +68,14 @@ test('with a friend there is a Friends tab, marked in the friend colour', async
|
|||
expect(within(nav).getByRole('link', { name: 'Home' }).querySelector('[data-bar]')).toHaveClass('bg-transparent')
|
||||
})
|
||||
|
||||
test('the Friends bar is amber only when Friends is the open tab, so there is one bar at a time', async () => {
|
||||
const nav = renderTabs('/albums', [{ id: 3, name: 'Anna' }])
|
||||
const friends = await within(nav).findByRole('link', { name: 'Friends' })
|
||||
expect(friends.querySelector('[data-bar]')).toHaveClass('bg-transparent')
|
||||
expect(friends.querySelector('[data-bar]')).not.toHaveClass('bg-friend')
|
||||
expect(within(nav).getByRole('link', { name: 'Library' }).querySelector('[data-bar]')).toHaveClass('bg-primary')
|
||||
})
|
||||
|
||||
test('the bar of the current tab is the colour of this server', () => {
|
||||
const nav = renderTabs('/')
|
||||
expect(within(nav).getByRole('link', { name: 'Home' }).querySelector('[data-bar]')).toHaveClass('bg-primary')
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ const under = (path: string, prefixes: string[]) => prefixes.some((p) => path ==
|
|||
/**
|
||||
* The bar of tabs at the bottom of a phone, under the player: Home, Search, Library, Friends (only when there is a
|
||||
* friend to browse) and More. The menu on the left of a wide screen does not show on a phone, and this does not show on
|
||||
* a wide screen. The mark on top of the current tab is the colour of this server; the Friends tab has the friend colour.
|
||||
* a wide screen. The mark on top of the current tab is the colour of this server, and the friend colour when the current tab is Friends: one mark at a time.
|
||||
*/
|
||||
export default function PhoneTabs() {
|
||||
const { t } = useTranslation()
|
||||
|
|
@ -43,7 +43,7 @@ export default function PhoneTabs() {
|
|||
<span
|
||||
data-bar
|
||||
aria-hidden="true"
|
||||
className={cn('h-[3px] w-6 rounded-full', 'friend' in tab ? 'bg-friend' : tab.current ? 'bg-primary' : 'bg-transparent')}
|
||||
className={cn('h-[3px] w-6 rounded-full', tab.current ? ('friend' in tab ? 'bg-friend' : 'bg-primary') : 'bg-transparent')}
|
||||
/>
|
||||
<span>{tab.label}</span>
|
||||
</Link>
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@
|
|||
"tokenHelp": "In your instance open Preferences, Development, New application, and give it only the write:statuses permission. Paste its access token here. The server keeps it and never shows it again.",
|
||||
"connect": "Connect",
|
||||
"connecting": "Connecting…",
|
||||
"refused": "Mastodon no longer accepts the token for {{handle}}, so nothing is posted. Make a new token as described below and paste it here.",
|
||||
"refused": "Mastodon no longer accepts the token for {{handle}}, so nothing is posted. Create a new token as described below and paste it here.",
|
||||
"connectAgain": "Connect again",
|
||||
"connected": "Your listens are posted to {{handle}}.",
|
||||
"connectedHelp": "Each song that counts as a listen is posted as an unlisted status with #NowPlaying. Music of a friend is never posted.",
|
||||
|
|
@ -497,7 +497,7 @@
|
|||
"invites": "Invites",
|
||||
"makeTitle": "Invite a friend",
|
||||
"useTitle": "You got an invite",
|
||||
"makeInvite": "Make an invite",
|
||||
"makeInvite": "Create an invite",
|
||||
"invite": "Invite",
|
||||
"copy": "Copy",
|
||||
"copied": "Copied",
|
||||
|
|
@ -875,7 +875,7 @@
|
|||
"none": "No import yet. When you bring in a Spotify export, what it did is kept here."
|
||||
},
|
||||
"playlists": {
|
||||
"empty": "You have no playlists yet. Make one below, or put a song in a new one with the playlist button next to it.",
|
||||
"empty": "You have no playlists yet. Create one below, or put a song in a new one with the playlist button next to it.",
|
||||
"newLabel": "Name of the new playlist",
|
||||
"create": "Create playlist",
|
||||
"meta_one": "{{count}} song · {{duration}}",
|
||||
|
|
@ -899,7 +899,7 @@
|
|||
"remove": "Remove from playlist",
|
||||
"add": "Add to playlist",
|
||||
"addTitle": "Add “{{title}}” to a playlist",
|
||||
"addBody": "Choose a playlist, or make a new one.",
|
||||
"addBody": "Choose a playlist, or create a new one.",
|
||||
"noneYet": "You have no playlists yet.",
|
||||
"newName": "New playlist name",
|
||||
"createAndAdd": "Create and add",
|
||||
|
|
@ -916,7 +916,7 @@
|
|||
"rediscover": "Rediscover",
|
||||
"unheard": "New to you"
|
||||
},
|
||||
"genreMix": "{{genre}} Mix",
|
||||
"genreMix": "{{genre}} mix",
|
||||
"with": "With {{artists}}",
|
||||
"notFound": "This mix is not available now. Mixes change with what you listen to.",
|
||||
"shuffle": "Shuffle again",
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@
|
|||
}
|
||||
},
|
||||
"duplicates": {
|
||||
"intro": "Sono brani che stanno in più di un file: stessi artisti, stesso titolo e durata quasi uguale. Guardarli non costa niente: si legge solo l'indice. Eliminare è un'altra cosa: toglie file dalla tua cartella musicale.",
|
||||
"intro": "Sono brani che stanno in più di un file: stessi artisti, stesso titolo e durata quasi uguale. Guardarli non costa niente: si legge solo l'indice. Eliminare è un'altra cosa: elimina file dalla tua cartella musicale.",
|
||||
"checkTitle": "Controlla i file",
|
||||
"checkWhat": "Legge ogni file che ha una copia e ne salva l'impronta, così i file uguali byte per byte vengono segnati come identici. Legge soltanto: non elimina e non invia niente.",
|
||||
"checkAgain": "Rileggi tutti i file",
|
||||
|
|
@ -285,9 +285,9 @@
|
|||
"noKey": "Nessuna chiave salvata.",
|
||||
"saveKey": "Salva chiave",
|
||||
"saveKeyOne": "Salva la chiave di {{name}}",
|
||||
"removeKey": "Togli chiave",
|
||||
"removeKeyOne": "Togli la chiave di {{name}}",
|
||||
"removeKeyTitle": "Togliere la chiave di {{name}}?",
|
||||
"removeKey": "Rimuovi chiave",
|
||||
"removeKeyOne": "Rimuovi la chiave di {{name}}",
|
||||
"removeKeyTitle": "Rimuovere la chiave di {{name}}?",
|
||||
"removeKeyBody": "Si disattiva anche {{name}}.",
|
||||
"save": "Salva",
|
||||
"contact": "Contatto",
|
||||
|
|
@ -307,14 +307,14 @@
|
|||
"unreachable": "Il provider non ha risposto.",
|
||||
"error": "La prova è fallita per un altro motivo."
|
||||
},
|
||||
"purge": "Togli i dati",
|
||||
"purgeOne": "Togli i dati di {{name}}",
|
||||
"purgeTitle": "Togliere ciò che ha dato {{name}}?",
|
||||
"purgeBody": "Vengono tolti tutti i dati che ha fornito a Sonda (artisti simili, tag, descrizioni e immagini) e gli artisti che compaiono solo in quei dati e di cui nessuno ha file. La tua musica, i tuoi ascolti e le tue impostazioni restano, e il provider non viene disattivato.",
|
||||
"purgeConfirm": "Togli i dati",
|
||||
"purge": "Rimuovi i dati",
|
||||
"purgeOne": "Rimuovi i dati di {{name}}",
|
||||
"purgeTitle": "Rimuovere ciò che ha dato {{name}}?",
|
||||
"purgeBody": "Vengono rimossi tutti i dati che ha fornito a Sonda (artisti simili, tag, descrizioni e immagini) e gli artisti che compaiono solo in quei dati e di cui nessuno ha file. La tua musica, i tuoi ascolti e le tue impostazioni restano, e il provider non viene disattivato.",
|
||||
"purgeConfirm": "Rimuovi i dati",
|
||||
"removed": {
|
||||
"done": "Dati tolti: {{list}}.",
|
||||
"nothing": "Non è stato tolto niente: non c'era niente di questo provider.",
|
||||
"done": "Dati rimossi: {{list}}.",
|
||||
"nothing": "Non è stato rimosso niente: non c'era niente di questo provider.",
|
||||
"and": "e",
|
||||
"similar_one": "{{count}} collegamento tra artisti simili",
|
||||
"similar_other": "{{count}} collegamenti tra artisti simili",
|
||||
|
|
@ -396,11 +396,11 @@
|
|||
"you": "Tu",
|
||||
"makeAdmin": "Rendi admin",
|
||||
"makeAdminOne": "Rendi admin {{email}}",
|
||||
"removeAdmin": "Togli admin",
|
||||
"removeAdminOne": "Togli il ruolo admin a {{email}}",
|
||||
"removeAdminTitle": "Togliere il ruolo admin a {{email}}?",
|
||||
"removeAdmin": "Rimuovi admin",
|
||||
"removeAdminOne": "Rimuovi il ruolo admin a {{email}}",
|
||||
"removeAdminTitle": "Rimuovere il ruolo admin a {{email}}?",
|
||||
"removeAdminBody": "Non potrà più gestire librerie, utenti o provider.",
|
||||
"removeAdminConfirm": "Togli ruolo admin",
|
||||
"removeAdminConfirm": "Rimuovi ruolo admin",
|
||||
"reset": "Reimposta password",
|
||||
"resetOne": "Reimposta la password di {{email}}",
|
||||
"resetTitle": "Reimposta la password di {{email}}",
|
||||
|
|
@ -633,7 +633,7 @@
|
|||
},
|
||||
"marked": {
|
||||
"hideOwned": "Nascondi quelli che ho già",
|
||||
"remove": "Togli",
|
||||
"remove": "Rimuovi",
|
||||
"interestedAgain": "Mi interessa di nuovo",
|
||||
"emptyWishlist": "Ancora niente nella wishlist. Aggiungi artisti dai suggerimenti.",
|
||||
"emptyDismissed": "Non hai scartato nessun artista."
|
||||
|
|
@ -642,7 +642,7 @@
|
|||
"label": "Cerca un artista da cui partire",
|
||||
"list": "Artisti di partenza",
|
||||
"add": "Aggiungi {{name}}",
|
||||
"remove": "Togli {{name}}",
|
||||
"remove": "Rimuovi {{name}}",
|
||||
"max": "Puoi scegliere al massimo {{count}} artisti.",
|
||||
"privacy": "Last.fm viene interrogato su questi artisti, se un admin l'ha attivato."
|
||||
},
|
||||
|
|
@ -896,7 +896,7 @@
|
|||
"deleteConfirm": "Elimina",
|
||||
"moveUp": "Sposta su",
|
||||
"moveDown": "Sposta giù",
|
||||
"remove": "Togli dalla playlist",
|
||||
"remove": "Rimuovi dalla playlist",
|
||||
"add": "Aggiungi a una playlist",
|
||||
"addTitle": "Aggiungi «{{title}}» a una playlist",
|
||||
"addBody": "Scegli una playlist, oppure creane una nuova.",
|
||||
|
|
@ -1034,7 +1034,7 @@
|
|||
"genresHint": "Brani con uno qualsiasi di questi generi. Scrivine uno e premi Invio.",
|
||||
"notGenres": "Escludi generi",
|
||||
"addGenre": "Aggiungi genere",
|
||||
"removeGenre": "Togli {{genre}}",
|
||||
"removeGenre": "Rimuovi {{genre}}",
|
||||
"format": "Formato del file",
|
||||
"formatAny": "Qualsiasi",
|
||||
"formatFlac": "FLAC",
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ test('it starts off, says what a friend is sent, and offers no invite while it i
|
|||
renderPage()
|
||||
expect(await screen.findByText(/It never learns who listens/)).toBeInTheDocument()
|
||||
expect(screen.getByRole('switch', { name: 'Federation' })).toHaveAttribute('aria-checked', 'false')
|
||||
expect(screen.queryByRole('button', { name: 'Make an invite' })).not.toBeInTheDocument()
|
||||
expect(screen.queryByRole('button', { name: 'Create an invite' })).not.toBeInTheDocument()
|
||||
expect(screen.queryByText(/Key of this server/)).not.toBeInTheDocument()
|
||||
})
|
||||
|
||||
|
|
@ -143,7 +143,7 @@ test('an invite is made on request, shown once with when it stops working, and c
|
|||
{ 'POST /api/v1/federation/invites': () => ({ invite: 'sonda1.abc', expires_at: '2026-11-14T10:00:00Z' }) },
|
||||
)
|
||||
renderPage()
|
||||
await user.click(await screen.findByRole('button', { name: 'Make an invite' }))
|
||||
await user.click(await screen.findByRole('button', { name: 'Create an invite' }))
|
||||
const field = await screen.findByLabelText('Invite')
|
||||
expect(field).toHaveValue('sonda1.abc')
|
||||
expect(field).toHaveAttribute('readonly')
|
||||
|
|
@ -156,7 +156,7 @@ test('an invite cannot be made before the address is set, and the page says why'
|
|||
const user = userEvent.setup()
|
||||
server({ enabled: true, key_id: 'abcdef0123456789' }, { 'POST /api/v1/federation/invites': () => apiError(409, 'address_required') })
|
||||
renderPage()
|
||||
await user.click(await screen.findByRole('button', { name: 'Make an invite' }))
|
||||
await user.click(await screen.findByRole('button', { name: 'Create an invite' }))
|
||||
expect(await screen.findByRole('alert')).toHaveTextContent('Set the public address of this server first.')
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -79,10 +79,10 @@ test('the mixes page shows the mixes made from my listening first, then one for
|
|||
expect(within(forYou).getByRole('link', { name: /Your favourites/ })).toHaveTextContent('From your listening')
|
||||
|
||||
const genres = screen.getByRole('region', { name: 'By genre' })
|
||||
const rock = within(genres).getByRole('link', { name: /Hard Rock Mix/ })
|
||||
const rock = within(genres).getByRole('link', { name: /Hard Rock mix/ })
|
||||
expect(rock).toHaveAttribute('href', `/mixes/${HARD_ROCK}`)
|
||||
expect(rock).toHaveTextContent('From the genres of your files')
|
||||
expect(within(genres).getByRole('link', { name: /Synthwave Mix/ })).toBeInTheDocument()
|
||||
expect(within(genres).getByRole('link', { name: /Synthwave mix/ })).toBeInTheDocument()
|
||||
})
|
||||
|
||||
test('a section with no mix is not shown', async () => {
|
||||
|
|
@ -121,7 +121,7 @@ const open = () => renderPage(<MixPage />, `/mixes/${HARD_ROCK}`, '/mixes/:id')
|
|||
test('a mix shows its name, its artists and its songs in order, and asks for the mix of the day', async () => {
|
||||
const { calls } = mockFetch(oneMix())
|
||||
open()
|
||||
expect(await screen.findByRole('heading', { level: 1, name: 'Hard Rock Mix' })).toBeInTheDocument()
|
||||
expect(await screen.findByRole('heading', { level: 1, name: 'Hard Rock mix' })).toBeInTheDocument()
|
||||
expect(screen.getByText(/3 songs/)).toBeInTheDocument()
|
||||
expect(screen.getByRole('button', { name: /Song 1/ })).toBeInTheDocument()
|
||||
expect(screen.getByRole('button', { name: /Song 3/ })).toBeInTheDocument()
|
||||
|
|
@ -170,7 +170,7 @@ test('Save as playlist keeps the variant that is shown, names it with the title,
|
|||
[`POST /api/v1/mixes/${HARD_ROCK}/playlist`]: ({ init }) => {
|
||||
saved = JSON.parse(init.body as string)
|
||||
return new Response(
|
||||
JSON.stringify({ id: 42, name: 'Hard Rock Mix', description: '', track_count: 2, duration_ms: 400_000, created_at: '2026-11-12T10:00:00Z', updated_at: '2026-11-12T10:00:00Z' }),
|
||||
JSON.stringify({ id: 42, name: 'Hard Rock mix', description: '', track_count: 2, duration_ms: 400_000, created_at: '2026-11-12T10:00:00Z', updated_at: '2026-11-12T10:00:00Z' }),
|
||||
{ status: 201, headers: { 'Content-Type': 'application/json' } },
|
||||
)
|
||||
},
|
||||
|
|
@ -182,8 +182,8 @@ test('Save as playlist keeps the variant that is shown, names it with the title,
|
|||
await userEvent.click(screen.getByRole('button', { name: 'Save as playlist' }))
|
||||
|
||||
const status = await screen.findByRole('status')
|
||||
expect(status).toHaveTextContent('Saved as “Hard Rock Mix”')
|
||||
expect(saved).toEqual({ name: 'Hard Rock Mix', variant: 1, auto_name: true, lang: 'en' })
|
||||
expect(status).toHaveTextContent('Saved as “Hard Rock mix”')
|
||||
expect(saved).toEqual({ name: 'Hard Rock mix', variant: 1, auto_name: true, lang: 'en' })
|
||||
expect(calls.some((c) => c.key === `POST /api/v1/mixes/${HARD_ROCK}/playlist`)).toBe(true)
|
||||
|
||||
await userEvent.click(within(status).getByRole('link', { name: 'Open the playlist' }))
|
||||
|
|
@ -226,11 +226,11 @@ const coversOf = (el: HTMLElement) => Array.from(el.querySelectorAll('img')).map
|
|||
test('a mix is a tile of colour with its name big, not a picture', async () => {
|
||||
mockFetch({ 'GET /api/v1/mixes': () => ({ items: [mix('genre:rock', 'genre', 'rock', ['Queen'], [11, 12, 13, 14])] }) })
|
||||
renderPage(<MixesPage />, '/mixes', '/mixes')
|
||||
const tile = await screen.findByRole('link', { name: /Rock Mix/ })
|
||||
const tile = await screen.findByRole('link', { name: /Rock mix/ })
|
||||
expect(coversOf(tile)).toEqual([])
|
||||
expect(tile).toHaveAttribute('data-tone')
|
||||
expect(tile).toHaveClass('min-h-36', 'text-white')
|
||||
expect(within(tile).getByText('Rock Mix')).toHaveClass('text-3xl', 'font-extrabold')
|
||||
expect(within(tile).getByText('Rock mix')).toHaveClass('text-3xl', 'font-extrabold')
|
||||
})
|
||||
|
||||
test('a mix has the same colour every time, and two mixes can have different ones', async () => {
|
||||
|
|
@ -243,7 +243,7 @@ test('a mix has the same colour every time, and two mixes can have different one
|
|||
test('the page of a mix shows the same collage', async () => {
|
||||
mockFetch(oneMix({ [`GET /api/v1/mixes/${HARD_ROCK}`]: () => withTracks('genre:hard rock', 'genre', 'hard rock', 0, songs(1, 2), [5, 6, 7, 8]) }))
|
||||
open()
|
||||
const title = await screen.findByRole('heading', { level: 1, name: 'Hard Rock Mix' })
|
||||
const title = await screen.findByRole('heading', { level: 1, name: 'Hard Rock mix' })
|
||||
const header = title.closest('header')!
|
||||
expect(coversOf(header)).toEqual(['/api/v1/albums/5/cover', '/api/v1/albums/6/cover', '/api/v1/albums/7/cover', '/api/v1/albums/8/cover'])
|
||||
})
|
||||
|
|
|
|||