+
-
- {!searching && (
-
-
-
- )}
+
{/* Sticky here, not on the bar: a sticky element only sticks inside its parent. */}
-
+
-
- {/* A new page starts at its top, and back goes to where the list was. */}
-
)
}
diff --git a/web/src/components/layout/Sidebar.test.tsx b/web/src/components/layout/Sidebar.test.tsx
deleted file mode 100644
index 33c7bbf..0000000
--- a/web/src/components/layout/Sidebar.test.tsx
+++ /dev/null
@@ -1,202 +0,0 @@
-import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
-import { cleanup, render, screen, within } from '@testing-library/react'
-import userEvent from '@testing-library/user-event'
-import { MemoryRouter } from 'react-router-dom'
-import { beforeEach, expect, test, vi } from 'vitest'
-import { sessionStore } from '@/auth/session'
-import { initI18n } from '@/i18n'
-import { mockFetch } from '@/test/mockFetch'
-import Sidebar from './Sidebar'
-
-beforeEach(async () => {
- vi.spyOn(navigator, 'language', 'get').mockReturnValue('en-US')
- await initI18n()
- sessionStore.setState({ status: 'authenticated', user: { id: 1, email: 'tom@example.org', is_admin: true } })
-})
-
-function renderSidebar(friends: { id: number; name: string }[] = [], path = '/albums') {
- mockFetch({ 'GET /api/v1/friends': () => ({ friends }), 'GET /api/v1/version': () => ({ version: '0.1.0', revision: '69c85a7' }) })
- render(
-
-
-
-
- ,
- )
- return screen.getByRole('navigation', { name: 'Main' })
-}
-
-test('the menu has a link for each page, and the page that is open is the current one', () => {
- const nav = renderSidebar()
- for (const name of ['Home', 'Search', 'Discover', 'Artists', 'Albums', 'Songs', 'Favourites', 'Mixes', 'Radio', 'Playlists', 'Smart playlists', 'History', 'Statistics', 'Import', 'Admin', 'Settings']) {
- expect(within(nav).getByRole('link', { name })).toBeInTheDocument()
- }
- expect(within(nav).getByRole('link', { name: 'Albums' })).toHaveAttribute('aria-current', 'page')
- expect(within(nav).getByRole('link', { name: 'Artists' })).not.toHaveAttribute('aria-current')
-})
-
-test('the menu starts open, with a button that folds it', () => {
- const nav = renderSidebar()
- expect(nav).not.toHaveAttribute('data-collapsed')
- const button = within(nav).getByRole('button', { name: 'Collapse menu' })
- expect(button).toHaveAttribute('aria-expanded', 'true')
-})
-
-test('folding leaves the icons: the words stay as the names of the links, and the logo becomes the mark', async () => {
- const nav = renderSidebar()
- await userEvent.click(within(nav).getByRole('button', { name: 'Collapse menu' }))
- expect(nav).toHaveAttribute('data-collapsed')
- const button = within(nav).getByRole('button', { name: 'Expand menu' })
- expect(button).toHaveAttribute('aria-expanded', 'false')
- const albums = within(nav).getByRole('link', { name: 'Albums' })
- expect(albums).toHaveAttribute('title', 'Albums')
- expect(albums.querySelector('[data-icon]')).toBeInTheDocument()
- expect(albums.querySelector('span')).toHaveClass('sr-only')
- expect(within(nav).getAllByRole('img', { name: 'Sonda' })).toHaveLength(1)
- expect(within(nav).queryByText(/Nothing leaves this server/)).not.toBeInTheDocument()
-})
-
-test('when open the links have no tooltip: the words are there', () => {
- const nav = renderSidebar()
- expect(within(nav).getByRole('link', { name: 'Albums' })).not.toHaveAttribute('title')
-})
-
-test('the group names stay for a screen reader when the menu is folded', async () => {
- const nav = renderSidebar()
- await userEvent.click(within(nav).getByRole('button', { name: 'Collapse menu' }))
- expect(within(nav).getByRole('list', { name: 'Library' })).toBeInTheDocument()
- expect(within(nav).getByText('Library')).toHaveClass('sr-only')
-})
-
-test('the choice is kept on this device and applies the next time', async () => {
- const first = renderSidebar()
- await userEvent.click(within(first).getByRole('button', { name: 'Collapse menu' }))
- expect(localStorage.getItem('sonda.sidebar')).toBe('collapsed')
- cleanup()
- const again = renderSidebar()
- expect(again).toHaveAttribute('data-collapsed')
- await userEvent.click(within(again).getByRole('button', { name: 'Expand menu' }))
- expect(localStorage.getItem('sonda.sidebar')).toBe('open')
-})
-
-test('the menu says which version of Sonda this is, and folding it leaves the version out', async () => {
- const nav = renderSidebar()
- expect(await within(nav).findByText('Version 0.1.0 · 69c85a7')).toBeInTheDocument()
- await userEvent.click(within(nav).getByRole('button', { name: 'Collapse menu' }))
- expect(within(nav).queryByText(/Version 0.1.0/)).not.toBeInTheDocument()
-})
-
-test('every link has an icon, and the words stay: the icon is decoration, not the name', () => {
- const nav = renderSidebar()
- const links = within(nav).getAllByRole('link')
- expect(links.length).toBeGreaterThan(10)
- for (const link of links) {
- const icon = link.querySelector('[data-icon]')
- expect(icon, link.textContent ?? '').toBeInTheDocument()
- expect(icon).toHaveAttribute('aria-hidden', 'true')
- expect(link.textContent?.trim()).not.toBe('')
- }
-})
-
-test('no two pages share an icon', () => {
- const nav = renderSidebar()
- const kinds = within(nav)
- .getAllByRole('link')
- .map((a) => a.querySelector('[data-icon]')?.getAttribute('class')?.match(/lucide-[\w-]+/)?.[0])
- expect(new Set(kinds).size).toBe(kinds.length)
-})
-
-test('the icon of the page that is open is in the colour of this server', () => {
- const nav = renderSidebar()
- const icon = (name: string) => within(nav).getByRole('link', { name }).querySelector('[data-icon]')
- expect(icon('Albums')).toHaveClass('text-primary')
- expect(icon('Artists')).not.toHaveClass('text-primary')
-})
-
-test('the Sonda logo is the name of the app', () => {
- const nav = renderSidebar()
- expect(within(nav).getAllByRole('img', { name: 'Sonda' })).toHaveLength(1)
-})
-
-test('only an admin has an Admin link', () => {
- sessionStore.setState({ status: 'authenticated', user: { id: 2, email: 'ann@example.org', is_admin: false } })
- const nav = renderSidebar()
- expect(within(nav).queryByRole('link', { name: 'Admin' })).not.toBeInTheDocument()
-})
-
-test('Friends is in the menu only when there is a friend to browse', async () => {
- const none = renderSidebar()
- await screen.findByRole('link', { name: 'Albums' })
- expect(within(none).queryByRole('link', { name: 'Friends' })).not.toBeInTheDocument()
-})
-
-test('with a friend the menu has a Friends link, with the icon of what comes from elsewhere', async () => {
- const nav = renderSidebar([{ id: 3, name: 'Anna' }])
- const link = await within(nav).findByRole('link', { name: 'Friends' })
- expect(link).toHaveAttribute('href', '/friends')
- expect(link.querySelector('[data-icon]')).toHaveClass('text-friend')
-})
-
-test('the icon of Friends is the friend colour also when it is the page that is open', async () => {
- const nav = renderSidebar([{ id: 3, name: 'Anna' }], '/friends/3')
- const link = await within(nav).findByRole('link', { name: 'Friends' })
- expect(link).toHaveAttribute('aria-current', 'page')
- expect(link.querySelector('[data-icon]')).toHaveClass('text-friend')
-})
-
-test('on a phone the links are left to the bar of tabs: only the logo stays', () => {
- const nav = renderSidebar()
- expect(nav.querySelector(':scope > div:nth-of-type(2)')).toHaveClass('max-sm:hidden')
- expect(within(nav).getByRole('button', { name: 'Collapse menu' })).toHaveClass('max-sm:hidden')
-})
-
-const names = (nav: HTMLElement) => within(nav).getAllByRole('link').map((a) => a.textContent)
-
-test('the links are in groups, in the order of what you do: find, the library, your listening, friends, then the foot', async () => {
- const nav = renderSidebar([{ id: 3, name: 'Anna' }])
- await within(nav).findByRole('link', { name: 'Friends' })
- expect(names(nav)).toEqual([
- 'Home', 'Search', 'Discover', 'Requests',
- 'Artists', 'Albums', 'Songs', 'Favourites', 'Playlists', 'Smart playlists', 'Mixes', 'Radio',
- 'History', 'Statistics', 'Import',
- 'Friends',
- 'Settings', 'Admin',
- ])
-})
-
-test('the library and the listening have a quiet heading, and the groups that explain themselves have none', () => {
- const nav = renderSidebar()
- const library = within(nav).getByRole('list', { name: 'Library' })
- expect(within(library).getAllByRole('link').map((a) => a.textContent)).toEqual(['Artists', 'Albums', 'Songs', 'Favourites', 'Playlists', 'Smart playlists', 'Mixes', 'Radio'])
- const listening = within(nav).getByRole('list', { name: 'Your listening' })
- expect(within(listening).getAllByRole('link').map((a) => a.textContent)).toEqual(['History', 'Statistics', 'Import'])
- // The headings are words, not links, and not headings of the page.
- expect(within(nav).queryByRole('heading')).not.toBeInTheDocument()
- expect(within(nav).queryByRole('link', { name: 'Your listening' })).not.toBeInTheDocument()
-})
-
-test('Settings and Admin are at the foot, and a person who is not an admin has Settings alone', () => {
- sessionStore.setState({ status: 'authenticated', user: { id: 2, email: 'ann@example.org', is_admin: false } })
- const nav = renderSidebar()
- const all = names(nav)
- expect(all.slice(-1)).toEqual(['Settings'])
- expect(all).not.toContain('Admin')
-})
-
-test('a page inside a section lights the section: an artist, a new smart playlist, a friend', () => {
- for (const [path, name] of [['/artists/7', 'Artists'], ['/smart-playlists/new', 'Smart playlists'], ['/playlists/2', 'Playlists'], ['/admin/users', 'Admin']] as const) {
- document.body.innerHTML = ''
- const nav = renderSidebar([], path)
- expect(within(nav).getByRole('link', { name })).toHaveAttribute('aria-current', 'page')
- expect(within(nav).getAllByRole('link').filter((a) => a.getAttribute('aria-current') === 'page')).toHaveLength(1)
- }
-})
-
-test('Requests, the artists sent to Lidarr, is a link of admins only', () => {
- const admin = renderSidebar()
- expect(within(admin).getByRole('link', { name: 'Requests' })).toHaveAttribute('href', '/requests')
- document.body.innerHTML = ''
- sessionStore.setState({ status: 'authenticated', user: { id: 2, email: 'ann@example.org', is_admin: false } })
- const user = renderSidebar()
- expect(within(user).queryByRole('link', { name: 'Requests' })).not.toBeInTheDocument()
-})
diff --git a/web/src/components/layout/Sidebar.tsx b/web/src/components/layout/Sidebar.tsx
index 2ffdb1f..196f5ec 100644
--- a/web/src/components/layout/Sidebar.tsx
+++ b/web/src/components/layout/Sidebar.tsx
@@ -1,199 +1,58 @@
-import { useState } from 'react'
-import { Blend, ChartNoAxesColumn, Compass, Disc3, Heart, History, House, Inbox, ListMusic, MicVocal, Music, PanelLeftClose, PanelLeftOpen, Radio, Search, Settings, ShieldCheck, Upload, Users, WandSparkles } from 'lucide-react'
-import type { LucideIcon } from 'lucide-react'
import { NavLink } from 'react-router-dom'
import { useTranslation } from 'react-i18next'
-import { useFriends } from '@/api/friends'
import { useSession } from '@/auth/session'
-import Logo from '@/components/Logo'
-import VersionLabel from '@/components/VersionLabel'
import { cn } from '@/lib/utils'
-interface Item {
- to: string
- key: string
- icon: LucideIcon
- end?: boolean
- adminOnly?: boolean
- friends?: boolean
-}
-
-interface Group {
- /** The key of the heading, when the group has one: only the groups that are not obvious from their words. */
- heading?: string
- items: Item[]
-}
-
-/**
- * Where to find things, then what is in the library, then what you listened to, then the friends. The settings and
- * the admin area are not a group: they stay at the foot.
- */
-const GROUPS: Group[] = [
- {
- items: [
- { to: '/', key: 'nav.home', icon: House, end: true },
- { to: '/search', key: 'nav.search', icon: Search },
- { to: '/discover', key: 'nav.discover', icon: Compass },
- { to: '/requests', key: 'nav.requests', icon: Inbox, adminOnly: true },
- ],
- },
- {
- heading: 'nav.library',
- items: [
- { to: '/artists', key: 'nav.artists', icon: MicVocal },
- { to: '/albums', key: 'nav.albums', icon: Disc3 },
- { to: '/songs', key: 'nav.songs', icon: Music },
- { to: '/favorites', key: 'nav.favorites', icon: Heart },
- { to: '/playlists', key: 'nav.playlists', icon: ListMusic },
- { to: '/smart-playlists', key: 'nav.smartPlaylists', icon: WandSparkles },
- { to: '/mixes', key: 'nav.mixes', icon: Blend },
- { to: '/radio', key: 'nav.radio', icon: Radio },
- ],
- },
- {
- heading: 'nav.listening',
- items: [
- { to: '/history', key: 'nav.history', icon: History },
- { to: '/stats', key: 'nav.stats', icon: ChartNoAxesColumn },
- { to: '/import', key: 'nav.import', icon: Upload },
- ],
- },
- { items: [{ to: '/friends', key: 'nav.friends', icon: Users, friends: true }] },
+const LINKS = [
+ { to: '/', key: 'nav.home', end: true, adminOnly: false },
+ { to: '/search', key: 'nav.search', end: false, adminOnly: false },
+ { to: '/discover', key: 'nav.discover', end: false, adminOnly: false },
+ { to: '/artists', key: 'nav.artists', end: false, adminOnly: false },
+ { to: '/albums', key: 'nav.albums', end: false, adminOnly: false },
+ { to: '/songs', key: 'nav.songs', end: false, adminOnly: false },
+ { to: '/playlists', key: 'nav.playlists', end: false, adminOnly: false },
+ { to: '/admin', key: 'nav.admin', end: false, adminOnly: true },
+ { to: '/settings', key: 'nav.settings', end: false, adminOnly: false },
]
-const FOOT: Item[] = [
- { to: '/settings', key: 'nav.settings', icon: Settings },
- { to: '/admin', key: 'nav.admin', icon: ShieldCheck, adminOnly: true },
-]
-
-const KEY = 'sonda.sidebar'
-
-/** Whether this device folded the menu: a choice of the device, like the theme, kept in its storage. */
-function useCollapsed(): [boolean, (collapsed: boolean) => void] {
- const [collapsed, set] = useState(() => {
- try {
- return localStorage.getItem(KEY) === 'collapsed'
- } catch {
- return false
- }
- })
- return [
- collapsed,
- (value) => {
- set(value)
- try {
- localStorage.setItem(KEY, value ? 'collapsed' : 'open')
- } catch {
- // The choice still applies for this page view.
- }
- },
- ]
-}
-
-function Row({ item, collapsed }: { item: Item; collapsed: boolean }) {
- const { t } = useTranslation()
- const Icon = item.icon
- return (
-
-
- cn(
- 'flex min-h-10 items-center gap-3 rounded-lg px-3 font-medium focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',
- collapsed && 'justify-center px-0',
- isActive ? 'bg-card font-bold text-foreground' : 'text-muted-foreground hover:text-foreground',
- )
- }
- >
- {({ isActive }) => (
- <>
-
- {t(item.key)}
- >
- )}
-
-
- )
-}
-
-/**
- * The main menu: an icon and a word for each page, in groups. The icon of the page that is open is the colour of this
- * server; the icon of Friends is the colour of what comes from elsewhere, always, so that the one page that shows other
- * people's music is told apart before it is opened. Space tells the groups apart; the two that need a name have a quiet one. On a
- * phone the links are left to the bar of tabs (PhoneTabs).
- */
export default function Sidebar() {
const { t } = useTranslation()
const { user } = useSession()
- const [collapsed, setCollapsed] = useCollapsed()
- // Friends is in the menu only when there is a friend to browse (federation on, and a friendship both admins agreed to).
- const hasFriends = (useFriends().data?.length ?? 0) > 0
- const shown = (item: Item) => (!item.adminOnly || user?.is_admin) && (!item.friends || hasFriends)
- const groups = GROUPS.map((g) => ({ ...g, items: g.items.filter(shown) })).filter((g) => g.items.length > 0)
- const foot = FOOT.filter(shown)
-
- const Toggle = collapsed ? PanelLeftOpen : PanelLeftClose
-
+ const links = LINKS.filter((link) => !link.adminOnly || user?.is_admin)
return (
-
-
-
setCollapsed(!collapsed)}
- className="flex size-10 items-center justify-center rounded-lg text-muted-foreground hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring max-sm:hidden"
- >
-
-
+
+
+
+
+
+
+ {t('app.name')}
- {/* On a phone the links are the bar of tabs at the bottom; only the logo stays on top. */}
-
- {groups.map((group) => (
-
- {group.heading && (
-
- {t(group.heading)}
-
- )}
-
- {group.items.map((item) => (
-
- ))}
-
-
+
+ {links.map((link) => (
+
+
+ cn(
+ 'flex min-h-11 items-center rounded-lg px-3 font-semibold',
+ isActive ? 'bg-secondary text-foreground' : 'text-muted-foreground hover:text-foreground',
+ )
+ }
+ >
+ {t(link.key)}
+
+
))}
-
- {foot.map((item) => (
-
- ))}
-
-
- {!collapsed && (
-
- )}
+
+
+ {t('app.privacy')}
+
)
}
diff --git a/web/src/components/layout/useBackClosesPlayer.test.tsx b/web/src/components/layout/useBackClosesPlayer.test.tsx
deleted file mode 100644
index 1a4529c..0000000
--- a/web/src/components/layout/useBackClosesPlayer.test.tsx
+++ /dev/null
@@ -1,81 +0,0 @@
-import { act, render } from '@testing-library/react'
-import { useEffect } from 'react'
-import { MemoryRouter, useLocation, useNavigate, type Location, type NavigateFunction } from 'react-router-dom'
-import { beforeEach, expect, test } from 'vitest'
-import { useNowPlayingUi } from '@/player/ui'
-import { useBackClosesPlayer } from './useBackClosesPlayer'
-
-const seen = {} as { where: Location; go: NavigateFunction }
-
-function Probe() {
- useBackClosesPlayer()
- const where = useLocation()
- const go = useNavigate()
- useEffect(() => {
- seen.where = where
- seen.go = go
- })
- return null
-}
-
-function mount(initial: Parameters
[0]['initialEntries'] = ['/albums/1']) {
- render(
-
-
- ,
- )
-}
-
-beforeEach(() => useNowPlayingUi.setState({ open: false }))
-
-test('opening the full-screen player adds a place in the history, on the same page', () => {
- mount()
- act(() => useNowPlayingUi.getState().setOpen(true))
- expect(seen.where.pathname).toBe('/albums/1')
- expect(seen.where.state).toEqual({ player: true })
- expect(useNowPlayingUi.getState().open).toBe(true)
-})
-
-test('back closes the full-screen player and stays on the page', () => {
- mount()
- act(() => useNowPlayingUi.getState().setOpen(true))
- act(() => void seen.go(-1))
- expect(useNowPlayingUi.getState().open).toBe(false)
- expect(seen.where.pathname).toBe('/albums/1')
- expect(seen.where.state).toBeNull()
-})
-
-test('closing the player with its own button takes the place out of the history again', () => {
- mount()
- act(() => useNowPlayingUi.getState().setOpen(true))
- act(() => useNowPlayingUi.getState().setOpen(false))
- expect(seen.where.state).toBeNull()
- expect(seen.where.pathname).toBe('/albums/1')
- // One more back leaves the page, it does not land on a ghost of the player.
- act(() => void seen.go(-1))
- expect(useNowPlayingUi.getState().open).toBe(false)
-})
-
-test('following a link while the player is open closes it and goes there', () => {
- mount()
- act(() => useNowPlayingUi.getState().setOpen(true))
- act(() => void seen.go('/artists/5'))
- expect(useNowPlayingUi.getState().open).toBe(false)
- expect(seen.where.pathname).toBe('/artists/5')
-})
-
-test('a reload on the player place does not open it, and does not leave a ghost in the history', () => {
- mount([{ pathname: '/albums/1', state: { player: true } }])
- expect(useNowPlayingUi.getState().open).toBe(false)
- expect(seen.where.pathname).toBe('/albums/1')
- expect(seen.where.state).toBeNull()
-})
-
-test('the player can be opened again after it was closed by back', () => {
- mount()
- act(() => useNowPlayingUi.getState().setOpen(true))
- act(() => void seen.go(-1))
- act(() => useNowPlayingUi.getState().setOpen(true))
- expect(useNowPlayingUi.getState().open).toBe(true)
- expect(seen.where.state).toEqual({ player: true })
-})
diff --git a/web/src/components/layout/useBackClosesPlayer.ts b/web/src/components/layout/useBackClosesPlayer.ts
deleted file mode 100644
index 98ac116..0000000
--- a/web/src/components/layout/useBackClosesPlayer.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import { useEffect, useRef } from 'react'
-import { useLocation, useNavigate } from 'react-router-dom'
-import { useNowPlayingUi } from '@/player/ui'
-
-/**
- * Makes the back button (on a phone, the back gesture) close the full-screen player instead of leaving the page under it.
- *
- * Opening the player adds one place to the history, on the same page, marked in the state of the location. Back then
- * only takes that place away, and this closes the player. Closing it with its own button takes the place out again, and
- * following a link inside it closes it. A place with the mark that nobody opened (a reload, or back from the page that was
- * opened from the player) is cleaned in place: the player never opens by itself.
- */
-export function useBackClosesPlayer() {
- const open = useNowPlayingUi((s) => s.open)
- const setOpen = useNowPlayingUi((s) => s.setOpen)
- const location = useLocation()
- const navigate = useNavigate()
- const marked = (location.state as { player?: boolean } | null)?.player === true
- // True from the moment this hook added the place until it is gone.
- const added = useRef(false)
-
- useEffect(() => {
- if (!open && !marked) {
- added.current = false
- } else if (open && !marked && !added.current) {
- added.current = true
- navigate(location, { state: { player: true } })
- } else if (open && !marked) {
- // The place is gone and the player is still open: back, or a link, took us away.
- added.current = false
- setOpen(false)
- } else if (!open && marked) {
- if (added.current) {
- added.current = false
- navigate(-1)
- } else {
- navigate(location, { replace: true, state: null })
- }
- }
- }, [open, marked, location, navigate, setOpen])
-}
diff --git a/web/src/components/logoPaths.ts b/web/src/components/logoPaths.ts
deleted file mode 100644
index 44ec563..0000000
--- a/web/src/components/logoPaths.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-// The paths of the logo, traced from the artwork of the logo ("sONDA": a lowercase s, then ONDA, whose O is a sea wave).
-// They are drawn once here so that the logo takes the colours of the theme in use: the s is the text colour and
-// the rest is the accent colour.
-
-/** The lowercase "s" of the wordmark. */
-export const WORD_S = 'M 1374.7 39.7 C 1373.8 40.6, 1373.9 45.2, 1374.8 46.8 C 1375.4 47.7, 1376.2 47.2, 1377.8 45.1 C 1379.7 42.5, 1380.4 42.2, 1383.4 42.7 C 1387.8 43.4, 1395.5 41.1, 1392.5 39.9 C 1390 39, 1375.6 38.8, 1374.7 39.7 M 1374.2 115.9 C 1373.5 117.8, 1373 123.2, 1373 128 C 1373 137.8, 1374.8 145.5, 1376.1 141 C 1376.5 139.6, 1376.8 133.8, 1376.8 128 C 1376.8 114.8, 1376 110.9, 1374.2 115.9 M 2211 148 C 2207 148.5, 2207 149.8, 2211 149.9 C 2211.8 149.9, 2215 150.2, 2218.1 150.6 C 2224.8 151.4, 2233.6 149.2, 2229 147.9 C 2226 147, 2217.1 147.1, 2211 148 M 219 159.5 C 205.6 160.8, 189.2 163.7, 179.5 166.6 C 154.5 174, 147.4 176.6, 129 185.3 C 86.5 205.4, 57.8 241.8, 46.8 289.5 C 42 310.2, 44.1 358.1, 50.4 374 C 54.3 383.8, 57.6 390.9, 60.8 396.4 C 86.5 440.5, 134.8 468.3, 230.3 493.9 C 293 510.7, 311.4 517.9, 331.3 533.7 C 344.4 544.2, 348.7 557.6, 345 577.1 C 340.1 602.9, 307.1 619.8, 262.8 619.2 C 204.7 618.5, 148.5 602.4, 99 572.3 C 80.6 561.1, 80.1 560.8, 78.2 561.4 C 77.1 561.8, 72.7 569.9, 66 584.2 C 60.3 596.5, 51.6 614.8, 46.7 625 C 24.1 671.9, 24.9 666.5, 39.5 674.3 C 75.7 693.6, 133.3 714.3, 165.5 719.5 C 167.7 719.9, 174 721, 179.5 722 C 228.2 731, 301.5 729.1, 341.5 717.8 C 383.5 705.9, 407.5 692.7, 432 668.1 C 460.8 639.1, 472.3 607.7, 472.4 557.5 C 472.5 514.1, 464.3 488.7, 441.6 462 C 422.4 439.3, 379.5 414.1, 339 401.6 C 336 400.6, 331.9 399.3, 330 398.5 C 328.1 397.8, 322.4 396, 317.5 394.5 C 312.6 393, 306 391, 303 390 C 300 389, 293.9 387.2, 289.5 386 C 285.1 384.7, 278.8 382.9, 275.5 382 C 272.2 381, 266.1 379.2, 262 378 C 257.9 376.8, 252 375, 249 374 C 246 373, 239.9 371, 235.5 369.6 C 191.6 355.7, 173 340.8, 173 319.8 C 173 313.4, 176 301.9, 179.1 296.3 C 203.3 253.6, 320.6 261.3, 395.5 310.4 C 408.8 319.2, 408.8 319.2, 414.3 306.5 C 416.2 302.1, 420.5 292.9, 423.8 286 C 431.9 269, 441 249.4, 446 238 C 448.3 232.8, 451.7 225.3, 453.6 221.3 C 457.9 212.4, 457.6 211.6, 448 205.4 C 441.1 201, 420.7 190.2, 415.3 188.2 C 413.8 187.6, 409.1 185.7, 405 184 C 393.7 179.3, 383 175.9, 361 170.2 C 353.5 168.2, 339.8 165.4, 324 162.5 C 300.6 158.3, 247.9 156.8, 219 159.5 M 999.7 362.6 C 999.3 363, 999 365.2, 999 367.5 C 999 376.8, 995.8 380, 986.7 380 C 981 380, 983.5 382.6, 990.1 383.5 C 999.6 384.8, 1007.5 377.8, 1005.1 370 C 1003.8 365.6, 1000.8 361.5, 999.7 362.6 M 1373.7 427.9 C 1372.1 435.8, 1373.4 446.9, 1375.7 444.7 C 1377.1 443.2, 1377.2 431.6, 1375.8 428 L 1374.4 424.5 1373.7 427.9 M 1074.6 440.6 C 1074.3 441.5, 1074 444.6, 1074 447.7 C 1074 454.7, 1071.8 459.2, 1065.4 465.5 C 1054.8 475.9, 1051 477, 1042.8 472 C 1041 470.9, 1038.7 470, 1037.8 470 C 1031.8 470, 1020.5 456.1, 1018.8 446.5 C 1018.6 445.4, 1018.1 447.1, 1017.7 450.4 C 1016.6 458.8, 1022.8 468.2, 1032.8 473.4 C 1037 475.6, 1049.1 477.8, 1052 476.9 C 1053.4 476.5, 1056.1 475.9, 1058.2 475.6 C 1066.4 474.2, 1076.1 463.3, 1078 453 C 1079.4 445.8, 1076.6 435.5, 1074.6 440.6 M 1374.1 643.1 C 1373.4 645.2, 1373 658.2, 1373 681.7 L 1373 717.1 1375.8 716.8 C 1378.1 716.6, 1378.4 716.1, 1378.1 714 C 1377.9 712.6, 1377.5 695.7, 1377.1 676.3 C 1376.5 640.9, 1376.2 637.2, 1374.1 643.1 M 2706.2 642.5 C 2705.5 643.9, 2705 645.6, 2705 646.3 C 2705 646.9, 2703.4 650.6, 2701.6 654.5 C 2699.7 658.3, 2696.1 667.6, 2693.6 675 C 2688.5 690.1, 2681.8 707.1, 2679.5 710.6 C 2676 716, 2678 718.3, 2685.1 716.9 C 2687.5 716.5, 2689.9 716.1, 2690.3 716 C 2690.8 716, 2690 714.6, 2688.6 712.9 C 2685.7 709.5, 2685.3 706, 2687.5 702.2 C 2690.3 697.1, 2694 687.1, 2694 684.6 C 2694 683.2, 2694.4 681.9, 2694.9 681.5 C 2695.4 681.2, 2696.2 679.5, 2696.5 677.7 C 2696.9 676, 2698.3 672.5, 2699.6 670 C 2700.9 667.5, 2702 664.4, 2702 663 C 2702.1 659.5, 2705.4 650.4, 2707.3 648.2 C 2709 646.3, 2709.7 640, 2708.2 640 C 2707.7 640, 2706.8 641.1, 2706.2 642.5 M 1493.4 706.2 C 1490.3 709.6, 1486.9 716, 1487.5 717.1 C 1488.4 718.4, 1495.4 718.2, 1496.8 716.8 C 1498.3 715.3, 1498.3 710.3, 1496.7 706.7 L 1495.5 703.8 1493.4 706.2 M 870 724 C 864.8 725.2, 871.3 726.2, 888.5 726.6 C 905.6 727.1, 910.6 726.4, 907 724 C 905.4 722.9, 874.5 722.9, 870 724'
-
-/** "ONDA" of the wordmark, the O with its wave included. */
-export const WORD_ONDA = 'M 868 25 C 813.5 31, 762.8 46, 725.5 67.2 C 723.3 68.5, 717.3 71.9, 712 74.9 C 703.9 79.5, 694.3 85.9, 681.1 95.6 C 658.5 112, 628.2 142, 611.4 164.6 C 591.9 190.7, 574.9 219.8, 567.5 239.8 C 566.8 241.8, 565.2 246, 564 249 C 557.8 265, 553.2 279.7, 551.9 288 C 551.5 291, 550.4 296.4, 549.6 300 C 548.7 303.6, 548 308.5, 548 311 C 548 313.5, 547.3 318.7, 546.4 322.5 C 544.3 331.5, 543.2 396.8, 544.9 413 C 548.2 445.4, 551.4 462.6, 559.4 491.1 C 572.2 536.7, 613 601.2, 650.4 635.2 C 681.5 663.4, 723.9 690.1, 759.5 704 C 765.5 706.3, 772.6 709.1, 775.2 710.1 C 777.8 711.2, 780.5 712, 781.2 712 C 781.9 712, 784.7 712.9, 787.5 713.9 C 790.2 715, 796.1 716.8, 800.5 717.9 C 804.9 719, 812.2 720.8, 816.6 721.9 C 821.1 723.1, 826.2 724, 828 724 C 829.8 724, 833.8 724.7, 836.9 725.5 C 840 726.3, 847.9 727.2, 854.5 727.5 C 861.1 727.8, 871.2 728.5, 877 729.1 C 932.8 734.9, 1010.5 722.2, 1058.5 699.5 C 1154.9 653.8, 1222.4 574.9, 1248.3 477.5 C 1272.7 386.3, 1259.7 277.2, 1215.1 197.7 C 1174.1 124.5, 1101.8 65.9, 1023 42 C 1018.9 40.8, 1013.7 39.2, 1011.5 38.4 C 999.9 34.6, 968 28, 960.5 28 C 957.8 27.9, 952.8 27.2, 949.5 26.4 C 942.6 24.6, 881.2 23.5, 868 25 M 3000.4 36 C 2954.8 36.6, 2949.2 37, 2950.5 39 C 2951.4 40.5, 2948.9 41.3, 2943.1 41.5 C 2940 41.6, 2936.5 42.1, 2935.2 42.5 C 2933.3 43.1, 2933 42.9, 2933 40.6 C 2933 39.2, 2932.6 38, 2932.1 38 C 2929.6 38, 2926.7 43.4, 2920.5 60 C 2918.5 65.2, 2916 71.8, 2915 74.5 C 2913.9 77.3, 2913 80.1, 2913 80.9 C 2913 81.6, 2912.1 83.9, 2911 85.9 C 2909.9 87.9, 2907.7 93.5, 2906.1 98.5 C 2904.4 103.5, 2901.5 111.3, 2899.6 116 C 2896.2 124.3, 2891.8 135.7, 2884 156.2 C 2881.9 161.9, 2876.5 175.7, 2872.1 187 C 2858.4 222.1, 2857 225.9, 2857 228.3 C 2857 229.5, 2856.4 231.4, 2855.6 232.5 C 2854.4 234.3, 2850.9 242.9, 2845.7 257 C 2844.6 260, 2842.9 264.6, 2841.9 267.2 C 2840.8 269.8, 2840 272.7, 2840 273.7 C 2840 274.8, 2839.6 276, 2839 276.6 C 2838.1 277.5, 2833.9 288.9, 2827 309 C 2825.2 314.2, 2823.4 319.2, 2823 320.1 C 2822.6 320.9, 2819.8 327.7, 2816.9 335.1 C 2814 342.5, 2808.4 356.8, 2804.4 367 C 2796.3 387.5, 2794.4 392.9, 2792.9 398 C 2792 401.2, 2786.8 414.9, 2781.9 427.2 C 2780.8 429.8, 2780 432.3, 2780 432.9 C 2780 433.9, 2774.8 447.7, 2766.3 469 C 2763.7 475.3, 2761.3 482.1, 2760.9 484 C 2760.5 485.9, 2759.3 489.8, 2758.1 492.5 C 2753.7 503.3, 2747.1 520.8, 2745.5 526 C 2744.6 529, 2743.4 532.4, 2742.8 533.4 C 2742.3 534.4, 2741 537.6, 2740 540.4 C 2739.1 543.2, 2736.6 550, 2734.6 555.5 C 2730.6 566, 2723.8 585.4, 2721.3 593 C 2720.5 595.5, 2719.4 598.3, 2718.8 599.4 C 2717.5 601.9, 2715.2 608.4, 2713.5 614.5 C 2712.8 617.2, 2710.5 623.3, 2708.6 628 C 2704.4 637.8, 2704 641.1, 2707 640.3 C 2709.6 639.6, 2709.8 645.4, 2707.3 648.2 C 2705.4 650.4, 2702.1 659.5, 2702 663 C 2702 664.4, 2700.9 667.5, 2699.6 670 C 2698.3 672.5, 2696.9 676, 2696.5 677.7 C 2696.2 679.5, 2695.4 681.2, 2694.9 681.5 C 2694.4 681.9, 2694 683.2, 2694 684.6 C 2694 687.1, 2690.3 697.1, 2687.5 702.2 C 2683.6 709.1, 2687.4 715, 2695.5 715 C 2698.5 715, 2701.2 715.5, 2701.5 716 C 2701.9 716.6, 2699.7 717, 2695.6 717 C 2692 717, 2688.9 717.4, 2688.6 717.9 C 2687.9 719, 2752 720.3, 2784.3 719.8 L 2808.2 719.5 2810.4 716.9 C 2811.6 715.5, 2813.4 711.7, 2814.4 708.4 C 2815.3 705.2, 2816.6 701.6, 2817.2 700.6 C 2817.7 699.6, 2819 696.4, 2820 693.6 C 2822.4 686.6, 2828.6 668.9, 2836 648 C 2839.4 638.4, 2844.3 624.4, 2846.9 616.9 C 2849.4 609.3, 2852.4 602.3, 2853.4 601.1 L 2855.3 599 2999.6 599.2 C 3142.5 599.5, 3144 599.5, 3145.9 601.5 C 3146.9 602.6, 3149.1 607.5, 3150.8 612.5 C 3152.5 617.5, 3155.9 627.4, 3158.5 634.5 C 3161 641.6, 3163.5 649.1, 3164 651 C 3164.5 652.9, 3165.8 656.3, 3167 658.5 C 3168.1 660.6, 3169 663, 3169 663.8 C 3169 664.5, 3169.6 666.1, 3170.2 667.3 C 3170.9 668.5, 3172 671.8, 3172.6 674.5 C 3173.2 677.2, 3174.3 681.1, 3175 683 C 3179.7 696.3, 3183.7 708.8, 3184.5 712.7 C 3186 720.3, 3183 720, 3250.6 720 C 3283.7 720, 3311.5 719.7, 3312.4 719.4 C 3313.2 719.1, 3314.2 717, 3314.5 714.6 C 3315.5 708, 3316.4 707.1, 3319.4 709.9 C 3320.8 711.3, 3322.2 712.1, 3322.5 711.8 C 3323.1 711.2, 3315.9 689.7, 3310 675 C 3307.7 669.2, 3305 662.2, 3304 659.5 C 3303 656.8, 3300.3 649.8, 3298 644 C 3295.7 638.2, 3292.2 629.5, 3290.3 624.6 C 3288.4 619.7, 3286.3 614.5, 3285.6 613.1 C 3284.8 611.7, 3282.9 606.5, 3281.2 601.5 C 3275.6 584.9, 3264 552.9, 3258 537.5 C 3255.7 531.5, 3252.2 522.5, 3250.4 517.5 C 3248.5 512.5, 3245.6 505.4, 3244 501.5 C 3238.5 488.1, 3233.7 475.8, 3226 455 C 3223.9 449.2, 3221.2 442, 3220 439 C 3218.8 436, 3216.8 430.6, 3215.5 427 C 3214.3 423.4, 3211.3 415.3, 3209 409 C 3202.8 391.9, 3194 367.1, 3192.5 362.5 C 3191.2 358.5, 3178.5 325.3, 3169.6 302.5 C 3160.7 280, 3151 254.3, 3145 238 C 3142.9 232.2, 3139.5 223, 3137.5 217.5 C 3133.6 206.9, 3128.6 193.2, 3121.6 173.5 C 3115.3 156.1, 3102.7 122.2, 3098 110 C 3092.9 97, 3085.8 77.4, 3081.9 65.5 C 3075.2 45.1, 3072.5 39.8, 3070.4 43.1 C 3069.4 44.8, 3067 42, 3067 39 C 3067 35.4, 3065.6 35, 3056.2 35.2 C 3052 35.3, 3026.9 35.6, 3000.4 36 M 1402.7 36.7 C 1396.1 36.9, 1392.2 37.4, 1392.5 38 C 1392.8 38.6, 1394.7 39, 1396.6 39 C 1405.9 39, 1395.1 42.1, 1384.5 42.4 C 1380.1 42.6, 1379.3 43, 1377.4 45.8 L 1375.2 49 1374 46 C 1373.3 44.4, 1373 41.8, 1373.3 40.4 C 1373.7 38.1, 1373.6 38, 1372.3 39.3 C 1371.2 40.4, 1370.6 45, 1369.9 57.1 C 1368.7 77.2, 1369.6 639, 1370.7 643.9 L 1371.5 647.3 1373.4 643.2 C 1374.5 640.9, 1375.6 639.2, 1375.9 639.6 C 1376.2 639.9, 1376.8 656.4, 1377.2 676.3 C 1377.6 696.2, 1378 714, 1378.1 715.8 L 1378.3 719 1411.4 719.1 C 1467.9 719.2, 1484.5 718.9, 1484.9 717.9 C 1485 717.3, 1486 716.1, 1487 715.2 C 1487.9 714.3, 1489.4 712.1, 1490.3 710.4 C 1491.2 708.7, 1492.6 706.8, 1493.4 706.1 C 1494.6 705.1, 1495 702.9, 1495 698.4 C 1495 694.8, 1495.4 692, 1496 692 C 1496.6 692, 1497 694.8, 1497 698.5 C 1497 702.1, 1497.4 705, 1497.8 705 C 1499.5 705, 1500.1 626.8, 1499.9 450 C 1499.8 324.2, 1500 270.6, 1500.8 269.8 C 1502.5 268.1, 1503.6 269.4, 1517.9 290.9 C 1530.8 310.2, 1548.5 336.5, 1557 349 C 1559.1 352, 1564.6 360.4, 1569.2 367.5 C 1583.1 388.8, 1606.2 423.9, 1623.5 450 C 1632.4 463.5, 1641 476.8, 1642.6 479.5 C 1645.5 484.5, 1655.8 500, 1681.5 538 C 1694.9 557.8, 1699.7 565, 1711.6 582.1 C 1714.6 586.5, 1721.2 596.3, 1726.2 603.8 C 1731.1 611.3, 1738 621.5, 1741.3 626.5 C 1757.7 650.7, 1788.5 696.9, 1792.5 703.4 C 1796.2 709.4, 1802.2 717, 1804.3 718.5 C 1806.6 720.1, 1911.3 720.8, 1913.5 719.2 C 1914.1 718.8, 1915.1 717.3, 1915.7 715.8 C 1917.2 712.5, 1919.6 712.1, 1920.5 715 C 1921.2 717.2, 1923 717.7, 1923 715.8 C 1923.7 686, 1923 40.8, 1922.3 39.6 C 1921.4 38, 1921.2 38.2, 1920.7 41 C 1919.9 44.9, 1917.6 44.5, 1917.2 40.4 C 1917 38.8, 1916.3 37.2, 1915.7 36.8 C 1912.9 35, 1817 36.4, 1817 38.2 C 1817 38.6, 1820 39, 1823.7 39 C 1828.1 39, 1830.1 39.3, 1829.4 40 C 1828.9 40.5, 1822.8 41, 1816 41.1 C 1809 41.2, 1802.8 41.7, 1801.8 42.3 C 1800.9 42.9, 1799.8 43.1, 1799.4 42.7 C 1798.2 41.6, 1801.1 39, 1803.6 39 C 1804.9 39, 1806 38.5, 1806 38 C 1806 36.4, 1798.4 36.8, 1797 38.5 C 1795.6 40.2, 1794.9 425.5, 1796.3 437.5 C 1796.8 441.4, 1797.7 445.5, 1798.3 446.8 C 1799.2 448.6, 1799.1 449.6, 1798 451.3 C 1797 452.8, 1796.4 457.8, 1796 467 C 1795.3 486.4, 1794.1 485.9, 1775.4 458.4 C 1770.5 451.2, 1762.4 439.5, 1757.4 432.4 C 1748.5 419.9, 1736.4 401.5, 1717 371.3 C 1694.4 335.9, 1665.1 291.4, 1644.5 261 C 1624 230.8, 1607.6 206.2, 1600.5 195 C 1591.6 180.7, 1586.9 173.5, 1576 156.5 C 1571.7 149.9, 1565.6 140.3, 1562.4 135.2 C 1544.7 107.3, 1508.8 54.3, 1505.6 51.4 C 1504.3 50.2, 1502.9 48.3, 1502.5 47.1 C 1501.5 43.9, 1497.1 39, 1495.2 39 C 1494.2 39, 1492.6 38.3, 1491.6 37.5 C 1489.7 36, 1439.7 35.6, 1402.7 36.7 M 2095.4 36.7 C 2078.2 37, 2075 37.3, 2073.9 38.7 C 2072.7 40, 2072.5 95.1, 2072.6 377.8 L 2072.8 715.4 2074.9 717.1 C 2078.6 720.1, 2081.4 720.1, 2217 719.7 C 2355.4 719.3, 2369.9 718.9, 2387.9 714 C 2389.9 713.5, 2394.9 712.6, 2399 712 C 2403.1 711.4, 2413.7 709.1, 2422.4 707 C 2536.7 678.3, 2617.7 599.4, 2647.9 487.1 C 2662.2 434.4, 2664.5 344.6, 2653 289.5 C 2634.5 200.2, 2597.1 142.3, 2526 92.9 C 2495.4 71.6, 2446.3 51.8, 2403.5 43.4 C 2399.1 42.5, 2393.5 41.4, 2391 40.9 C 2388.5 40.3, 2384.7 40.2, 2382.5 40.5 C 2380.2 40.8, 2375.9 40.4, 2372.5 39.5 C 2369.2 38.6, 2362.3 37.5, 2357 37 C 2348.6 36.2, 2148.4 36, 2095.4 36.7 M 1798 128 C 1798 160, 1798.3 177, 1799 177 C 1799.7 177, 1800 160, 1800 128 C 1800 96, 1799.7 79, 1799 79 C 1798.3 79, 1798 96, 1798 128 M 1374.2 115.4 C 1372.5 119.1, 1372.7 137.8, 1374.4 140.9 L 1375.7 143.2 1376.4 140 C 1377.2 135.9, 1377 118.3, 1376.1 115.1 L 1375.5 112.7 1374.2 115.4 M 873.9 144.1 C 797.6 150.4, 725.7 199.4, 696 265.5 C 676.9 307.9, 667.7 377.3, 675.6 418.8 C 676.5 423.3, 679.8 421.5, 682.8 414.8 C 684.4 411.3, 686.4 407.9, 687.3 407.2 C 688.2 406.4, 689.4 404.2, 690.1 402.2 C 691.9 396.4, 705.1 377, 707.1 377 C 707.6 377, 708 377.7, 708 378.5 C 708 380.9, 709.9 380.3, 711.8 377.2 C 712.7 375.7, 716.4 371.4, 720 367.7 C 729.7 357.4, 732.8 352.6, 729.9 352.2 C 728 351.9, 728.4 351.1, 734.1 345.4 C 740.9 338.5, 742 337.9, 742 341 C 742 343.9, 744.8 342.5, 753.6 335 C 761 328.7, 762.1 326.4, 756.1 329.4 C 749.3 333, 752.3 329, 761.5 322.5 C 779.5 309.7, 813 295.5, 833.5 292.1 C 857.4 288, 859.7 287.8, 875.5 288.3 C 890.8 288.7, 903.7 291.3, 897.8 292.7 C 895.1 293.4, 895.7 295, 898.5 295 C 899.9 295, 901.3 294.3, 901.6 293.5 C 904 287.2, 946.4 302.9, 965.8 317.2 C 980.6 328.2, 988.8 336.7, 998.5 351.2 C 1003.4 358.5, 1004.1 361.5, 1001 362.3 C 999.4 362.7, 999 363.7, 999 367.3 C 999 376.8, 995.9 380, 986.8 380 C 978.3 380, 984.4 383.6, 993.3 383.9 C 998.1 384, 997.8 386.1, 992.8 387.4 C 988.8 388.4, 982.8 385.9, 970 378 C 954.2 368.2, 947.7 366.1, 932.5 366 C 852.2 365.8, 812.9 457.7, 865.7 522.2 C 909.3 575.6, 993.5 588.8, 1050.7 551.4 C 1081.4 531.3, 1100.1 509.1, 1112.3 478.5 C 1115.6 470.2, 1117 465.9, 1122.1 448 C 1124.3 440.3, 1127.1 424.5, 1127.5 417.5 C 1130.4 361.5, 1127.8 332.9, 1116 290.5 C 1106.4 256.2, 1075.5 211.1, 1046.9 189.5 C 1033.9 179.7, 1001.4 161, 997.5 161 C 996.3 161, 978.4 153.7, 977.5 152.9 C 977 152.4, 975.5 152, 974 152 C 972.6 152, 968.4 151.1, 964.5 150.1 C 941.6 143.8, 905.7 141.4, 873.9 144.1 M 2211.2 147.7 C 2206.3 148.2, 2205.5 150, 2210.2 150 C 2212 150.1, 2214.6 150.7, 2215.9 151.4 C 2218.3 152.7, 2218.1 152.8, 2212.9 153.5 C 2209.9 153.9, 2206.7 154.9, 2205.8 155.8 C 2202.8 158.3, 2203.1 597.2, 2206 599.3 C 2208.3 600.9, 2329.9 600.7, 2345.6 599.1 C 2374.3 596, 2374.3 596, 2395.5 589.8 C 2442.6 575.9, 2481.3 544.2, 2502.3 502.4 C 2506.4 494.3, 2508.2 489.9, 2513.9 474.5 C 2519.3 460.1, 2523.5 443.7, 2524.5 433.5 C 2524.9 429.6, 2525.8 423.6, 2526.6 420 C 2528.7 410.4, 2528 340.6, 2525.6 326.5 C 2524.7 321, 2524.2 315.5, 2524.5 314.2 C 2524.8 312.9, 2524 308.7, 2522.5 304.5 C 2521.1 300.5, 2520 296.5, 2520 295.7 C 2520 294.8, 2518.4 289.3, 2516.4 283.3 C 2493.8 214.3, 2441.8 172.4, 2361.5 158.5 C 2345.7 155.8, 2312.8 154.4, 2255.5 153.9 C 2242.8 153.8, 2230.5 153.5, 2228.1 153.2 L 2223.7 152.7 2227.5 150.8 C 2230.9 149, 2231.8 148.9, 2235.1 150 C 2238.5 151.2, 2246.2 149.8, 2244.7 148.4 C 2244.1 147.8, 2216.2 147.3, 2211.2 147.7 M 2996.5 204.2 C 2996.3 204.9, 2994.8 210, 2993.2 215.5 C 2990.1 225.8, 2988.2 231.1, 2976 263.5 C 2972.1 273.9, 2966.5 289, 2963.5 297 C 2960.5 305, 2956.6 315.6, 2954.7 320.6 C 2952.8 325.6, 2950.1 333, 2948.7 337.1 C 2947.3 341.2, 2945 347.6, 2943.5 351.5 C 2939.9 361.5, 2928.2 394.8, 2914.6 434 C 2907.2 455.3, 2903.9 464.2, 2898.4 477.3 C 2893.7 488.6, 2882.8 487.5, 2997.8 487.8 C 3087.8 488, 3098 487.9, 3099.4 486.4 C 3101.6 484.3, 3101.4 481.9, 3098.6 475.2 C 3097.3 472.1, 3095.1 466.1, 3093.6 462 C 3092.2 457.9, 3089.9 451.4, 3088.4 447.5 C 3085.1 438.5, 3074.3 406.9, 3072.5 401 C 3070.7 395, 3066.5 383.6, 3065.6 382.1 C 3064.4 380.2, 3049.6 338.4, 3038.5 305.5 C 3035.3 296.2, 3030.4 282.8, 3024.3 267 C 3023 263.4, 3021 258.2, 3020 255.5 C 3019 252.8, 3017.2 248, 3016 245 C 3009.9 229.1, 3004.2 212.9, 3003.6 209.4 C 3002.7 204.7, 3001.4 203, 2998.8 203 C 2997.8 203, 2996.8 203.6, 2996.5 204.2 M 1035.3 414 C 1022.8 420.3, 1009.8 443.8, 1013.9 452.6 C 1015.5 456.3, 1016.9 454.6, 1017.7 448.1 C 1018 445.3, 1018.7 442.7, 1019.1 442.4 C 1019.6 442.1, 1019.7 443.2, 1019.4 444.9 C 1018.2 450.9, 1021.5 457.5, 1029.1 464 C 1032.9 467.3, 1036.8 470, 1037.8 470 C 1038.7 470, 1041 470.9, 1042.8 472 C 1051 477, 1054.8 475.9, 1065.4 465.5 C 1071.8 459.2, 1074 454.7, 1074 447.7 C 1074 436, 1077.7 437.1, 1080.3 449.5 C 1080.6 450.6, 1080.8 449, 1080.9 445.9 C 1081.1 437.1, 1078.8 431.2, 1072.4 424.1 C 1064.2 415.1, 1054.2 410.6, 1051 414.5 C 1049.4 416.4, 1047.3 416.4, 1046.3 414.5 C 1044.8 411.9, 1039.9 411.7, 1035.3 414 M 1373.7 425.4 C 1372.7 432.3, 1372.9 443.2, 1374 445 C 1376.7 449.4, 1377.6 435.6, 1375.3 424.5 L 1374.4 420.5 1373.7 425.4 M 1385 716 C 1385 716.6, 1391 717, 1401.1 717 C 1411.5 717, 1416.9 716.7, 1416.5 716 C 1416.1 715.4, 1409.7 715, 1400.4 715 C 1390.8 715, 1385 715.4, 1385 716 M 866.5 723.8 C 847.5 724.8, 869.3 727.5, 892.5 727.1 C 906.2 726.9, 910.1 726, 907 723.9 C 905.6 723, 882.9 723, 866.5 723.8'
-
-/** The O alone, the symbol of the logo. */
-export const MARK = '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'
-
-/** The boxes the paths are drawn in. */
-export const WORD_BOX = '9 4.3 3333.5 746.2'
-export const MARK_BOX = '56.1 4.3 756.1 746.2'
diff --git a/web/src/components/milkdropLib.test.ts b/web/src/components/milkdropLib.test.ts
deleted file mode 100644
index 15df1ca..0000000
--- a/web/src/components/milkdropLib.test.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { expect, test } from 'vitest'
-import { holderOf } from './milkdropLib'
-
-const create = () => 'made'
-
-test('it finds the library whether it is the module, its default, or the default of its default', () => {
- const lib = { createVisualizer: create }
- expect(holderOf({ ...lib }, 'createVisualizer')).toMatchObject(lib)
- expect(holderOf({ default: lib }, 'createVisualizer')).toBe(lib)
- expect(holderOf({ default: { default: lib } }, 'createVisualizer')).toBe(lib)
-})
-
-test('a class with static functions is found too, and is the thing to call them on', () => {
- class Engine {
- static createVisualizer() {
- return this === Engine
- }
- }
- const holder = holderOf({ default: { __esModule: true, default: Engine } }, 'createVisualizer')
- expect(holder).toBe(Engine)
- expect(holder.createVisualizer()).toBe(true)
-})
-
-test('where it is not there it says so, and does not loop', () => {
- expect(() => holderOf({ default: { default: {} } }, 'createVisualizer')).toThrow(/createVisualizer/)
- expect(() => holderOf(undefined, 'createVisualizer')).toThrow()
-})
diff --git a/web/src/components/milkdropLib.ts b/web/src/components/milkdropLib.ts
deleted file mode 100644
index a401333..0000000
--- a/web/src/components/milkdropLib.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
- * The butterchurn packages are old CommonJS code compiled from modules: depending on who loads them (the browser build,
- * the test runner) what an import gives is the library itself, or an object that holds it under `default`, or one more
- * object inside that. The library is a class (a function) whose functions are static, so it has to be called as itself,
- * not taken apart. This finds the object that has `key`, the one to call it on.
- */
-export function holderOf(module: unknown, key: string): T {
- let found: unknown = module
- for (let depth = 0; depth < 4 && found && (typeof found === 'object' || typeof found === 'function'); depth++) {
- if (key in found) return found as T
- found = (found as { default?: unknown }).default
- }
- throw new Error(`butterchurn: ${key} not found`)
-}
diff --git a/web/src/components/tones.ts b/web/src/components/tones.ts
deleted file mode 100644
index a363bd7..0000000
--- a/web/src/components/tones.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * The colours an album with no cover gets: a ground and the colour of the rings on it. They are the same for an
- * album every time, so a list of albums is told apart at a glance, and none of them is the colour of a friend.
- */
-export const TONES = [
- { bg: '#1e6f72', ring: '#8fe9e3' },
- { bg: '#b9503b', ring: '#f6c0b2' },
- { bg: '#3a4e8c', ring: '#b7c6f2' },
- { bg: '#5e3b73', ring: '#d9b8ec' },
- { bg: '#2f7a4e', ring: '#b5e8c8' },
- { bg: '#8c3a5a', ring: '#f0b7cb' },
- { bg: '#2d5f9a', ring: '#b3d2f5' },
- { bg: '#496b7a', ring: '#c6dce5' },
-] as const
-
-/** A tone for a name, always the same one: the colour of a mix. */
-export function toneOfText(text: string): number {
- let sum = 0
- for (const ch of text) sum = (sum * 31 + ch.codePointAt(0)!) >>> 0
- return sum % TONES.length
-}
diff --git a/web/src/components/ui/button.tsx b/web/src/components/ui/button.tsx
index dad79ae..997e0c7 100644
--- a/web/src/components/ui/button.tsx
+++ b/web/src/components/ui/button.tsx
@@ -3,13 +3,13 @@ import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "cn"
const buttonVariants = cva(
- "group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-semibold whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
+ "group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground hover:bg-primary/80",
outline:
- "border-input bg-transparent hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground",
+ "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
secondary:
"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
ghost:
@@ -20,16 +20,16 @@ const buttonVariants = cva(
},
size: {
default:
- "h-11 gap-2 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
- xs: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
- sm: "h-9 gap-1 rounded-[min(var(--radius-md),12px)] px-3 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
- lg: "h-12 gap-2 px-5 has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4",
- icon: "size-11",
+ "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
+ sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
+ lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
+ icon: "size-8",
"icon-xs":
- "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
+ "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
"icon-sm":
- "size-9 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
- "icon-lg": "size-12",
+ "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
+ "icon-lg": "size-9",
},
},
defaultVariants: {
diff --git a/web/src/components/ui/dialog.tsx b/web/src/components/ui/dialog.tsx
index 8eb96e1..c962a2d 100644
--- a/web/src/components/ui/dialog.tsx
+++ b/web/src/components/ui/dialog.tsx
@@ -120,7 +120,7 @@ function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {
) {
type={type}
data-slot="input"
className={cn(
- "h-11 w-full min-w-0 rounded-lg border border-input bg-transparent px-3 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
+ "h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
className
)}
{...props}
diff --git a/web/src/components/ui/switch.test.tsx b/web/src/components/ui/switch.test.tsx
deleted file mode 100644
index 1544bbf..0000000
--- a/web/src/components/ui/switch.test.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-import { render, screen } from '@testing-library/react'
-import userEvent from '@testing-library/user-event'
-import { expect, test, vi } from 'vitest'
-import { Switch } from './switch'
-
-test('it is a switch that says whether it is on and reports a click', async () => {
- const onClick = vi.fn()
- render( )
- const sw = screen.getByRole('switch', { name: 'Wi-Fi' })
- expect(sw).toHaveAttribute('aria-checked', 'false')
- await userEvent.click(sw)
- expect(onClick).toHaveBeenCalledTimes(1)
-})
-
-test('the area that takes a tap is 44 pixels high, and a disabled switch ignores taps', async () => {
- const onClick = vi.fn()
- render( )
- const sw = screen.getByRole('switch')
- expect(sw).toHaveClass('h-11')
- expect(sw).toHaveAttribute('aria-checked', 'true')
- await userEvent.click(sw)
- expect(onClick).not.toHaveBeenCalled()
-})
diff --git a/web/src/components/ui/switch.tsx b/web/src/components/ui/switch.tsx
deleted file mode 100644
index 5b2ca5a..0000000
--- a/web/src/components/ui/switch.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import type { ComponentProps } from 'react'
-import { cn } from '@/lib/utils'
-
-interface SwitchProps extends Omit, 'role' | 'type' | 'children'> {
- checked: boolean
-}
-
-/** An on/off switch: a rectangle with a square knob. The button is 44 pixels high so that a thumb finds it; the track drawn inside is 32. */
-export function Switch({ checked, className, ...props }: SwitchProps) {
- return (
-
-
-
-
-
- )
-}
diff --git a/web/src/i18n/locales/en.json b/web/src/i18n/locales/en.json
index ca50a53..b47ae12 100644
--- a/web/src/i18n/locales/en.json
+++ b/web/src/i18n/locales/en.json
@@ -1,7 +1,6 @@
{
"app": {
"name": "Sonda",
- "skip": "Skip to content",
"privacy": "Nothing leaves this server unless an admin turns a provider on."
},
"nav": {
@@ -12,24 +11,9 @@
"artists": "Artists",
"albums": "Albums",
"songs": "Songs",
- "library": "Library",
- "mixes": "Mixes",
"playlists": "Playlists",
- "smartPlaylists": "Smart playlists",
- "friends": "Friends",
"admin": "Admin",
- "settings": "Settings",
- "requests": "Requests",
- "listening": "Your listening",
- "history": "History",
- "import": "Import",
- "more": "More",
- "collapse": "Collapse menu",
- "expand": "Expand menu",
- "tabs": "Tabs",
- "stats": "Statistics",
- "favorites": "Favourites",
- "radio": "Radio"
+ "settings": "Settings"
},
"common": {
"loading": "Loading",
@@ -63,95 +47,22 @@
"nowPlaying": "Now playing",
"volume": "Volume",
"mute": "Mute",
- "unmute": "Unmute",
- "spectrogram": "Spectrogram of what is playing",
- "nextPicture": "Next picture",
- "bars": "Bars showing how loud each pitch is",
- "scope": "Wave of what is playing",
- "milkdrop": "Milkdrop picture of what is playing",
- "fromFriend": "From {{name}}’s server",
- "friendNote": "The audio passes through your server. {{name}} does not see who listens."
- },
- "mastodon": {
- "intro": "Share what you listen to on your own Mastodon account. Each song that counts as a listen is posted as an unlisted status: title, artists and album, with #NowPlaying and no link. Music of a friend is never posted, and at most one post goes out a minute. Nothing is posted until you connect an account.",
- "instance": "Instance",
- "instancePlaceholder": "mastodon.social",
- "token": "Access token",
- "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. 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.",
- "disconnect": "Disconnect"
- },
- "devices": {
- "intro": "Make a password for each of your other apps that plays music from this server, like Feishin, Symfonium or Amperfy. It opens the music of this server in that app and nothing else: it cannot sign in here or change your account. You can take it back at any time.",
- "none": "No app has a password yet.",
- "list": "Your devices",
- "lastUsed": "Last used {{date}}",
- "neverUsed": "Never used",
- "remove": "Remove",
- "removeNamed": "Remove {{name}}",
- "name": "Name of the app or device",
- "namePlaceholder": "Phone",
- "make": "Make password",
- "making": "Making…",
- "passwordFor": "Password for {{name}}",
- "once": "This is the only time the password is shown. Copy it into the app now.",
- "server": "Server",
- "username": "Username",
- "password": "Password",
- "copy": "Copy password",
- "copied": "Copied",
- "done": "Done",
- "radio": {
- "label": "Show the radio stations in apps",
- "help": "In apps like Feishin the stations of the radio come as playlists called “Radio · Rock”, with other songs every time you open one. There are about two dozen, so they are off until you ask."
- }
- },
- "favorites": {
- "add": "Add to favourites",
- "remove": "Remove from favourites",
- "none": "Nothing here yet. Press the heart on a song, an album or an artist to keep it here."
+ "unmute": "Unmute"
},
"settings": {
"account": "Account",
"admin": "Admin",
"signOut": "Sign out",
- "app": "App",
- "changeServer": "Change server",
- "changeServerHelp": "Choose another Sonda server for this app. You will be asked for its address.",
"appearance": "Appearance",
"theme": "Theme",
"language": "Language",
- "mastodon": "Mastodon",
- "visualizer": "Picture of the sound in the player",
- "visualizerHelp": "Milkdrop fills the full-screen player; in the bar of the player the spectrogram stands in for it. Milkdrop flashes, so with reduced motion on you get the spectrogram. Pick None to keep a phone or a laptop cooler. The choice stays on this device.",
- "visualizerSpectrogram": "Spectrogram",
- "visualizerBars": "Bars",
- "visualizerScope": "Oscilloscope",
- "visualizerMilkdrop": "Milkdrop",
- "visualizerOff": "None",
- "playback": "Playback",
- "replayGain": "Even out the volume",
- "replayGainHelp": "Quiet and loud songs play at about the same volume, using the ReplayGain tags in your files (a song without them plays as it is). Album by album keeps the differences between the songs of an album. Files added before need a full rescan to be read for these tags. The choice stays on this device.",
- "replayGainTrack": "Song by song",
- "replayGainAlbum": "Album by album",
- "replayGainOff": "Off",
- "spotify": "Import",
- "importHint": "Bring in your Spotify history and playlists, and see what each import did, on the Import page.",
- "importLink": "Open the Import page",
"password": "Password",
"currentPassword": "Current password",
"newPassword": "New password",
"passwordHint": "8 to 256 characters. Changing it signs you out everywhere.",
"passwordLength": "The new password needs 8 to 256 characters.",
"currentPasswordWrong": "The current password is wrong.",
- "changePassword": "Change password",
- "about": "About",
- "devices": "Apps and devices"
+ "changePassword": "Change password"
},
"admin": {
"title": "Admin",
@@ -160,29 +71,8 @@
"sectionLibraries": "Libraries",
"sectionUsers": "Users",
"sectionProviders": "Providers",
- "sectionFederation": "Federation",
- "sectionCosts": "Costs",
"sectionJobs": "Jobs",
"sectionDuplicates": "Duplicates",
- "costs": {
- "intro": "Every question that Sonda asks of Claude is counted here: the names it made, the ones taken from the names it kept (which cost nothing), the ones that failed, and the tokens that were billed. Nothing of what was sent is kept.",
- "period": "Period",
- "days_one": "{{count}} day",
- "days_other": "{{count}} days",
- "last_one": "Last {{count}} day",
- "last_other": "Last {{count}} days",
- "made": "Names made",
- "kept": "Names taken from the kept ones",
- "failed": "Failures",
- "tokensIn": "Tokens read",
- "tokensOut": "Tokens written",
- "tokens": "Tokens",
- "cost": "Estimated cost",
- "day": "Day (UTC)",
- "estimate": "The cost is an estimate, worked out from the tokens and the price of {{model}}. The invoice of Anthropic is the truth.",
- "unpriced": "Some calls were to a model whose price is not known: they are not in the cost.",
- "nothing": "Nothing was asked of Claude in this period."
- },
"jobs": {
"intro": "These jobs go through the whole library in the background, one item after the other. Each card says what it sends and to whom.",
"needs": "Needs {{names}} turned on: use the Providers section.",
@@ -214,8 +104,8 @@
"sendsArchive": "The release group id of every album with no picture in your files goes to the Cover Art Archive, one after the other."
},
"artistImages": {
- "title": "Artist photos",
- "what": "Looks for a free photo of every artist that has a MusicBrainz id and no answer that is still good.",
+ "title": "Artist pictures",
+ "what": "Looks for a free picture of every artist that has a MusicBrainz id and no answer that is still good.",
"sends": "The MusicBrainz id of every artist goes to MusicBrainz, Wikidata and Wikimedia Commons, one after the other."
},
"descriptions": {
@@ -242,62 +132,66 @@
}
},
"duplicates": {
- "intro": "These are songs that are in more than one file: the same artists, the same title and almost the same length. Looking is free and reads only the index. Deleting is a different thing: it removes files from your music folder.",
- "checkTitle": "Check the files",
- "checkWhat": "Reads every file that has a copy and keeps its fingerprint, so a group of files that are byte for byte the same is called identical. It only reads: nothing is deleted or sent anywhere.",
- "checkAgain": "Read every file again",
- "checkStart": "Check the files",
- "checkStop": "Stop the check",
- "checkNever": "The check has not run yet.",
- "checkConfirmTitle": "Check the files?",
- "checkConfirmBody": "This reads whole files, which takes a while on a network drive. Nothing is deleted or sent anywhere.",
- "checkConfirmAgain": "It reads again also the files that already have a fingerprint.",
- "checkConfirm": "Start the check",
- "counts": {
- "checked": "{{count}} looked at",
- "hashed": "{{count}} read",
- "skipped": "{{count}} skipped",
- "failed": "{{count}} could not be read"
+ "intro": "Songs that are in more than one file: the same artists, the same title and almost the same length, even when they are on different albums. All of this is worked out on this server; nothing leaves it.",
+ "off": "Deleting is turned off. To delete copies, set library.allow_delete (or SONDA_ALLOW_DELETE=true), mount the music folders so that Sonda can write to them, and restart the server.",
+ "check": {
+ "title": "Check the candidates",
+ "what": "Reads the files of the songs below and keeps a fingerprint (SHA-256) of each one, to tell which copies are byte for byte the same file. It takes a while on a big library.",
+ "sends": "It only reads your files. Nothing leaves this server.",
+ "start": "Start the check",
+ "stop": "Stop the check",
+ "progress": "{{done}} of {{total}} files",
+ "never": "The check has not run yet.",
+ "counts": {
+ "checked": "{{count}} looked at",
+ "hashed": "{{count}} read",
+ "skipped": "{{count}} skipped (changed or gone)",
+ "failed": "{{count}} could not be read"
+ }
},
- "groupsTitle": "Copies",
- "deletionOff": "Deleting is turned off on this server, so you can look but not delete. To allow it, the person who runs the server sets library.allow_delete.",
- "none": "No song is in more than one file.",
- "summary_one": "{{count}} song is in more than one file. Keeping the chosen copies frees {{size}}.",
- "summary_other": "{{count}} songs are in more than one file. Keeping the chosen copies frees {{size}}.",
- "partial": "Showing {{shown}} of {{total}} groups.",
- "cleanAll": "Delete all the extra copies",
- "keep": "Keep",
+ "none": "No duplicates found.",
+ "count_one": "{{count}} song is in more than one file",
+ "count_other": "{{count}} songs are in more than one file",
+ "cleanAll": "Clean all suggestions",
+ "cleanAllShown": "Only the songs shown below are cleaned. Show more to include the rest.",
+ "keepColumn": "Keep",
"album": "Album",
"format": "Format",
"bitrate": "Bitrate",
"size": "Size",
- "duration": "Length",
"noAlbum": "No album",
- "bitrateUnknown": "unknown bitrate",
- "keepCopy": "Keep this copy: {{copy}}",
+ "kbps": "{{count}} kbps",
+ "suggested": "Suggested",
+ "keepCopy": "Keep {{what}}",
+ "status": {
+ "identical": "The files are byte for byte the same.",
+ "different": "The files are not the same, even if the song is.",
+ "unchecked": "Not checked yet: run the check to see if they are the same file."
+ },
"deleteOthers": "Delete the others",
- "deleteOthersOne": "Delete the other copies of {{title}}",
- "frees": "Frees {{size}}",
- "identical": "Byte for byte the same",
- "different": "Read by the check: the files differ",
- "notCompared": "Not compared yet",
- "confirmOneTitle": "Delete the other copies?",
- "confirmAllTitle_one": "Delete the extra copies of {{count}} song?",
- "confirmAllTitle_other": "Delete the extra copies of {{count}} songs?",
- "confirmBody": "These files are deleted from your music folder and cannot be brought back. It frees {{size}}. The plays of a deleted copy move to the copy that stays.",
- "confirmList": "Files",
- "willKeep": "Keep:",
- "willDelete": "Delete:",
- "confirm": "Delete files",
- "cleaned_one": "{{count}} file deleted, {{size}} freed.",
- "cleaned_other": "{{count}} files deleted, {{size}} freed.",
+ "deleteOthersOf": "Delete the other copies of {{title}}",
+ "confirmOneTitle_one": "Delete {{count}} copy of {{title}}?",
+ "confirmOneTitle_other": "Delete {{count}} copies of {{title}}?",
+ "confirmOneBody": "The files below are deleted from the disk for good, {{size}} freed. The listens and playlists that had them move to the copy that stays.",
+ "confirmAllTitle_one": "Clean {{count}} song?",
+ "confirmAllTitle_other": "Clean {{count}} songs?",
+ "confirmAllBody_one": "In each song the copy chosen stays and the others are deleted from the disk for good: {{count}} file, {{size}} freed. The listens and playlists move to the copy that stays.",
+ "confirmAllBody_other": "In each song the copy chosen stays and the others are deleted from the disk for good: {{count}} files, {{size}} freed. The listens and playlists move to the copy that stays.",
+ "confirmDelete_one": "Delete {{count}} file",
+ "confirmDelete_other": "Delete {{count}} files",
+ "stays": "Stays: {{what}}",
+ "goes": "Delete: {{what}}",
+ "deleting": "Deleting files…",
+ "deleted_one": "Deleted {{count}} file, {{size}} freed.",
+ "deleted_other": "Deleted {{count}} files, {{size}} freed.",
"errors": {
- "deletion_disabled": "Deleting is turned off on this server.",
+ "duplicates_check_running": "The check is already running.",
"scan_running": "A scan is running. Try again when it ends.",
- "duplicate_changed": "A file is not what the last scan saw. Scan the library again, then try again.",
- "library_read_only": "The music folder cannot be written to, so nothing was deleted.",
- "track_not_found": "One of the songs is gone. The list is read again.",
- "duplicates_check_running": "The check is already running."
+ "deletion_disabled": "Deleting is turned off on the server.",
+ "duplicate_changed": "A file changed since the last scan, so nothing was deleted for that song. Run a scan and look again.",
+ "library_read_only": "The music folder is read-only, so nothing was deleted. Mount it so that Sonda can write to it.",
+ "invalid_input": "Those files are no longer copies of the same song, so nothing was deleted. Look at the list again.",
+ "track_not_found": "A song is already gone, so nothing was deleted for it. Look at the list again."
}
},
"cancel": "Cancel",
@@ -329,7 +223,7 @@
"save": "Save",
"contact": "Contact",
"saveContactOne": "Save contact for {{name}}",
- "contactHint": "A web address or an email address, sent to the provider in the User-Agent. Empty uses the project address.",
+ "contactHint": "A web address or an e-mail address, sent to the provider in the User-Agent. Empty uses the project address.",
"address": "Address",
"saveAddressOne": "Save address for {{name}}",
"addressHint": "Where your own {{name}} is, like http://lidarr.lan:8686. Clearing the address turns {{name}} off.",
@@ -372,7 +266,7 @@
"invalid_input": "That key is not valid. A {{name}} key is 32 hexadecimal characters."
},
"contactErrors": {
- "invalid_input": "Check the contact: a web address or an email address, without parentheses."
+ "invalid_input": "Check the contact: a web address or an e-mail address, without parentheses."
},
"addressErrors": {
"invalid_input": "Check the address: it starts with http:// or https://, with no user, password, query or fragment."
@@ -480,18 +374,12 @@
"remove": "Remove",
"removeOne": "Remove {{name}}",
"removeTitle": "Remove {{name}}?",
- "removeBody": "Sonda stops listing this library. Songs and listening history stay, and the music on disk is never touched.",
+ "removeBody": "Sonda stops listing this library. Tracks and listening history stay, and the music on disk is never touched.",
"removeConfirm": "Remove library",
"errors": {
"invalid_input": "The folder must be an existing directory on the server, not the root, and not inside or around another library.",
"library_exists": "Another library already has this name or folder."
- },
- "share": "Share {{name}} with friends",
- "shared": "Shared with friends",
- "notShared": "Not shared with friends",
- "shareTitle": "Share {{name}} with friends?",
- "shareBody": "The listeners of your friends' servers will be able to browse this library, play it, and in practice copy its files. Nothing is sent until a friend's server asks, and you can stop sharing at any time.",
- "shareConfirm": "Share"
+ }
},
"scan": {
"title": "Scan",
@@ -516,84 +404,6 @@
"failed": "{{count}} could not be read",
"skipped": "{{count}} skipped (links and special files)"
}
- },
- "federation": {
- "intro": "Federation lets the listeners of another Sonda server play the libraries you choose to share, and yours play theirs. It is off until you turn it on, and each friend needs an invite and two approvals.",
- "on": "On",
- "off": "Off",
- "turnOnTitle": "Turn on federation?",
- "turnOn": "Turn on",
- "name": "Name",
- "nameHint": "How friends see this server. Empty uses the host name.",
- "address": "Public address",
- "addressHint": "Where friends reach this server, like https://music.example.org. Plain http is only for a network of your own.",
- "saveSettings": "Save settings",
- "keyOfThis": "Key of this server",
- "thisServer": "This server",
- "keyHint": "The other admin sees the same key for your server: compare them to be sure.",
- "invites": "Invites",
- "makeTitle": "Invite a friend",
- "useTitle": "You got an invite",
- "makeInvite": "Create an invite",
- "invite": "Invite",
- "copy": "Copy",
- "copied": "Copied",
- "copyInvite": "Copy invite",
- "inviteExpires": "Give it to the other admin. Works once, until {{when}}.",
- "use": "Paste an invite from another server",
- "addFriend": "Add friend",
- "useHint": "The other server is asked to accept this one, and its admin then has to approve.",
- "friends": "Friends",
- "none": "No friends yet.",
- "state": {
- "incoming": "Wants to be your friend",
- "outgoing": "Waiting for their approval",
- "active": "Friend"
- },
- "keyOf": "Key {{id}}",
- "approve": "Approve",
- "approveOne": "Approve {{name}}",
- "remove": {
- "incoming": "Decline",
- "incomingOne": "Decline {{name}}",
- "outgoing": "Withdraw",
- "outgoingOne": "Withdraw {{name}}",
- "active": "Remove",
- "activeOne": "Remove {{name}}"
- },
- "removeTitle": "Remove {{name}}?",
- "removeBody": "{{name}} will no longer be asked or answered. The other server is not told. You can invite it again.",
- "errors": {
- "federation_off": "Turn federation on first.",
- "address_required": "Set the public address of this server first.",
- "invalid_input": "Check the name and the address: the address starts with https:// (http:// only on your own network), with no user, query or fragment.",
- "invalid_invite": "That is not an invite from a Sonda server.",
- "invite_refused": "That server turned the invite down: it may be used, expired, or federation may be off there.",
- "key_mismatch": "That server's key is not the one in the invite. Nothing was added.",
- "friend_unreachable": "That server did not answer as a Sonda server.",
- "already_friends": "That server is already a friend.",
- "too_many_requests": "Too many attempts. Try again in a minute.",
- "friend_not_found": "That friend is already gone.",
- "not_waiting": "That friend is not waiting for approval.",
- "not_approved": "The other admin has not approved yet.",
- "friend_gone": "That server no longer takes this server for a friend."
- },
- "check": "Check",
- "checkOne": "Check {{name}}",
- "limits": "Limits for each friend",
- "streams": "Streams at a time",
- "streamsHint": "How many songs one friend may play at the same time, from 1 to 20.",
- "rate": "KiB a second",
- "rateHint": "What one friend may take in all, over all its streams. 0 means no limit; otherwise at least 64.",
- "saveLimits": "Save limits",
- "requests": "Recent requests",
- "requestsHint": "The last requests friends made, kept for 7 days. Only the route is kept, never what was searched for.",
- "noRequests": "No friend has asked for anything yet.",
- "when": "When",
- "friendCol": "Friend",
- "route": "Route",
- "status": "Status",
- "sent": "Sent"
}
},
"lidarr": {
@@ -603,7 +413,7 @@
"inLidarrNotMonitored": "In Lidarr, not monitored",
"sent": "Sent to Lidarr.",
"alreadyThere": "Lidarr already has this artist.",
- "disabled": "Lidarr is off. An admin can turn it on in Admin → Providers.",
+ "disabled": "Lidarr is off. An admin can turn it on in the server settings.",
"notConfigured": "Lidarr has no address or key yet.",
"noId": "This artist has no MusicBrainz id, so Lidarr cannot be asked.",
"error": "Lidarr could not be asked right now.",
@@ -613,7 +423,7 @@
"send": "Send to Lidarr",
"errors": {
"lidarr_disabled": "Lidarr is off.",
- "lidarr_not_configured": "Lidarr is not set up yet: choose its profiles and root folder in Admin → Providers.",
+ "lidarr_not_configured": "Lidarr is not set up yet: choose its profiles and root folder in the server settings.",
"no_musicbrainz_id": "This artist has no MusicBrainz id.",
"lidarr_unknown_artist": "Lidarr does not know this artist.",
"lidarr_rejected": "Lidarr refused the artist: {{reason}}",
@@ -627,7 +437,6 @@
"tabs": {
"label": "Discover sections",
"suggestions": "Suggestions",
- "mine": "From your listening",
"wishlist": "Wishlist",
"dismissed": "Not interested"
},
@@ -636,12 +445,6 @@
"inLibrary": "In your library",
"why": "Why this?",
"wishlist": "Wishlist",
- "photo": {
- "show": "Show photo of {{name}}",
- "button": "Show photo",
- "hint": "Asks Wikimedia Commons for a free photo of this artist, using its MusicBrainz id. Needs the Commons and MusicBrainz providers to be on.",
- "none": "No free photo found."
- },
"notInterested": "Not interested",
"invite": "Pick an artist to start from, or let Discover start from your listening.",
"waiting": "Asking Last.fm can take several seconds.",
@@ -652,22 +455,6 @@
"partial": "Last.fm could not be reached for some artists, so this list may be shorter.",
"busy": "Discover is busy with another request. Try again in a moment.",
"retryIn": "Try again in {{seconds}} s",
- "mine": {
- "needs": "These suggestions are learned from what you play. Turn on starting Discover from your listening to see them.",
- "intro": "Sonda looks at which artists you play in the same sitting, and suggests more of what goes together. It is worked out on your server from your own listening, and nothing is sent anywhere.",
- "built": "Learned from {{plays}} plays in {{sessions}} sittings, on {{when}}.",
- "nothing": "You have not played anything yet. Play some music, or import your history from Spotify, and the suggestions appear here.",
- "libraryTitle": "In your library, not played lately",
- "libraryHint": "Artists you have that go with what you play, and that you have not played for two months.",
- "libraryNone": "Nothing to bring back right now.",
- "missingTitle": "You play them, but you do not have them",
- "missingHint": "Artists you have played at least three times and have no music of here, the ones you play most that also go with what you play now first.",
- "missingNone": "No artist you play is missing from your library.",
- "lastPlayed": "Last played {{when}}",
- "plays_one": "{{count}} play",
- "plays_other": "{{count}} plays",
- "because": "Goes with {{names}}"
- },
"marked": {
"hideOwned": "Hide the ones I already have",
"remove": "Remove",
@@ -706,41 +493,11 @@
"cancel": "Cancel"
}
},
- "friends": {
- "title": "Friends",
- "intro": "Music that the admin of another Sonda server shares with this one. It is asked for from their server when you open a page, and nothing is copied here.",
- "noneYet": "You have no friends yet. An admin makes friends in Admin → Federation.",
- "musicOf": "Music of {{name}}",
- "whose": "{{name}}’s server shares this music. It is asked for when you open a page and is never copied here.",
- "searchLabel": "Search the music of {{name}}",
- "searchPlaceholder": "Artists, albums and songs",
- "tabsLabel": "Sections of {{name}}’s music",
- "tabs": {
- "artists": "Artists",
- "albums": "Albums",
- "songs": "Songs"
- },
- "albumCount_one": "{{count}} album",
- "albumCount_other": "{{count}} albums",
- "songCount_one": "{{count}} song",
- "songCount_other": "{{count}} songs",
- "albumsOf": "Albums of {{name}}",
- "songsOf": "Songs of {{name}}",
- "showAll": "Show all",
- "nothing": "{{name}} has not shared anything yet.",
- "errors": {
- "friend_unreachable": "{{name}} could not be reached. Try again later.",
- "friend_gone": "{{name}} no longer takes this server for a friend. An admin can tell you more.",
- "friend_busy": "{{name}} is busy. Try again in a moment.",
- "friend_not_found": "This friend is not there any more."
- }
- },
"home": {
"greeting_morning": "Good morning",
"greeting_afternoon": "Good afternoon",
"greeting_evening": "Good evening",
"recent": "Recently played",
- "recentlyAdded": "Recently added",
"nothingPlayed": "Play something and it will show up here.",
"emptyLibrary": "Your library is empty. An admin can add a folder of music and scan it.",
"trackGone": "That song is no longer in your library."
@@ -749,14 +506,7 @@
"label": "Search your library",
"placeholder": "Artists, albums and songs",
"hint": "Type to search artists, albums and songs.",
- "nothingFound": "Nothing matches “{{q}}”.",
- "seeAllFor": "See all results for “{{q}}”",
- "searching": "Searching…",
- "kind": {
- "artist": "Artist",
- "album": "Album",
- "song": "Song"
- }
+ "nothingFound": "Nothing found for “{{q}}”."
},
"provider": {
"wikipedia": "Wikipedia",
@@ -765,7 +515,6 @@
"commons": "Wikimedia Commons",
"coverartarchive": "Cover Art Archive",
"lidarr": "Lidarr",
- "anthropic": "Claude (Anthropic)",
"files": "your files"
},
"empty": {
@@ -775,7 +524,7 @@
"noMatch": "Nothing matches “{{q}}”.",
"nothingFound": "Nothing was found.",
"nothingOfArtist": "Nothing of this artist is in your library.",
- "providerDisabled": "Turn on {{provider}} in Admin → Providers to see this.",
+ "providerDisabled": "Turn on {{provider}} in the server settings to see this.",
"providerError": "{{provider}} could not be reached. Try again later.",
"noId": "This artist has no MusicBrainz id, so Sonda cannot look it up.",
"stale": "This may be out of date: the provider could not be reached."
@@ -830,99 +579,18 @@
"error": {
"invalid_credentials": "Wrong email or password.",
"registration_closed": "An account already exists. Ask an admin to create yours.",
- "email_taken": "That email address is already used.",
+ "email_taken": "That email is already registered.",
"invalid_input": "Check what you typed and try again.",
"unauthorized": "Your session has ended. Sign in again.",
"network": "Cannot reach the server. Check your connection and try again.",
- "invalid_instance": "The instance must be a domain name, like mastodon.social.",
- "invalid_token": "The token is empty or too long.",
- "mastodon_refused": "The instance refused that token. Check that it has the write:statuses permission.",
- "mastodon_unreachable": "That instance could not be reached. Check the address and try again.",
- "no_spotify_data": "These files do not hold a Spotify streaming history or playlists. Choose the zip that Spotify sent you, or the files named Streaming_History_Audio… and Playlist….",
- "unreadable_file": "One of the files is damaged or cut short. Download your export from Spotify again.",
- "too_large": "These files are too large to import (the limit is 512 MB). Choose only the files named Streaming_History_Audio… and Playlist….",
- "import_running": "An import of yours is still running. Wait for it to end.",
"unknown": "Something went wrong. Try again.",
"playlist_not_found": "This playlist does not exist.",
- "limit_reached": "Limit reached: you can have 1000 playlists, and a playlist up to 10000 songs.",
+ "limit_reached": "Limit reached: a user can have 1000 playlists, and a playlist up to 10000 songs.",
"track_not_found": "This song no longer exists.",
- "invalid_position": "That place no longer exists. Reload the playlist.",
- "mix_not_found": "This mix is not available now.",
- "mix_empty": "This mix has no songs to keep.",
- "smart_playlist_not_found": "This smart playlist does not exist.",
- "suggested_not_found": "This suggested smart playlist does not exist.",
- "smart_playlist_empty": "These rules give no songs to keep.",
- "invalid_name": "The name needs 1 to 60 characters.",
- "too_many_devices": "You have 20 devices. Remove one first.",
- "device_not_found": "That device is already removed."
- },
- "spotify": {
- "intro": "Bring in your listening history and your playlists from Spotify, so that your mixes, Discover and smart playlists know what you listened to before. Ask Spotify for your data (Account, Privacy, “Extended streaming history” and “Account data”), then choose the zip it sends you, or the JSON files inside it.",
- "privacy": "Everything is read on your server. Nothing is sent anywhere and the files are not kept. Songs are matched to your library by artist and title. Of the plays of songs you do not have, only the artist and the time are kept, to learn what you listen to together.",
- "files": "Files from Spotify",
- "chosen_one": "{{count}} file chosen",
- "chosen_other": "{{count}} files chosen",
- "start": "Import",
- "running": "Importing. With a long history this can take a minute…",
- "finished": "Import done. What it did is the first one in the list below.",
- "importOf": "Import of {{when}}",
- "read_one": "{{count}} play read from the files.",
- "read_other": "{{count}} plays read from the files.",
- "missingCount_one": "{{count}} artist you are missing",
- "missingCount_other": "{{count}} artists you are missing",
- "noPlays": "No plays in these files.",
- "imported_one": "{{count}} listen added to your history.",
- "imported_other": "{{count}} listens added to your history.",
- "already_one": "{{count}} was already there.",
- "already_other": "{{count}} were already there.",
- "notFound_one": "{{count}} play is of a song that is not in your library.",
- "notFound_other": "{{count}} plays are of songs that are not in your library.",
- "keptOutside_one": "Of those, {{count}} play was kept as an artist and a time only, to learn what you listen to together.",
- "keptOutside_other": "Of those, {{count}} plays were kept as an artist and a time only, to learn what you listen to together.",
- "ignored_one": "{{count}} play skipped (a podcast, or with no readable time).",
- "ignored_other": "{{count}} plays skipped (podcasts, or with no readable time).",
- "playlists": "Playlists",
- "playlistLine": "{{name}}: {{matched}} of {{tracks}} songs found",
- "status": {
- "created": "Made",
- "exists": "You already have one with this name",
- "empty": "None of its songs is in your library",
- "limit": "You have reached the limit of playlists"
- },
- "missing": "Artists you play on Spotify and have no music of here",
- "missingMore": "and {{count}} more"
- },
- "requests": {
- "intro": "The artists you sent to Lidarr from Sonda. Lidarr looks for the music and downloads it in its own time; an artist is waiting until its music is in your library.",
- "filter": "Show",
- "filterAll_one": "All ({{count}})",
- "filterAll_other": "All ({{count}})",
- "filterWaiting": "Waiting ({{count}})",
- "filterArrived": "Arrived ({{count}})",
- "sent": "Sent {{when}}",
- "waiting": "Waiting for the music",
- "arrived": "Music in your library since {{when}}",
- "none": "You have not sent any artist to Lidarr yet. Do it from the page of an artist you do not have.",
- "noneFiltered": "No artist here."
- },
- "history": {
- "years": "Years",
- "months": "Months of {{year}}",
- "monthButton_one": "{{month}}: {{count}} listen",
- "monthButton_other": "{{month}}: {{count}} listens",
- "plays_one": "{{count}} listen",
- "plays_other": "{{count}} listens",
- "none": "You have no listens yet. What you play here, and what you import from Spotify, will be listed by year and month.",
- "import": "Import your history from Spotify",
- "noneMonth": "No listens in this month."
- },
- "import": {
- "spotify": "Spotify",
- "past": "Past imports",
- "none": "No import yet. When you bring in a Spotify export, what it did is kept here."
+ "invalid_position": "That place no longer exists. Reload the playlist."
},
"playlists": {
- "empty": "You have no playlists yet. Create one below, or put a song in a new one with the playlist button next to it.",
+ "empty": "You have no playlists yet. Make 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}}",
@@ -946,248 +614,10 @@
"remove": "Remove from playlist",
"add": "Add to playlist",
"addTitle": "Add “{{title}}” to a playlist",
- "addBody": "Choose a playlist, or create a new one.",
+ "addBody": "Choose a playlist, or make a new one.",
"noneYet": "You have no playlists yet.",
"newName": "New playlist name",
"createAndAdd": "Create and add",
"added": "Added to {{name}}."
- },
- "mixes": {
- "forYou": "Made for you",
- "byGenre": "By genre",
- "fromListening": "From your listening",
- "fromGenres": "From the genres of your files",
- "empty": "No mixes yet. They appear when your library has songs with a genre, or songs you have not heard.",
- "kind": {
- "favourites": "Your favourites",
- "rediscover": "Rediscover",
- "unheard": "New to you"
- },
- "genreMix": "{{genre}} mix",
- "with": "With {{artists}}",
- "notFound": "This mix is not available now. Mixes change with what you listen to.",
- "shuffle": "Shuffle again",
- "save": "Save as playlist",
- "saved": "Saved as “{{name}}”.",
- "open": "Open the playlist"
- },
- "smart": {
- "forYou": "Made for you",
- "mine": "My smart playlists",
- "makeMine": "Make it mine",
- "notFoundSuggested": "This suggested smart playlist does not exist.",
- "suggested": {
- "on-rotation": {
- "name": "In rotation",
- "description": "The songs you have played most in the last 30 days."
- },
- "top-year": {
- "name": "Top of the year",
- "description": "The songs you have played most over the last year."
- },
- "recently-added": {
- "name": "Recently added",
- "description": "Songs added in the last 30 days, the newest first."
- },
- "never-played": {
- "name": "Never played",
- "description": "Songs you have never listened to."
- },
- "most-played": {
- "name": "Most played",
- "description": "The songs you have played most."
- },
- "forgotten": {
- "name": "Not heard in a while",
- "description": "Songs you have played at least once, but not in the last 90 days."
- },
- "high-quality": {
- "name": "High quality",
- "description": "Files of 900 kbps or more."
- },
- "long-tracks": {
- "name": "Long songs",
- "description": "Songs of 6 minutes or more."
- }
- },
- "empty": "You have no smart playlists yet. A smart playlist is a set of rules, like “rock I have never played”, and its songs change by themselves.",
- "new": "New smart playlist",
- "meta_one": "{{sort}} · up to {{count}} song",
- "meta_other": "{{sort}} · up to {{count}} songs",
- "notFound": "This smart playlist does not exist.",
- "rulesTitle": "Rules",
- "edit": "Edit",
- "delete": "Delete",
- "deleteTitle": "Delete {{name}}?",
- "deleteBody": "The smart playlist is deleted. Playlists you made from it stay.",
- "deleteConfirm": "Delete",
- "shuffle": "Shuffle again",
- "save": "Save as playlist",
- "saved": "Saved as “{{name}}”.",
- "open": "Open the playlist",
- "noSongs": "No song meets these rules now.",
- "songs_one": "{{count}} song · {{duration}}",
- "songs_other": "{{count}} songs · {{duration}}",
- "sort": {
- "random": "Random",
- "most_played": "Most played",
- "least_played": "Least played",
- "recently_added": "Recently added",
- "title": "By title"
- },
- "rule": {
- "none": "No rules: every song",
- "genres": "Genres: {{list}}",
- "notGenres": "Not these genres: {{list}}",
- "artists_one": "Only {{count}} chosen artist",
- "artists_other": "Only {{count}} chosen artists",
- "notArtists_one": "Without {{count}} chosen artist",
- "notArtists_other": "Without {{count}} chosen artists",
- "albums_one": "Only {{count}} chosen album",
- "albums_other": "Only {{count}} chosen albums",
- "notAlbums_one": "Without {{count}} chosen album",
- "notAlbums_other": "Without {{count}} chosen albums",
- "formats": "Formats: {{list}}",
- "minBitrate": "At least {{kbps}} kbps",
- "added_one": "Added in the last {{count}} day",
- "added_other": "Added in the last {{count}} days",
- "neverPlayed": "Never played",
- "played_one": "Played in the last {{count}} day",
- "played_other": "Played in the last {{count}} days",
- "notPlayed_one": "Not played for {{count}} day",
- "notPlayed_other": "Not played for {{count}} days",
- "minPlays_one": "Played at least {{count}} time",
- "playsWithin_one": "Counting only the plays of the last {{count}} day",
- "playsWithin_other": "Counting only the plays of the last {{count}} days",
- "minPlays_other": "Played at least {{count}} times",
- "skipped_one": "Skipped in the last {{count}} day",
- "skipped_other": "Skipped in the last {{count}} days",
- "notSkipped_one": "Not skipped in the last {{count}} day",
- "notSkipped_other": "Not skipped in the last {{count}} days",
- "liked": "Only artists I like",
- "noAvoided": "Without artists I avoid",
- "minLength": "At least {{minutes}} min long",
- "maxLength": "At most {{minutes}} min long",
- "minYear": "From the year {{year}}",
- "maxYear": "Up to the year {{year}}"
- },
- "editor": {
- "titleNew": "New smart playlist",
- "titleEdit": "Edit smart playlist",
- "name": "Name",
- "nameAuto": "Leave it empty and Claude will name it from its songs.",
- "description": "Description",
- "genres": "Genres",
- "genresHint": "Songs with any of these genres. Type one and press Enter.",
- "notGenres": "Leave out genres",
- "addGenre": "Add genre",
- "removeGenre": "Remove {{genre}}",
- "format": "File format",
- "formatAny": "Any",
- "formatFlac": "FLAC",
- "formatMp3": "MP3",
- "formatKept": "Other (kept)",
- "minBitrate": "Minimum bitrate (kbps)",
- "added": "Added in the last (days)",
- "listening": "My listening",
- "neverPlayed": "Never played",
- "played": "Played in the last (days)",
- "notPlayed": "Not played for (days)",
- "playsWithin": "Count plays over the last (days)",
- "minPlays": "Played at least (times)",
- "notSkipped": "Not skipped in the last (days)",
- "taste": "My taste",
- "liked": "Only artists I like",
- "noAvoided": "Leave out artists I avoid",
- "length": "Length of the song",
- "minMinutes": "At least (minutes)",
- "maxMinutes": "At most (minutes)",
- "year": "Year",
- "minYear": "From year",
- "maxYear": "Up to year",
- "yearHelp": "The year comes from the tags of the files. A song with no year in its tags never matches. Files added before this rule existed have none until a full rescan reads their tags again.",
- "order": "Order",
- "limit": "Most songs",
- "preview": "Preview",
- "previewCount": "{{count}} songs · {{duration}}",
- "previewMore": "and {{count}} more",
- "previewNone": "No song meets these rules.",
- "save": "Save",
- "cancel": "Cancel",
- "blank": "Leave a number blank for no rule."
- }
- },
- "naming": {
- "suggest": "Suggest a name",
- "claude": "Suggested by Claude",
- "local": "Suggested on this server"
- },
- "pwa": {
- "updateReady": "A new version of Sonda is ready.",
- "reload": "Reload",
- "later": "Later",
- "install": "Install Sonda",
- "installIntro": "Install Sonda on this device to open it like an app, from its own icon and in its own window."
- },
- "version": {
- "plain": "Version {{version}}",
- "commit": "Version {{version}} · {{revision}}",
- "changed": "Version {{version}} · {{revision}} (changed)"
- },
- "stats": {
- "library": "Your library",
- "listening": "Your listening",
- "songs": "Songs",
- "albums": "Albums",
- "artists": "Artists",
- "length": "Length",
- "size": "Size on disk",
- "genres": "Genres",
- "formats": "Formats",
- "decades": "Decades",
- "other": "Smaller genres",
- "noGenre": "No genre",
- "noYear_one": "{{n}} song has no year in its tags.",
- "noYear_other": "{{n}} songs have no year in their tags.",
- "emptyLibrary": "There is no music in the library yet.",
- "period": "Period",
- "periods": {
- "all": "All time",
- "year": "This year",
- "months12": "Last 12 months",
- "days30": "Last 30 days"
- },
- "listens": "Listens",
- "timeListened": "Time listened",
- "first": "First listen",
- "byYear": "Listens by year",
- "byHour": "Listens by hour of the day",
- "byWeekday": "Listens by day of the week",
- "topArtists": "Top artists",
- "topSongs": "Top songs",
- "yourGenres": "Genres you listen to",
- "none": "No listens in this period.",
- "decade": "{{decade}}s",
- "songsIn_one": "{{label}}: {{n}} song",
- "songsIn_other": "{{label}}: {{n}} songs",
- "listensIn_one": "{{label}}: {{n}} listen",
- "listensIn_other": "{{label}}: {{n}} listens",
- "decadeShort": "{{short}}s",
- "overTime": "Genres over time",
- "timelineNone": "{{label}}: no listens",
- "timelineIn": "{{label}}: {{parts}}"
- },
- "radio": {
- "intro": "Stations that Sonda makes by itself from your music. Press one and it plays, with other songs every time and no end.",
- "forever": "Without end",
- "playing": "Playing",
- "byDecade": "By decade",
- "empty": "No station yet. They appear when your library has songs.",
- "genre": "{{genre}} Radio",
- "decade": "{{decade}}s",
- "artist": "{{name}} Radio",
- "all": "Everything",
- "start": "Start radio",
- "now": "Radio: {{name}}"
}
}
diff --git a/web/src/i18n/locales/it.json b/web/src/i18n/locales/it.json
index e684f77..cf04bad 100644
--- a/web/src/i18n/locales/it.json
+++ b/web/src/i18n/locales/it.json
@@ -1,8 +1,7 @@
{
"app": {
"name": "Sonda",
- "skip": "Vai al contenuto",
- "privacy": "Niente esce da questo server finché un admin non attiva un provider."
+ "privacy": "Niente esce da questo server finché un admin non accende un provider."
},
"nav": {
"main": "Principale",
@@ -12,24 +11,9 @@
"artists": "Artisti",
"albums": "Album",
"songs": "Brani",
- "library": "Libreria",
- "mixes": "Mix",
"playlists": "Playlist",
- "smartPlaylists": "Playlist smart",
- "friends": "Amici",
"admin": "Admin",
- "settings": "Impostazioni",
- "requests": "Richieste",
- "listening": "I tuoi ascolti",
- "history": "Cronologia",
- "import": "Importa",
- "more": "Altro",
- "collapse": "Comprimi il menu",
- "expand": "Espandi il menu",
- "tabs": "Schede",
- "stats": "Statistiche",
- "favorites": "Preferiti",
- "radio": "Radio"
+ "settings": "Impostazioni"
},
"common": {
"loading": "Caricamento",
@@ -47,8 +31,8 @@
"label": "Player",
"play": "Riproduci",
"pause": "Pausa",
- "next": "Successivo",
- "previous": "Precedente",
+ "next": "Avanti",
+ "previous": "Indietro",
"shuffle": "Casuale",
"repeatOff": "Ripeti: no",
"repeatAll": "Ripeti: tutto",
@@ -63,95 +47,22 @@
"nowPlaying": "In riproduzione",
"volume": "Volume",
"mute": "Silenzia",
- "unmute": "Riattiva l'audio",
- "spectrogram": "Spettrogramma di ciò che sta suonando",
- "nextPicture": "Visualizzazione successiva",
- "bars": "Barre che mostrano l'intensità di ogni frequenza",
- "scope": "Onda di ciò che sta suonando",
- "milkdrop": "Visualizzazione Milkdrop del brano in riproduzione",
- "fromFriend": "Dal server di {{name}}",
- "friendNote": "L'audio passa dal tuo server. {{name}} non vede chi ascolta."
- },
- "mastodon": {
- "intro": "Condividi ciò che ascolti sul tuo account Mastodon. Ogni brano che conta come ascolto viene pubblicato come post non in elenco: titolo, artisti e album, con #NowPlaying e senza link. La musica di un amico non viene mai pubblicata, ed esce al massimo un post al minuto. Non si pubblica niente finché non colleghi un account.",
- "instance": "Istanza",
- "instancePlaceholder": "mastodon.social",
- "token": "Token di accesso",
- "tokenHelp": "Nella tua istanza apri Preferenze, Sviluppo, Nuova applicazione, e dalle solo il permesso write:statuses. Incolla qui il suo token di accesso. Il server lo tiene e non lo mostra più.",
- "connect": "Collega",
- "connecting": "Collegamento…",
- "refused": "Mastodon non accetta più il token di {{handle}}, quindi non si pubblica niente. Crea un nuovo token come descritto sotto e incollalo qui.",
- "connectAgain": "Collega di nuovo",
- "connected": "I tuoi ascolti vengono pubblicati su {{handle}}.",
- "connectedHelp": "Ogni brano che conta come ascolto viene pubblicato come post non in elenco con #NowPlaying. La musica di un amico non viene mai pubblicata.",
- "disconnect": "Scollega"
- },
- "devices": {
- "intro": "Crea una password per ognuna delle altre app che riproduce la musica di questo server, come Feishin, Symfonium o Amperfy. Apre la musica di questo server in quell'app e nient'altro: non può accedere qui né cambiare il tuo account. Puoi ritirarla quando vuoi.",
- "none": "Nessuna app ha ancora una password.",
- "list": "I tuoi dispositivi",
- "lastUsed": "Ultimo uso {{date}}",
- "neverUsed": "Mai usata",
- "remove": "Rimuovi",
- "removeNamed": "Rimuovi {{name}}",
- "name": "Nome dell'app o del dispositivo",
- "namePlaceholder": "Telefono",
- "make": "Crea password",
- "making": "Creo…",
- "passwordFor": "Password per {{name}}",
- "once": "Questa è l'unica volta che la password viene mostrata. Copiala subito nell'app.",
- "server": "Server",
- "username": "Nome utente",
- "password": "Password",
- "copy": "Copia password",
- "copied": "Copiata",
- "done": "Fatto",
- "radio": {
- "label": "Mostra le stazioni radio nelle app",
- "help": "Nelle app come Feishin le stazioni della radio arrivano come playlist chiamate «Radio · Rock», con brani diversi ogni volta che ne apri una. Sono circa due dozzine, quindi restano spente finché non lo chiedi."
- }
- },
- "favorites": {
- "add": "Aggiungi ai preferiti",
- "remove": "Togli dai preferiti",
- "none": "Ancora niente. Premi il cuore su un brano, un album o un artista per tenerlo qui."
+ "unmute": "Riattiva l'audio"
},
"settings": {
"account": "Account",
"admin": "Admin",
"signOut": "Esci",
- "app": "App",
- "changeServer": "Cambia server",
- "changeServerHelp": "Scegli un altro server Sonda per questa app. Ti verrà chiesto il suo indirizzo.",
"appearance": "Aspetto",
"theme": "Tema",
"language": "Lingua",
- "mastodon": "Mastodon",
- "visualizer": "Visualizzazione audio nel player",
- "visualizerHelp": "Milkdrop riempie il player a schermo intero; nella barra del player al suo posto c'è lo spettrogramma. Milkdrop lampeggia, quindi con il movimento ridotto vedi lo spettrogramma. Scegli Nessuna per non far scaldare il telefono o il portatile. La scelta resta su questo dispositivo.",
- "visualizerSpectrogram": "Spettrogramma",
- "visualizerBars": "Barre",
- "visualizerScope": "Oscilloscopio",
- "visualizerMilkdrop": "Milkdrop",
- "visualizerOff": "Nessuna",
- "playback": "Riproduzione",
- "replayGain": "Uniforma il volume",
- "replayGainHelp": "I brani piano e quelli forti suonano più o meno allo stesso volume, secondo i tag ReplayGain dei tuoi file (un brano senza tag suona così com'è). «Album per album» mantiene le differenze tra i brani di un album. I file aggiunti prima vanno riscansionati per intero per leggerne i tag. La scelta resta su questo dispositivo.",
- "replayGainTrack": "Brano per brano",
- "replayGainAlbum": "Album per album",
- "replayGainOff": "Disattivato",
- "spotify": "Importa",
- "importHint": "Porta qui la cronologia e le playlist di Spotify, e guarda cosa ha fatto ogni importazione, nella pagina Importa.",
- "importLink": "Apri la pagina Importa",
"password": "Password",
"currentPassword": "Password attuale",
"newPassword": "Nuova password",
"passwordHint": "Da 8 a 256 caratteri. Cambiarla ti disconnette ovunque.",
"passwordLength": "La nuova password deve avere da 8 a 256 caratteri.",
"currentPasswordWrong": "La password attuale è sbagliata.",
- "changePassword": "Cambia password",
- "about": "Informazioni",
- "devices": "App e dispositivi"
+ "changePassword": "Cambia password"
},
"admin": {
"title": "Admin",
@@ -160,41 +71,20 @@
"sectionLibraries": "Librerie",
"sectionUsers": "Utenti",
"sectionProviders": "Provider",
- "sectionFederation": "Federazione",
- "sectionCosts": "Costi",
"sectionJobs": "Lavori",
"sectionDuplicates": "Duplicati",
- "costs": {
- "intro": "Qui si contano tutte le domande che Sonda fa a Claude: i nomi fatti, quelli presi dai nomi già salvati (che non costano niente), quelli falliti e i token fatturati. Di quello che è stato inviato non si conserva niente.",
- "period": "Periodo",
- "days_one": "{{count}} giorno",
- "days_other": "{{count}} giorni",
- "last_one": "Ultimo giorno",
- "last_other": "Ultimi {{count}} giorni",
- "made": "Nomi generati",
- "kept": "Nomi presi da quelli salvati",
- "failed": "Errori",
- "tokensIn": "Token letti",
- "tokensOut": "Token scritti",
- "tokens": "Token",
- "cost": "Costo stimato",
- "day": "Giorno (UTC)",
- "estimate": "Il costo è una stima, calcolata dai token e dal prezzo di {{model}}. La fattura di Anthropic è quella che conta.",
- "unpriced": "Alcune chiamate erano a un modello di cui non si conosce il prezzo: non sono nel costo.",
- "nothing": "In questo periodo non è stato chiesto niente a Claude."
- },
"jobs": {
"intro": "Questi lavori passano in rassegna tutta la libreria in background, un elemento alla volta. Ogni scheda dice cosa manda e a chi.",
- "needs": "Attiva prima {{names}} nella sezione Provider.",
+ "needs": "Serve che {{names}} sia acceso: vai nella sezione Provider.",
"and": "e",
- "refresh": "Riesegui tutto",
+ "refresh": "Rifai tutto",
"refreshHint": "Più lento: chiede di nuovo anche ciò che ha già una risposta. Un errore non sostituisce mai una risposta salvata.",
"start": "Avvia",
"startOne": "Avvia {{title}}",
"stop": "Ferma",
"stopOne": "Ferma {{title}}",
"confirmTitle": "Avviare {{title}}?",
- "confirmBody": "Passa in rassegna tutta la libreria. {{sends}}",
+ "confirmBody": "Questo passa in rassegna tutta la libreria. {{sends}}",
"confirmRefresh": "Chiede di nuovo anche ciò che ha già una risposta.",
"confirm": "Avvia il lavoro",
"progress": "{{done}} di {{total}}",
@@ -209,18 +99,18 @@
},
"covers": {
"title": "Copertine degli album",
- "what": "Costruisce la copertina di ogni album che non ne ha una ancora valida: prima dalle immagini nei tuoi file, poi, solo per gli album che lì non ne hanno, dal Cover Art Archive se è attivo.",
+ "what": "Costruisce la copertina di ogni album che non ne ha una ancora buona: prima dalle immagini nei tuoi file, poi, solo per gli album che lì non ne hanno, dal Cover Art Archive se è acceso.",
"sendsNothing": "Dal server non esce niente: legge solo le immagini nei tuoi file.",
"sendsArchive": "L'id del release group di ogni album senza immagine nei tuoi file va al Cover Art Archive, uno dopo l'altro."
},
"artistImages": {
- "title": "Foto degli artisti",
- "what": "Cerca una foto libera per ogni artista che ha un id MusicBrainz e nessuna risposta ancora valida.",
+ "title": "Immagini degli artisti",
+ "what": "Cerca un'immagine libera per ogni artista che ha un id MusicBrainz e nessuna risposta ancora buona.",
"sends": "L'id MusicBrainz di ogni artista va a MusicBrainz, Wikidata e Wikimedia Commons, uno dopo l'altro."
},
"descriptions": {
"title": "Descrizioni degli artisti",
- "what": "Legge la descrizione di Wikipedia di ogni artista che ha un id MusicBrainz e nessuna risposta ancora valida.",
+ "what": "Legge la descrizione di Wikipedia di ogni artista che ha un id MusicBrainz e nessuna risposta ancora buona.",
"sends": "L'id MusicBrainz di ogni artista va a MusicBrainz, Wikidata e Wikipedia, uno dopo l'altro."
},
"counts": {
@@ -236,68 +126,72 @@
"checked": "{{count}} esaminati",
"found": "{{count}} trovati",
"none": "{{count}} senza niente dal provider",
- "failed": "{{count}} con ricerca fallita",
+ "failed": "{{count}} non cercabili",
"skipped": "{{count}} saltati"
}
}
},
"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: 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",
- "checkStart": "Controlla i file",
- "checkStop": "Ferma il controllo",
- "checkNever": "Il controllo non è ancora stato eseguito.",
- "checkConfirmTitle": "Controllare i file?",
- "checkConfirmBody": "Legge file interi, e su un disco di rete ci vuole un po'. Non elimina e non invia niente.",
- "checkConfirmAgain": "Rilegge anche i file che hanno già un'impronta.",
- "checkConfirm": "Avvia il controllo",
- "counts": {
- "checked": "{{count}} esaminati",
- "hashed": "{{count}} letti",
- "skipped": "{{count}} saltati",
- "failed": "{{count}} non leggibili"
+ "intro": "Canzoni che stanno in più di un file: stessi artisti, stesso titolo e durata quasi uguale, anche se sono su album diversi. Tutto viene calcolato su questo server; niente ne esce.",
+ "off": "La cancellazione è spenta. Per cancellare le copie imposta library.allow_delete (o SONDA_ALLOW_DELETE=true), monta le cartelle della musica in modo che Sonda possa scriverci e riavvia il server.",
+ "check": {
+ "title": "Controlla i candidati",
+ "what": "Legge i file delle canzoni qui sotto e ne tiene un'impronta (SHA-256), per capire quali copie sono lo stesso file byte per byte. Su una libreria grande ci vuole un po'.",
+ "sends": "Legge soltanto i tuoi file. Dal server non esce niente.",
+ "start": "Avvia il controllo",
+ "stop": "Ferma il controllo",
+ "progress": "{{done}} file su {{total}}",
+ "never": "Il controllo non è ancora stato eseguito.",
+ "counts": {
+ "checked": "{{count}} esaminati",
+ "hashed": "{{count}} letti",
+ "skipped": "{{count}} saltati (cambiati o spariti)",
+ "failed": "{{count}} non leggibili"
+ }
},
- "groupsTitle": "Copie",
- "deletionOff": "L'eliminazione è disattivata su questo server: puoi guardare ma non eliminare. Per permetterla, chi gestisce il server imposta library.allow_delete.",
- "none": "Nessun brano sta in più di un file.",
- "summary_one": "{{count}} brano sta in più di un file. Tenendo le copie scelte si liberano {{size}}.",
- "summary_other": "{{count}} brani stanno in più di un file. Tenendo le copie scelte si liberano {{size}}.",
- "partial": "Mostrati {{shown}} gruppi su {{total}}.",
- "cleanAll": "Elimina tutte le copie in più",
- "keep": "Tieni",
+ "none": "Nessun duplicato trovato.",
+ "count_one": "{{count}} canzone è in più di un file",
+ "count_other": "{{count}} canzoni sono in più di un file",
+ "cleanAll": "Pulisci tutti i suggerimenti",
+ "cleanAllShown": "Vengono pulite solo le canzoni mostrate qui sotto. Mostra altri per includere il resto.",
+ "keepColumn": "Tieni",
"album": "Album",
"format": "Formato",
"bitrate": "Bitrate",
"size": "Dimensione",
- "duration": "Durata",
"noAlbum": "Nessun album",
- "bitrateUnknown": "bitrate sconosciuto",
- "keepCopy": "Tieni questa copia: {{copy}}",
- "deleteOthers": "Elimina le altre",
- "deleteOthersOne": "Elimina le altre copie di {{title}}",
- "frees": "Libera {{size}}",
- "identical": "Identici byte per byte",
- "different": "Letti dal controllo: i file sono diversi",
- "notCompared": "Non ancora confrontati",
- "confirmOneTitle": "Eliminare le altre copie?",
- "confirmAllTitle_one": "Eliminare le copie in più di {{count}} brano?",
- "confirmAllTitle_other": "Eliminare le copie in più di {{count}} brani?",
- "confirmBody": "Questi file vengono eliminati dalla tua cartella musicale e non si recuperano. Liberi {{size}}. Gli ascolti di una copia eliminata passano alla copia che resta.",
- "confirmList": "File",
- "willKeep": "Tieni:",
- "willDelete": "Elimina:",
- "confirm": "Elimina i file",
- "cleaned_one": "{{count}} file eliminato, {{size}} liberati.",
- "cleaned_other": "{{count}} file eliminati, {{size}} liberati.",
+ "kbps": "{{count}} kbps",
+ "suggested": "Suggerita",
+ "keepCopy": "Tieni {{what}}",
+ "status": {
+ "identical": "I file sono uguali byte per byte.",
+ "different": "I file non sono uguali, anche se la canzone sì.",
+ "unchecked": "Non ancora controllato: avvia il controllo per vedere se sono lo stesso file."
+ },
+ "deleteOthers": "Cancella le altre",
+ "deleteOthersOf": "Cancella le altre copie di {{title}}",
+ "confirmOneTitle_one": "Cancellare {{count}} copia di {{title}}?",
+ "confirmOneTitle_other": "Cancellare {{count}} copie di {{title}}?",
+ "confirmOneBody": "I file qui sotto vengono cancellati dal disco per sempre, {{size}} liberati. Gli ascolti e le playlist che li avevano passano alla copia che resta.",
+ "confirmAllTitle_one": "Pulire {{count}} canzone?",
+ "confirmAllTitle_other": "Pulire {{count}} canzoni?",
+ "confirmAllBody_one": "Per ogni canzone resta la copia scelta e le altre vengono cancellate dal disco per sempre: {{count}} file, {{size}} liberati. Gli ascolti e le playlist passano alla copia che resta.",
+ "confirmAllBody_other": "Per ogni canzone resta la copia scelta e le altre vengono cancellate dal disco per sempre: {{count}} file, {{size}} liberati. Gli ascolti e le playlist passano alla copia che resta.",
+ "confirmDelete_one": "Cancella {{count}} file",
+ "confirmDelete_other": "Cancella {{count}} file",
+ "stays": "Resta: {{what}}",
+ "goes": "Da cancellare: {{what}}",
+ "deleting": "Cancello i file…",
+ "deleted_one": "Cancellato {{count}} file, {{size}} liberati.",
+ "deleted_other": "Cancellati {{count}} file, {{size}} liberati.",
"errors": {
- "deletion_disabled": "L'eliminazione è disattivata su questo server.",
- "scan_running": "Una scansione è in corso. Riprova quando finisce.",
- "duplicate_changed": "Un file non è più quello visto dall'ultima scansione. Scansiona di nuovo la libreria, poi riprova.",
- "library_read_only": "La cartella musicale non è scrivibile, quindi non è stato eliminato niente.",
- "track_not_found": "Uno dei brani non c'è più. L'elenco viene ricaricato.",
- "duplicates_check_running": "Il controllo è già in corso."
+ "duplicates_check_running": "Il controllo è già in corso.",
+ "scan_running": "È in corso una scansione. Riprova quando finisce.",
+ "deletion_disabled": "La cancellazione è spenta sul server.",
+ "duplicate_changed": "Un file è cambiato dall'ultima scansione, quindi per quella canzone non è stato cancellato niente. Avvia una scansione e guarda di nuovo.",
+ "library_read_only": "La cartella della musica è in sola lettura, quindi non è stato cancellato niente. Montala in modo che Sonda possa scriverci.",
+ "invalid_input": "Quei file non sono più copie della stessa canzone, quindi non è stato cancellato niente. Guarda di nuovo l'elenco.",
+ "track_not_found": "Una canzone è già sparita, quindi per lei non è stato cancellato niente. Guarda di nuovo l'elenco."
}
},
"cancel": "Annulla",
@@ -308,50 +202,50 @@
"admin_required": "Solo un admin può farlo."
},
"providers": {
- "intro": "I provider sono disattivati finché non ne attivi uno, e prima di allora niente esce da questo server. Ogni scheda dice cosa viene mandato al provider.",
- "on": "Attivo",
- "off": "Disattivato",
- "needKey": "Aggiungi una chiave per attivarlo.",
- "needUrl": "Imposta l'indirizzo per attivarlo.",
- "needBoth": "Imposta l'indirizzo e aggiungi una chiave per attivarlo.",
- "turnOnTitle": "Attivare {{name}}?",
- "turnOnBody": "Quando è attivo, Sonda può contattare {{name}}. Cosa manda: {{sends}}",
- "turnOn": "Attiva",
+ "intro": "I provider sono spenti finché non ne accendi uno, e prima di allora niente esce da questo server. Ogni scheda dice cosa viene mandato al provider.",
+ "on": "Acceso",
+ "off": "Spento",
+ "needKey": "Aggiungi una chiave per accenderlo.",
+ "needUrl": "Imposta l'indirizzo per accenderlo.",
+ "needBoth": "Imposta l'indirizzo e aggiungi una chiave per accenderlo.",
+ "turnOnTitle": "Accendere {{name}}?",
+ "turnOnBody": "Una volta acceso, Sonda può contattare {{name}}. Cosa manda: {{sends}}",
+ "turnOn": "Accendi",
"apiKey": "Chiave API",
"keyStored": "Una chiave è salvata.",
"noKey": "Nessuna chiave salvata.",
"saveKey": "Salva chiave",
"saveKeyOne": "Salva la chiave di {{name}}",
- "removeKey": "Rimuovi chiave",
- "removeKeyOne": "Rimuovi la chiave di {{name}}",
- "removeKeyTitle": "Rimuovere la chiave di {{name}}?",
- "removeKeyBody": "Si disattiva anche {{name}}.",
+ "removeKey": "Togli chiave",
+ "removeKeyOne": "Togli la chiave di {{name}}",
+ "removeKeyTitle": "Togliere la chiave di {{name}}?",
+ "removeKeyBody": "Questo spegne anche {{name}}.",
"save": "Salva",
"contact": "Contatto",
"saveContactOne": "Salva il contatto di {{name}}",
"contactHint": "Un indirizzo web o un indirizzo email, mandato al provider nello User-Agent. Se è vuoto si usa l'indirizzo del progetto.",
"address": "Indirizzo",
"saveAddressOne": "Salva l'indirizzo di {{name}}",
- "addressHint": "Dove sta il tuo {{name}}, come http://lidarr.lan:8686. Se lo svuoti, {{name}} si disattiva.",
+ "addressHint": "Dove sta il tuo {{name}}, come http://lidarr.lan:8686. Se lo svuoti, {{name}} si spegne.",
"test": "Prova",
"testOne": "Prova {{name}}",
"testStatus": {
"ok": "Funziona.",
- "no_api_key": "Nessuna chiave salvata, quindi non è stata fatta nessuna richiesta.",
- "no_address": "{{name}} non ha ancora un indirizzo, quindi non è stata fatta nessuna richiesta.",
+ "no_api_key": "Nessuna chiave salvata, quindi non è stato chiesto a nessuno.",
+ "no_address": "{{name}} non ha ancora un indirizzo, quindi non è stato chiesto a nessuno.",
"key_refused": "Il provider non accetta questa chiave.",
"rate_limited": "Il provider chiede di aspettare: riprova più tardi.",
"unreachable": "Il provider non ha risposto.",
"error": "La prova è fallita per un altro motivo."
},
- "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",
+ "purge": "Togli i dati",
+ "purgeOne": "Togli i dati di {{name}}",
+ "purgeTitle": "Togliere ciò che ha dato {{name}}?",
+ "purgeBody": "Questo toglie tutto ciò che ha detto a Sonda (artisti simili, tag, descrizioni e immagini) e gli artisti nominati solo da quei dati e di cui nessuno ha file. La tua musica, i tuoi ascolti e le tue impostazioni restano, e il provider non viene spento.",
+ "purgeConfirm": "Togli i dati",
"removed": {
- "done": "Dati rimossi: {{list}}.",
- "nothing": "Non è stato rimosso niente: non c'era niente di questo provider.",
+ "done": "Tolti {{list}}.",
+ "nothing": "Non è stato tolto niente: non c'era niente di questo provider.",
"and": "e",
"similar_one": "{{count}} collegamento tra artisti simili",
"similar_other": "{{count}} collegamenti tra artisti simili",
@@ -365,7 +259,7 @@
"artists_other": "{{count}} artisti"
},
"errors": {
- "invalid_input": "{{name}} non si può ancora attivare: controlla che la chiave e l'indirizzo siano impostati.",
+ "invalid_input": "{{name}} non si può ancora accendere: controlla che la chiave e l'indirizzo siano impostati.",
"provider_not_found": "Questo provider non esiste."
},
"keyErrors": {
@@ -378,7 +272,7 @@
"invalid_input": "Controlla l'indirizzo: inizia con http:// o https://, senza utente, password, query o frammento."
},
"toolErrors": {
- "invalid_input": "Questo provider non si può provare."
+ "invalid_input": "Questo provider non ha una prova."
},
"lidarrErrors": {
"lidarr_not_configured": "Imposta prima l'indirizzo e una chiave di Lidarr.",
@@ -433,11 +327,11 @@
"you": "Tu",
"makeAdmin": "Rendi admin",
"makeAdminOne": "Rendi admin {{email}}",
- "removeAdmin": "Rimuovi admin",
- "removeAdminOne": "Rimuovi il ruolo admin a {{email}}",
- "removeAdminTitle": "Rimuovere il ruolo admin a {{email}}?",
+ "removeAdmin": "Togli admin",
+ "removeAdminOne": "Togli il ruolo admin a {{email}}",
+ "removeAdminTitle": "Togliere il ruolo admin a {{email}}?",
"removeAdminBody": "Non potrà più gestire librerie, utenti o provider.",
- "removeAdminConfirm": "Rimuovi ruolo admin",
+ "removeAdminConfirm": "Togli ruolo admin",
"reset": "Reimposta password",
"resetOne": "Reimposta la password di {{email}}",
"resetTitle": "Reimposta la password di {{email}}",
@@ -449,7 +343,7 @@
"delete": "Elimina",
"deleteOne": "Elimina {{email}}",
"deleteTitle": "Eliminare {{email}}?",
- "deleteBody": "L'account viene rimosso e le sue sessioni chiuse. Non si può annullare.",
+ "deleteBody": "Questo rimuove l'account e chiude le sue sessioni. Non si può annullare.",
"deleteConfirm": "Elimina account",
"addTitle": "Aggiungi un utente",
"email": "Email",
@@ -480,18 +374,12 @@
"remove": "Rimuovi",
"removeOne": "Rimuovi {{name}}",
"removeTitle": "Rimuovere {{name}}?",
- "removeBody": "Sonda non mostra più questa libreria. Brani e cronologia degli ascolti restano, e la musica sul disco non viene mai toccata.",
+ "removeBody": "Sonda smette di elencare questa libreria. Brani e cronologia degli ascolti restano, e la musica sul disco non viene mai toccata.",
"removeConfirm": "Rimuovi libreria",
"errors": {
- "invalid_input": "La cartella deve esistere sul server, non può essere la radice e non può contenere un'altra libreria né farne parte.",
+ "invalid_input": "La cartella deve essere una directory esistente sul server, non la radice, e non dentro o attorno a un'altra libreria.",
"library_exists": "Un'altra libreria ha già questo nome o questa cartella."
- },
- "share": "Condividi {{name}} con gli amici",
- "shared": "Condivisa con gli amici",
- "notShared": "Non condivisa con gli amici",
- "shareTitle": "Condividere {{name}} con gli amici?",
- "shareBody": "Gli ascoltatori dei server dei tuoi amici potranno sfogliare questa libreria, riprodurla e, in pratica, copiarne i file. Non viene inviato niente finché il server di un amico non lo chiede, e puoi smettere di condividere quando vuoi.",
- "shareConfirm": "Condividi"
+ }
},
"scan": {
"title": "Scansione",
@@ -511,89 +399,11 @@
"updated": "{{count}} aggiornati",
"unchanged": "{{count}} invariati",
"renamed": "{{count}} spostati",
- "restored": "{{count}} ricomparsi",
+ "restored": "{{count}} tornati",
"missing": "{{count}} mancanti",
"failed": "{{count}} illeggibili",
"skipped": "{{count}} saltati (collegamenti e file speciali)"
}
- },
- "federation": {
- "intro": "La federazione permette agli ascoltatori di un altro server Sonda di riprodurre le librerie che scegli di condividere, e ai tuoi di riprodurre le loro. È disattivata finché non la attivi, e ogni amico richiede un invito e due approvazioni.",
- "on": "Attiva",
- "off": "Disattivata",
- "turnOnTitle": "Attivare la federazione?",
- "turnOn": "Attiva",
- "name": "Nome",
- "nameHint": "Come gli amici vedono questo server. Se è vuoto si usa il nome della macchina.",
- "address": "Indirizzo pubblico",
- "addressHint": "Dove gli amici raggiungono questo server, come https://musica.example.org. Il semplice http va bene solo su una rete tua.",
- "saveSettings": "Salva le impostazioni",
- "keyOfThis": "Chiave di questo server",
- "thisServer": "Questo server",
- "keyHint": "L'altro admin vede la stessa chiave per il tuo server: confrontatele per essere sicuri.",
- "invites": "Inviti",
- "makeTitle": "Invita un amico",
- "useTitle": "Hai ricevuto un invito",
- "makeInvite": "Crea un invito",
- "invite": "Invito",
- "copy": "Copia",
- "copied": "Copiato",
- "copyInvite": "Copia l'invito",
- "inviteExpires": "Dallo all'altro admin. Vale una volta sola, fino a {{when}}.",
- "use": "Incolla un invito di un altro server",
- "addFriend": "Aggiungi amico",
- "useHint": "L'altro server riceve la richiesta di accettare il tuo, poi il suo admin deve approvare.",
- "friends": "Amici",
- "none": "Ancora nessun amico.",
- "state": {
- "incoming": "Vuole essere tuo amico",
- "outgoing": "In attesa della sua approvazione",
- "active": "Amico"
- },
- "keyOf": "Chiave {{id}}",
- "approve": "Approva",
- "approveOne": "Approva {{name}}",
- "remove": {
- "incoming": "Rifiuta",
- "incomingOne": "Rifiuta {{name}}",
- "outgoing": "Ritira",
- "outgoingOne": "Ritira la richiesta a {{name}}",
- "active": "Rimuovi",
- "activeOne": "Rimuovi {{name}}"
- },
- "removeTitle": "Rimuovere {{name}}?",
- "removeBody": "Questo server non interrogherà più {{name}} e non risponderà alle sue richieste. L'altro server non viene avvisato. Puoi invitarlo di nuovo.",
- "errors": {
- "federation_off": "Attiva prima la federazione.",
- "address_required": "Imposta prima l'indirizzo pubblico di questo server.",
- "invalid_input": "Controlla il nome e l'indirizzo: l'indirizzo comincia con https:// (http:// solo sulla tua rete), senza utente, query o frammento.",
- "invalid_invite": "Questo non è un invito di un server Sonda.",
- "invite_refused": "Quel server ha rifiutato l'invito: forse è già stato usato, è scaduto, oppure lì la federazione è disattivata.",
- "key_mismatch": "La chiave di quel server non è quella dell'invito. Non è stato aggiunto niente.",
- "friend_unreachable": "Quel server non ha risposto come un server Sonda.",
- "already_friends": "Quel server è già un amico.",
- "too_many_requests": "Troppi tentativi. Riprova tra un minuto.",
- "friend_not_found": "Quell'amico è già stato rimosso.",
- "not_waiting": "Quell'amico non aspetta un'approvazione.",
- "not_approved": "L'altro admin non ha ancora approvato.",
- "friend_gone": "Quel server non considera più questo server un amico."
- },
- "check": "Controlla",
- "checkOne": "Controlla {{name}}",
- "limits": "Limiti per ogni amico",
- "streams": "Riproduzioni in parallelo",
- "streamsHint": "Quanti brani può riprodurre un amico nello stesso momento, da 1 a 20.",
- "rate": "KiB al secondo",
- "rateHint": "Quanto può prendere un amico in tutto, su tutte le sue riproduzioni. 0 vuol dire nessun limite; altrimenti almeno 64.",
- "saveLimits": "Salva i limiti",
- "requests": "Richieste recenti",
- "requestsHint": "Le ultime richieste degli amici, tenute per 7 giorni. Si tiene solo il percorso, mai ciò che è stato cercato.",
- "noRequests": "Nessun amico ha ancora chiesto niente.",
- "when": "Quando",
- "friendCol": "Amico",
- "route": "Percorso",
- "status": "Esito",
- "sent": "Inviato"
}
},
"lidarr": {
@@ -603,7 +413,7 @@
"inLidarrNotMonitored": "In Lidarr, non monitorato",
"sent": "Mandato a Lidarr.",
"alreadyThere": "Lidarr ha già questo artista.",
- "disabled": "Lidarr è disattivato. Un admin può attivarlo in Admin → Provider.",
+ "disabled": "Lidarr è spento. Un admin può accenderlo nelle impostazioni del server.",
"notConfigured": "Lidarr non ha ancora indirizzo o chiave.",
"noId": "Questo artista non ha un id MusicBrainz, quindi non si può chiedere a Lidarr.",
"error": "Ora non si riesce a interrogare Lidarr.",
@@ -612,8 +422,8 @@
"cancel": "Annulla",
"send": "Manda a Lidarr",
"errors": {
- "lidarr_disabled": "Lidarr è disattivato.",
- "lidarr_not_configured": "Lidarr non è ancora configurato: scegli profili e cartella radice in Admin → Provider.",
+ "lidarr_disabled": "Lidarr è spento.",
+ "lidarr_not_configured": "Lidarr non è ancora configurato: scegli profili e cartella radice nelle impostazioni del server.",
"no_musicbrainz_id": "Questo artista non ha un id MusicBrainz.",
"lidarr_unknown_artist": "Lidarr non conosce questo artista.",
"lidarr_rejected": "Lidarr ha rifiutato l'artista: {{reason}}",
@@ -627,7 +437,6 @@
"tabs": {
"label": "Sezioni di Discover",
"suggestions": "Suggerimenti",
- "mine": "Dai tuoi ascolti",
"wishlist": "Wishlist",
"dismissed": "Non mi interessa"
},
@@ -636,12 +445,6 @@
"inLibrary": "Nella tua libreria",
"why": "Perché questo?",
"wishlist": "Wishlist",
- "photo": {
- "show": "Mostra la foto di {{name}}",
- "button": "Mostra foto",
- "hint": "Chiede a Wikimedia Commons una foto libera di questo artista, usando il suo id MusicBrainz. Servono i provider Commons e MusicBrainz attivi.",
- "none": "Nessuna foto libera trovata."
- },
"notInterested": "Non mi interessa",
"invite": "Scegli un artista da cui partire, oppure lascia che Discover parta dai tuoi ascolti.",
"waiting": "Interrogare Last.fm può richiedere diversi secondi.",
@@ -652,25 +455,9 @@
"partial": "Last.fm non era raggiungibile per alcuni artisti, quindi la lista può essere più corta.",
"busy": "Discover è occupato con un'altra richiesta. Riprova tra poco.",
"retryIn": "Riprova tra {{seconds}} s",
- "mine": {
- "needs": "Questi suggerimenti nascono da quello che ascolti. Attiva l'avvio di Discover dai tuoi ascolti per vederli.",
- "intro": "Sonda guarda quali artisti ascolti nella stessa sessione e propone altro di ciò che sta bene insieme. Si calcola sul tuo server dai tuoi ascolti e non viene inviato niente a nessuno.",
- "built": "Imparato da {{plays}} ascolti in {{sessions}} sessioni, il {{when}}.",
- "nothing": "Non hai ancora ascoltato niente. Ascolta un po' di musica, o importa la tua cronologia da Spotify, e qui compaiono i suggerimenti.",
- "libraryTitle": "Nella tua libreria, non ascoltati di recente",
- "libraryHint": "Artisti che hai e che stanno bene con quello che ascolti, ma che non ascolti da due mesi.",
- "libraryNone": "Per ora non c'è niente da riportare a galla.",
- "missingTitle": "Li ascolti, ma non li hai",
- "missingHint": "Artisti che hai ascoltato almeno tre volte e di cui qui non hai musica: prima quelli che ascolti di più e che stanno bene con quello che ascolti ora.",
- "missingNone": "Nessun artista che ascolti manca dalla tua libreria.",
- "lastPlayed": "Ultimo ascolto {{when}}",
- "plays_one": "{{count}} ascolto",
- "plays_other": "{{count}} ascolti",
- "because": "Sta bene con {{names}}"
- },
"marked": {
"hideOwned": "Nascondi quelli che ho già",
- "remove": "Rimuovi",
+ "remove": "Togli",
"interestedAgain": "Mi interessa di nuovo",
"emptyWishlist": "Ancora niente nella wishlist. Aggiungi artisti dai suggerimenti.",
"emptyDismissed": "Non hai scartato nessun artista."
@@ -679,9 +466,9 @@
"label": "Cerca un artista da cui partire",
"list": "Artisti di partenza",
"add": "Aggiungi {{name}}",
- "remove": "Rimuovi {{name}}",
+ "remove": "Togli {{name}}",
"max": "Puoi scegliere al massimo {{count}} artisti.",
- "privacy": "Last.fm viene interrogato su questi artisti, se un admin l'ha attivato."
+ "privacy": "Last.fm viene interrogato su questi artisti, se un admin l'ha acceso."
},
"taste": {
"title": "I tuoi gusti",
@@ -699,48 +486,18 @@
},
"listening": {
"label": "Avvia Discover dai miei ascolti",
- "help": "Se questa opzione è attiva, i nomi degli artisti che ascolti di più vanno a Last.fm (se un admin l'ha attivato) per trovare artisti simili. Se è disattivata, Discover parte solo dagli artisti che scegli tu.",
+ "help": "Se è acceso, i nomi degli artisti che ascolti di più vanno a Last.fm, se un admin l'ha acceso, per trovare artisti simili. Se è spento, Discover parte solo dagli artisti che scegli tu.",
"confirmTitle": "Mandare i tuoi artisti preferiti a Last.fm?",
- "confirmBody": "Discover manderà a Last.fm i nomi degli artisti che ascolti di più, se un admin ha attivato Last.fm, e chiederà artisti simili. Non viene mandato nient'altro su di te. Puoi disattivarlo quando vuoi.",
- "turnOn": "Attiva",
+ "confirmBody": "Discover manderà a Last.fm i nomi degli artisti che ascolti di più, se un admin ha acceso Last.fm, e chiederà artisti simili. Non viene mandato nient'altro su di te. Puoi spegnerlo quando vuoi.",
+ "turnOn": "Accendi",
"cancel": "Annulla"
}
},
- "friends": {
- "title": "Amici",
- "intro": "Musica che l'admin di un altro server Sonda condivide con questo. Viene chiesta al suo server quando apri una pagina, e qui non si copia niente.",
- "noneYet": "Non hai ancora amici. Un admin li aggiunge in Admin → Federazione.",
- "musicOf": "Musica di {{name}}",
- "whose": "Questa musica la condivide il server di {{name}}. Viene chiesta quando apri una pagina e qui non viene mai copiata.",
- "searchLabel": "Cerca nella musica di {{name}}",
- "searchPlaceholder": "Artisti, album e brani",
- "tabsLabel": "Sezioni della musica di {{name}}",
- "tabs": {
- "artists": "Artisti",
- "albums": "Album",
- "songs": "Brani"
- },
- "albumCount_one": "{{count}} album",
- "albumCount_other": "{{count}} album",
- "songCount_one": "{{count}} brano",
- "songCount_other": "{{count}} brani",
- "albumsOf": "Album di {{name}}",
- "songsOf": "Brani di {{name}}",
- "showAll": "Mostra tutto",
- "nothing": "{{name}} non ha ancora condiviso niente.",
- "errors": {
- "friend_unreachable": "{{name}} non è raggiungibile. Riprova più tardi.",
- "friend_gone": "{{name}} non considera più questo server un amico. Un admin può dirti di più.",
- "friend_busy": "{{name}} è occupato. Riprova tra poco.",
- "friend_not_found": "Questo amico non c'è più."
- }
- },
"home": {
"greeting_morning": "Buongiorno",
"greeting_afternoon": "Buon pomeriggio",
"greeting_evening": "Buonasera",
"recent": "Ascoltati di recente",
- "recentlyAdded": "Aggiunti di recente",
"nothingPlayed": "Ascolta qualcosa e comparirà qui.",
"emptyLibrary": "La libreria è vuota. Un admin può aggiungere una cartella di musica e scansionarla.",
"trackGone": "Quel brano non è più nella tua libreria."
@@ -749,14 +506,7 @@
"label": "Cerca nella libreria",
"placeholder": "Artisti, album e brani",
"hint": "Scrivi per cercare artisti, album e brani.",
- "nothingFound": "Nessun risultato per «{{q}}».",
- "seeAllFor": "Mostra tutti i risultati per «{{q}}»",
- "searching": "Cerco…",
- "kind": {
- "artist": "Artista",
- "album": "Album",
- "song": "Brano"
- }
+ "nothingFound": "Non ho trovato niente per “{{q}}”."
},
"provider": {
"wikipedia": "Wikipedia",
@@ -765,20 +515,19 @@
"commons": "Wikimedia Commons",
"coverartarchive": "Cover Art Archive",
"lidarr": "Lidarr",
- "anthropic": "Claude (Anthropic)",
"files": "i tuoi file"
},
"empty": {
"artists": "Ancora nessun artista.",
"albums": "Ancora nessun album.",
"songs": "Ancora nessun brano.",
- "noMatch": "Nessun risultato per «{{q}}».",
+ "noMatch": "Niente corrisponde a “{{q}}”.",
"nothingFound": "Non è stato trovato niente.",
"nothingOfArtist": "Di questo artista non c'è niente nella tua libreria.",
- "providerDisabled": "Attiva {{provider}} in Admin → Provider per vederlo.",
+ "providerDisabled": "Accendi {{provider}} nelle impostazioni del server per vederlo.",
"providerError": "{{provider}} non risponde. Riprova più tardi.",
"noId": "Questo artista non ha un id MusicBrainz, quindi Sonda non può cercarlo.",
- "stale": "Potrebbe non essere aggiornato: il provider non ha risposto."
+ "stale": "Potrebbe essere vecchio: il provider non ha risposto."
},
"notFound": {
"album": "Questo album non esiste.",
@@ -830,96 +579,15 @@
"error": {
"invalid_credentials": "Email o password sbagliate.",
"registration_closed": "Esiste già un account. Chiedi a un admin di creare il tuo.",
- "email_taken": "Questo indirizzo email è già usato.",
+ "email_taken": "Questa email è già registrata.",
"invalid_input": "Controlla quello che hai scritto e riprova.",
"unauthorized": "La sessione è terminata. Accedi di nuovo.",
"network": "Il server non risponde. Controlla la connessione e riprova.",
- "invalid_instance": "L'istanza deve essere un nome di dominio, come mastodon.social.",
- "invalid_token": "Il token è vuoto o troppo lungo.",
- "mastodon_refused": "L'istanza ha rifiutato il token. Controlla che abbia il permesso write:statuses.",
- "mastodon_unreachable": "Quell'istanza non è raggiungibile. Controlla l'indirizzo e riprova.",
- "no_spotify_data": "Questi file non contengono una cronologia di streaming né playlist di Spotify. Scegli lo zip che Spotify ti ha mandato, oppure i file che si chiamano Streaming_History_Audio… e Playlist….",
- "unreadable_file": "Uno dei file è danneggiato o tagliato. Scarica di nuovo i tuoi dati da Spotify.",
- "too_large": "Questi file sono troppo grandi da importare (il limite è 512 MB). Scegli solo i file che si chiamano Streaming_History_Audio… e Playlist….",
- "import_running": "Una tua importazione è ancora in corso. Aspetta che finisca.",
"unknown": "Qualcosa è andato storto. Riprova.",
"playlist_not_found": "Questa playlist non esiste.",
- "limit_reached": "Limite raggiunto: puoi avere 1000 playlist, e una playlist fino a 10000 brani.",
+ "limit_reached": "Limite raggiunto: un utente può avere 1000 playlist e una playlist fino a 10000 brani.",
"track_not_found": "Questo brano non esiste più.",
- "invalid_position": "Quella posizione non esiste più. Ricarica la playlist.",
- "mix_not_found": "Questo mix ora non è disponibile.",
- "mix_empty": "Questo mix non ha brani da salvare.",
- "smart_playlist_not_found": "Questa playlist smart non esiste.",
- "suggested_not_found": "Questa playlist smart suggerita non esiste.",
- "smart_playlist_empty": "Con queste regole non ci sono brani da salvare.",
- "invalid_name": "Il nome deve avere da 1 a 60 caratteri.",
- "too_many_devices": "Hai già 20 dispositivi. Rimuovine uno.",
- "device_not_found": "Quel dispositivo è già stato rimosso."
- },
- "spotify": {
- "intro": "Porta qui la cronologia di ascolto e le playlist di Spotify, così i tuoi mix, Discover e le playlist smart sanno cosa ascoltavi prima. Chiedi a Spotify i tuoi dati (Account, Privacy, «Cronologia di streaming estesa» e «Dati dell'account»), poi scegli lo zip che ti manda, oppure i file JSON che contiene.",
- "privacy": "Tutto viene letto sul tuo server. Non viene inviato niente a nessuno e i file non vengono conservati. I brani si abbinano alla tua libreria per artista e titolo. Degli ascolti dei brani che non hai si conservano solo artista e orario, per imparare cosa ascolti insieme.",
- "files": "File di Spotify",
- "chosen_one": "{{count}} file scelto",
- "chosen_other": "{{count}} file scelti",
- "start": "Importa",
- "running": "Importazione in corso. Con una cronologia lunga può volerci un minuto…",
- "finished": "Importazione finita. Cosa ha fatto è la prima della lista qui sotto.",
- "importOf": "Importazione del {{when}}",
- "read_one": "{{count}} ascolto letto dai file.",
- "read_other": "{{count}} ascolti letti dai file.",
- "missingCount_one": "{{count}} artista che ti manca",
- "missingCount_other": "{{count}} artisti che ti mancano",
- "noPlays": "Nessun ascolto in questi file.",
- "imported_one": "{{count}} ascolto aggiunto alla cronologia.",
- "imported_other": "{{count}} ascolti aggiunti alla cronologia.",
- "already_one": "{{count}} c'era già.",
- "already_other": "{{count}} c'erano già.",
- "notFound_one": "{{count}} ascolto è di un brano che non è nella tua libreria.",
- "notFound_other": "{{count}} ascolti sono di brani che non sono nella tua libreria.",
- "keptOutside_one": "Di questi, {{count}} ascolto è stato conservato solo come artista e orario, per imparare cosa ascolti insieme.",
- "keptOutside_other": "Di questi, {{count}} ascolti sono stati conservati solo come artista e orario, per imparare cosa ascolti insieme.",
- "ignored_one": "{{count}} ascolto saltato (un podcast, o senza un orario leggibile).",
- "ignored_other": "{{count}} ascolti saltati (podcast, o senza un orario leggibile).",
- "playlists": "Playlist",
- "playlistLine": "{{name}}: trovati {{matched}} brani su {{tracks}}",
- "status": {
- "created": "Creata",
- "exists": "Ne hai già una con questo nome",
- "empty": "Nessuno dei suoi brani è nella tua libreria",
- "limit": "Hai raggiunto il limite di playlist"
- },
- "missing": "Artisti che ascolti su Spotify e di cui qui non hai musica",
- "missingMore": "e altri {{count}}"
- },
- "requests": {
- "intro": "Gli artisti che hai mandato a Lidarr da Sonda. Lidarr cerca la musica e la scarica coi suoi tempi: un artista resta in attesa finché la sua musica non è nella tua libreria.",
- "filter": "Mostra",
- "filterAll_one": "Tutti ({{count}})",
- "filterAll_other": "Tutti ({{count}})",
- "filterWaiting": "In attesa ({{count}})",
- "filterArrived": "Arrivati ({{count}})",
- "sent": "Mandato il {{when}}",
- "waiting": "In attesa della musica",
- "arrived": "Musica in libreria dal {{when}}",
- "none": "Non hai ancora mandato nessun artista a Lidarr. Fallo dalla pagina di un artista che non hai.",
- "noneFiltered": "Nessun artista qui."
- },
- "history": {
- "years": "Anni",
- "months": "Mesi del {{year}}",
- "monthButton_one": "{{month}}: {{count}} ascolto",
- "monthButton_other": "{{month}}: {{count}} ascolti",
- "plays_one": "{{count}} ascolto",
- "plays_other": "{{count}} ascolti",
- "none": "Non hai ancora ascolti. Quello che ascolti qui, e quello che importi da Spotify, sarà elencato per anno e mese.",
- "import": "Importa la tua cronologia da Spotify",
- "noneMonth": "Nessun ascolto in questo mese."
- },
- "import": {
- "spotify": "Spotify",
- "past": "Importazioni passate",
- "none": "Nessuna importazione, per ora. Quando porti qui i tuoi dati di Spotify, cosa ha fatto resta salvato qui."
+ "invalid_position": "Quel posto non esiste più. Ricarica la playlist."
},
"playlists": {
"empty": "Non hai ancora nessuna playlist. Creane una qui sotto, oppure metti un brano in una nuova con il pulsante accanto al brano.",
@@ -943,7 +611,7 @@
"deleteConfirm": "Elimina",
"moveUp": "Sposta su",
"moveDown": "Sposta giù",
- "remove": "Rimuovi dalla playlist",
+ "remove": "Togli dalla playlist",
"add": "Aggiungi a una playlist",
"addTitle": "Aggiungi «{{title}}» a una playlist",
"addBody": "Scegli una playlist, oppure creane una nuova.",
@@ -951,243 +619,5 @@
"newName": "Nome della nuova playlist",
"createAndAdd": "Crea e aggiungi",
"added": "Aggiunto a {{name}}."
- },
- "mixes": {
- "forYou": "Fatti per te",
- "byGenre": "Per genere",
- "fromListening": "Dai tuoi ascolti",
- "fromGenres": "Dai generi dei tuoi file",
- "empty": "Ancora nessun mix. Compaiono quando la libreria ha brani con un genere, o brani che non hai ancora ascoltato.",
- "kind": {
- "favourites": "I tuoi preferiti",
- "rediscover": "Riscopri",
- "unheard": "Nuovi per te"
- },
- "genreMix": "Mix {{genre}}",
- "with": "Con {{artists}}",
- "notFound": "Questo mix ora non è disponibile. I mix cambiano con quello che ascolti.",
- "shuffle": "Rimescola",
- "save": "Salva come playlist",
- "saved": "Salvato come «{{name}}».",
- "open": "Apri la playlist"
- },
- "smart": {
- "forYou": "Fatte per te",
- "mine": "Le mie playlist smart",
- "makeMine": "Fanne una tua",
- "notFoundSuggested": "Questa playlist smart suggerita non esiste.",
- "suggested": {
- "on-rotation": {
- "name": "In rotazione",
- "description": "I brani che hai ascoltato di più negli ultimi 30 giorni."
- },
- "top-year": {
- "name": "Top dell'anno",
- "description": "I brani che hai ascoltato di più nell'ultimo anno."
- },
- "recently-added": {
- "name": "Aggiunti di recente",
- "description": "Brani aggiunti negli ultimi 30 giorni, i più nuovi per primi."
- },
- "never-played": {
- "name": "Mai ascoltati",
- "description": "Brani che non hai mai ascoltato."
- },
- "most-played": {
- "name": "I più ascoltati",
- "description": "I brani che hai ascoltato di più."
- },
- "forgotten": {
- "name": "Non li senti da un po'",
- "description": "Brani ascoltati almeno una volta, ma non negli ultimi 90 giorni."
- },
- "high-quality": {
- "name": "Alta qualità",
- "description": "File da 900 kbps o più."
- },
- "long-tracks": {
- "name": "Brani lunghi",
- "description": "Brani da 6 minuti o più."
- }
- },
- "empty": "Non hai ancora playlist smart. Una playlist smart è un insieme di regole, come «rock che non ho mai ascoltato», e i suoi brani cambiano da soli.",
- "new": "Nuova playlist smart",
- "meta_one": "{{sort}} · fino a {{count}} brano",
- "meta_other": "{{sort}} · fino a {{count}} brani",
- "notFound": "Questa playlist smart non esiste.",
- "rulesTitle": "Regole",
- "edit": "Modifica",
- "delete": "Elimina",
- "deleteTitle": "Eliminare {{name}}?",
- "deleteBody": "La playlist smart viene eliminata. Le playlist che ne hai ricavato restano.",
- "deleteConfirm": "Elimina",
- "shuffle": "Rimescola",
- "save": "Salva come playlist",
- "saved": "Salvata come «{{name}}».",
- "open": "Apri la playlist",
- "noSongs": "Ora nessun brano rispetta queste regole.",
- "songs_one": "{{count}} brano · {{duration}}",
- "songs_other": "{{count}} brani · {{duration}}",
- "sort": {
- "random": "Casuale",
- "most_played": "Più ascoltati",
- "least_played": "Meno ascoltati",
- "recently_added": "Aggiunti di recente",
- "title": "Per titolo"
- },
- "rule": {
- "none": "Nessuna regola: tutti i brani",
- "genres": "Generi: {{list}}",
- "notGenres": "Senza questi generi: {{list}}",
- "artists_one": "Solo {{count}} artista scelto",
- "artists_other": "Solo {{count}} artisti scelti",
- "notArtists_one": "Senza {{count}} artista scelto",
- "notArtists_other": "Senza {{count}} artisti scelti",
- "albums_one": "Solo {{count}} album scelto",
- "albums_other": "Solo {{count}} album scelti",
- "notAlbums_one": "Senza {{count}} album scelto",
- "notAlbums_other": "Senza {{count}} album scelti",
- "formats": "Formati: {{list}}",
- "minBitrate": "Almeno {{kbps}} kbps",
- "added_one": "Aggiunti nell'ultimo giorno",
- "added_other": "Aggiunti negli ultimi {{count}} giorni",
- "neverPlayed": "Mai ascoltati",
- "played_one": "Ascoltati nell'ultimo giorno",
- "played_other": "Ascoltati negli ultimi {{count}} giorni",
- "notPlayed_one": "Non ascoltati da {{count}} giorno",
- "notPlayed_other": "Non ascoltati da {{count}} giorni",
- "minPlays_one": "Ascoltati almeno {{count}} volta",
- "playsWithin_one": "Contando solo gli ascolti dell'ultimo giorno",
- "playsWithin_other": "Contando solo gli ascolti degli ultimi {{count}} giorni",
- "minPlays_other": "Ascoltati almeno {{count}} volte",
- "skipped_one": "Saltati nell'ultimo giorno",
- "skipped_other": "Saltati negli ultimi {{count}} giorni",
- "notSkipped_one": "Non saltati nell'ultimo giorno",
- "notSkipped_other": "Non saltati negli ultimi {{count}} giorni",
- "liked": "Solo artisti che mi piacciono",
- "noAvoided": "Senza artisti che evito",
- "minLength": "Lunghi almeno {{minutes}} min",
- "maxLength": "Lunghi al massimo {{minutes}} min",
- "minYear": "Dall'anno {{year}}",
- "maxYear": "Fino all'anno {{year}}"
- },
- "editor": {
- "titleNew": "Nuova playlist smart",
- "titleEdit": "Modifica playlist smart",
- "name": "Nome",
- "nameAuto": "Lascialo vuoto e Claude le darà un nome in base ai brani.",
- "description": "Descrizione",
- "genres": "Generi",
- "genresHint": "Brani con uno qualsiasi di questi generi. Scrivine uno e premi Invio.",
- "notGenres": "Escludi generi",
- "addGenre": "Aggiungi genere",
- "removeGenre": "Rimuovi {{genre}}",
- "format": "Formato del file",
- "formatAny": "Qualsiasi",
- "formatFlac": "FLAC",
- "formatMp3": "MP3",
- "formatKept": "Altro (mantenuto)",
- "minBitrate": "Bitrate minimo (kbps)",
- "added": "Aggiunti negli ultimi (giorni)",
- "listening": "Quello che ascolto",
- "neverPlayed": "Mai ascoltati",
- "played": "Ascoltati negli ultimi (giorni)",
- "notPlayed": "Non ascoltati da (giorni)",
- "playsWithin": "Conta gli ascolti degli ultimi (giorni)",
- "minPlays": "Ascoltati almeno (volte)",
- "notSkipped": "Non saltati negli ultimi (giorni)",
- "taste": "I miei gusti",
- "liked": "Solo artisti che mi piacciono",
- "noAvoided": "Escludi artisti che evito",
- "length": "Durata del brano",
- "minMinutes": "Almeno (minuti)",
- "maxMinutes": "Al massimo (minuti)",
- "year": "Anno",
- "minYear": "Dall'anno",
- "maxYear": "Fino all'anno",
- "yearHelp": "L'anno viene dai tag dei file. Un brano senza anno nei tag non viene mai incluso. I file aggiunti prima di questa regola non hanno anno finché una scansione completa non rilegge i loro tag.",
- "order": "Ordine",
- "limit": "Numero massimo di brani",
- "preview": "Anteprima",
- "previewCount": "{{count}} brani · {{duration}}",
- "previewMore": "e altri {{count}}",
- "previewNone": "Nessun brano rispetta queste regole.",
- "save": "Salva",
- "cancel": "Annulla",
- "blank": "Lascia vuoto un numero per non applicare la regola."
- }
- },
- "naming": {
- "suggest": "Suggerisci un nome",
- "claude": "Suggerito da Claude",
- "local": "Suggerito da questo server"
- },
- "pwa": {
- "updateReady": "È pronta una nuova versione di Sonda.",
- "reload": "Ricarica",
- "later": "Più tardi",
- "install": "Installa Sonda",
- "installIntro": "Installa Sonda su questo dispositivo per aprirla come un'app, con la sua icona e nella sua finestra."
- },
- "version": {
- "plain": "Versione {{version}}",
- "commit": "Versione {{version}} · {{revision}}",
- "changed": "Versione {{version}} · {{revision}} (modificata)"
- },
- "stats": {
- "library": "La tua libreria",
- "listening": "I tuoi ascolti",
- "songs": "Brani",
- "albums": "Album",
- "artists": "Artisti",
- "length": "Durata",
- "size": "Spazio su disco",
- "genres": "Generi",
- "formats": "Formati",
- "decades": "Decenni",
- "other": "Generi minori",
- "noGenre": "Senza genere",
- "noYear_one": "{{n}} brano non ha l'anno nei tag.",
- "noYear_other": "{{n}} brani non hanno l'anno nei tag.",
- "emptyLibrary": "Non c'è ancora musica nella libreria.",
- "period": "Periodo",
- "periods": {
- "all": "Sempre",
- "year": "Quest'anno",
- "months12": "Ultimi 12 mesi",
- "days30": "Ultimi 30 giorni"
- },
- "listens": "Ascolti",
- "timeListened": "Tempo ascoltato",
- "first": "Primo ascolto",
- "byYear": "Ascolti per anno",
- "byHour": "Ascolti per ora del giorno",
- "byWeekday": "Ascolti per giorno della settimana",
- "topArtists": "Artisti più ascoltati",
- "topSongs": "Brani più ascoltati",
- "yourGenres": "Generi che ascolti",
- "none": "Nessun ascolto in questo periodo.",
- "decade": "Anni {{short}}",
- "songsIn_one": "{{label}}: {{n}} brano",
- "songsIn_other": "{{label}}: {{n}} brani",
- "listensIn_one": "{{label}}: {{n}} ascolto",
- "listensIn_other": "{{label}}: {{n}} ascolti",
- "decadeShort": "{{short}}",
- "overTime": "Generi nel tempo",
- "timelineNone": "{{label}}: nessun ascolto",
- "timelineIn": "{{label}}: {{parts}}"
- },
- "radio": {
- "intro": "Stazioni che Sonda crea da sola con la tua musica. Premine una e suona, con brani diversi ogni volta e senza fine.",
- "forever": "Senza fine",
- "playing": "In riproduzione",
- "byDecade": "Per decennio",
- "empty": "Ancora nessuna stazione. Compaiono quando la libreria ha dei brani.",
- "genre": "Radio {{genre}}",
- "decade": "Anni {{short}}",
- "artist": "Radio {{name}}",
- "all": "Tutto",
- "start": "Avvia radio",
- "now": "Radio: {{name}}"
}
}
diff --git a/web/src/index.css b/web/src/index.css
index 5ae77f4..56f5018 100644
--- a/web/src/index.css
+++ b/web/src/index.css
@@ -6,6 +6,8 @@
@import "@fontsource/figtree/600.css";
@import "@fontsource/figtree/700.css";
@import "@fontsource/figtree/800.css";
+@import "@fontsource/fraunces/600.css";
+@import "@fontsource/fraunces/700.css";
@import "./theme/themes.css";
/* The dark variant follows the theme, not the OS setting. */
@@ -14,12 +16,11 @@
@theme inline {
--font-heading: var(--font-sans);
--font-sans: 'Figtree', system-ui, sans-serif;
+ --font-display: 'Fraunces', Georgia, serif;
--color-ring: var(--ring);
--color-input: var(--input);
--color-border: var(--border);
--color-destructive: var(--destructive);
- --color-friend-foreground: var(--friend-foreground);
- --color-friend: var(--friend);
--color-accent-foreground: var(--accent-foreground);
--color-accent: var(--accent);
--color-muted-foreground: var(--muted-foreground);
@@ -44,113 +45,17 @@
}
:root {
- --radius: 0.125rem;
+ --radius: 0.25rem;
}
@layer base {
* {
@apply border-border outline-ring/50;
}
- /* A line of reading stays readable on a wide screen, and no line ends on a lone word. */
- p {
- max-width: 56ch;
- text-wrap: pretty;
- }
- h1,
- h2,
- h3 {
- text-wrap: balance;
- }
body {
@apply bg-background text-foreground;
}
html {
@apply font-sans;
- /* Pulling the page down at its top must not reload it, and a song is not lost to a stray swipe. */
- overscroll-behavior-y: contain;
}
- /* A finger: no grey flash on a tap, no wait for a double tap, and a tap on a control never selects text. */
- a,
- button,
- label,
- summary,
- select,
- [role='button'],
- [role='tab'] {
- touch-action: manipulation;
- -webkit-tap-highlight-color: transparent;
- }
- nav a,
- nav button,
- footer button,
- [role='button'] {
- user-select: none;
- -webkit-touch-callout: none;
- }
-}
-
-/*
- * The player bar. On a phone it is one row, so that it leaves the page its room: what is playing, play and next, and a
- * thin line of progress along its top edge (the rest is in the full-screen player, which the cover and the title open;
- * the phone has its own volume). While nothing plays it is not there. From 640px up the words are on the left, the
- * controls and the position in the middle, the extras on the right.
- */
-@layer components {
- .player-bar {
- display: grid;
- grid-template-columns: minmax(0, 1fr) auto;
- grid-template-areas: 'info controls';
- align-items: center;
- }
- .player-info { grid-area: info; }
- .player-controls { grid-area: controls; }
- .player-seek { grid-area: seek; }
- .player-extras { grid-area: extras; }
- @media (min-width: 640px) {
- .player-bar {
- grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
- grid-template-areas: 'info controls extras' 'info seek extras';
- }
- }
-}
-
-/* A card that is a link answers the pointer: it lifts a little and its picture grows inside its frame. */
-@media (hover: hover) and (prefers-reduced-motion: no-preference) {
- .lift { transition: transform 150ms ease-out; }
- .lift:hover { transform: translateY(-2px); }
- .lift img { transition: transform 200ms ease-out; }
- .lift:hover img { transform: scale(1.03); }
-}
-
-/* The volume slider has square corners like the rest: a thin track filled up to the knob, and a bar for a knob. The
- browser's own slider is round, and no setting makes it square. */
-.slider {
- appearance: none;
- background: transparent;
-}
-.slider::-webkit-slider-runnable-track {
- height: 4px;
- background: linear-gradient(to right, var(--primary) var(--fill), var(--input) var(--fill));
-}
-.slider::-webkit-slider-thumb {
- appearance: none;
- width: 8px;
- height: 18px;
- margin-top: -7px;
- background: var(--primary);
-}
-.slider::-moz-range-track {
- height: 4px;
- background: var(--input);
-}
-.slider::-moz-range-progress {
- height: 4px;
- background: var(--primary);
-}
-.slider::-moz-range-thumb {
- width: 8px;
- height: 18px;
- border: 0;
- border-radius: 0;
- background: var(--primary);
}
diff --git a/web/src/lib/bytes.test.ts b/web/src/lib/bytes.test.ts
deleted file mode 100644
index 9a58fba..0000000
--- a/web/src/lib/bytes.test.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { expect, test } from 'vitest'
-import { formatBytes } from './bytes'
-
-test('a size is written with the unit that keeps it short', () => {
- expect(formatBytes(0)).toBe('0 B')
- expect(formatBytes(1023)).toBe('1023 B')
- expect(formatBytes(2048)).toBe('2 KB')
- expect(formatBytes(4_404_019)).toBe('4.2 MB')
- expect(formatBytes(1_395_864_371)).toBe('1.3 GB')
-})
-
-test('a size below zero is shown as zero', () => {
- expect(formatBytes(-5)).toBe('0 B')
-})
diff --git a/web/src/lib/bytes.ts b/web/src/lib/bytes.ts
deleted file mode 100644
index 9e9afd0..0000000
--- a/web/src/lib/bytes.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-const UNITS = ['B', 'KB', 'MB', 'GB', 'TB']
-
-/** A size in bytes as a short text: `0 B`, `812 KB`, `4.2 MB`, `1.3 GB` (steps of 1024, one decimal from MB up). */
-export function formatBytes(bytes: number): string {
- let value = Math.max(0, bytes)
- let unit = 0
- while (value >= 1024 && unit < UNITS.length - 1) {
- value /= 1024
- unit++
- }
- const text = unit < 2 ? String(Math.round(value)) : value.toFixed(1)
- return `${text} ${UNITS[unit]}`
-}
diff --git a/web/src/lib/groupKey.ts b/web/src/lib/groupKey.ts
deleted file mode 100644
index 96f8e7d..0000000
--- a/web/src/lib/groupKey.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-/** A key in groups of four, the way two admins read it to each other: "81ae 4d57 0686 356c". */
-export function groupKey(id: string): string {
- return id.replace(/(.{4})(?=.)/g, '$1 ')
-}
diff --git a/web/src/lib/size.test.ts b/web/src/lib/size.test.ts
new file mode 100644
index 0000000..6efea56
--- /dev/null
+++ b/web/src/lib/size.test.ts
@@ -0,0 +1,23 @@
+import { expect, test } from 'vitest'
+import { formatBytes } from './size'
+
+test.each([
+ [0, 'en', '0 B'],
+ [999, 'en', '999 B'],
+ [1000, 'en', '1 kB'],
+ [1_500, 'en', '1.5 kB'],
+ [999_949, 'en', '999.9 kB'],
+ [999_950, 'en', '1 MB'],
+ [999_999_999, 'en', '1 GB'],
+ [42_000_000, 'en', '42 MB'],
+ [4_320_000_000, 'en', '4.3 GB'],
+ [4_320_000_000, 'it', '4,3 GB'],
+ [2_000_000_000_000, 'en', '2 TB'],
+])('%i bytes are written %s in %s', (bytes, lang, text) => {
+ expect(formatBytes(bytes, lang)).toBe(text)
+})
+
+test('anything that is not a size is 0 B', () => {
+ expect(formatBytes(-5, 'en')).toBe('0 B')
+ expect(formatBytes(Number.NaN, 'en')).toBe('0 B')
+})
diff --git a/web/src/lib/size.ts b/web/src/lib/size.ts
new file mode 100644
index 0000000..f388b90
--- /dev/null
+++ b/web/src/lib/size.ts
@@ -0,0 +1,12 @@
+const UNITS = ['B', 'kB', 'MB', 'GB', 'TB']
+
+/** A size in bytes as people read it ("4.3 GB"): units of 1000, one decimal at most, the number in the reader's language. */
+export function formatBytes(bytes: number, language?: string): string {
+ if (!Number.isFinite(bytes) || bytes <= 0) return '0 B'
+ let unit = Math.min(Math.floor(Math.log10(bytes) / 3), UNITS.length - 1)
+ // What is shown is rounded, so 999 950 bytes would read "1000 kB": it is "1 MB".
+ const shown = (u: number) => (u === 0 ? Math.round(bytes) : Math.round((bytes / 1000 ** u) * 10) / 10)
+ if (shown(unit) >= 1000 && unit < UNITS.length - 1) unit++
+ const digits = unit === 0 ? 0 : 1
+ return `${new Intl.NumberFormat(language, { maximumFractionDigits: digits }).format(bytes / 1000 ** unit)} ${UNITS[unit]}`
+}
diff --git a/web/src/lib/time.test.ts b/web/src/lib/time.test.ts
index 4a2f146..eaed80e 100644
--- a/web/src/lib/time.test.ts
+++ b/web/src/lib/time.test.ts
@@ -1,5 +1,5 @@
-import { describe, expect, test } from 'vitest'
-import { formatLength, formatTime } from './time'
+import { expect, test } from 'vitest'
+import { formatTime } from './time'
test.each([
[0, '0:00'],
@@ -20,21 +20,3 @@ test('a negative or unknown time is written as zero', () => {
expect(formatTime(Number.NaN)).toBe('0:00')
expect(formatTime(Number.POSITIVE_INFINITY)).toBe('0:00')
})
-
-describe('formatLength', () => {
- const h = 3600_000
- test('tells days and hours, hours and minutes, or minutes, in the language of the reader', () => {
- expect(formatLength((38 * 24 + 4) * h + 120_000, 'en')).toBe('38 days 4 hours')
- expect(formatLength(25 * h, 'en')).toBe('1 day 1 hour')
- expect(formatLength(2 * h + 5 * 60_000, 'en')).toBe('2 hours 5 minutes')
- expect(formatLength(7 * 60_000 + 59_000, 'en')).toBe('7 minutes')
- expect(formatLength(2 * 24 * h, 'it')).toBe('2 giorni')
- })
- test('leaves out a second unit that is zero, and is 0 minutes for nothing or a bad number', () => {
- expect(formatLength(3 * 24 * h + 10 * 60_000, 'en')).toBe('3 days')
- expect(formatLength(4 * h, 'en')).toBe('4 hours')
- expect(formatLength(0, 'en')).toBe('0 minutes')
- expect(formatLength(Number.NaN, 'en')).toBe('0 minutes')
- expect(formatLength(-5, 'en')).toBe('0 minutes')
- })
-})
diff --git a/web/src/lib/time.ts b/web/src/lib/time.ts
index 9a3193d..d388d0a 100644
--- a/web/src/lib/time.ts
+++ b/web/src/lib/time.ts
@@ -7,17 +7,3 @@ export function formatTime(ms: number): string {
const seconds = String(total % 60).padStart(2, '0')
return hours > 0 ? `${hours}:${String(minutes).padStart(2, '0')}:${seconds}` : `${minutes}:${seconds}`
}
-
-/**
- * A long time in words, in the language of the reader: "38 days 4 hours", "2 hours 5 minutes", "7 minutes". Only the
- * two biggest units are told, and a zero second unit is left out.
- */
-export function formatLength(ms: number, lang: string): string {
- const unit = (n: number, u: 'day' | 'hour' | 'minute') => new Intl.NumberFormat(lang, { style: 'unit', unit: u, unitDisplay: 'long' }).format(n)
- const minutes = Math.floor(Math.max(0, Number.isFinite(ms) ? ms : 0) / 60000)
- const hours = Math.floor(minutes / 60)
- const days = Math.floor(hours / 24)
- if (days >= 1) return hours % 24 > 0 ? `${unit(days, 'day')} ${unit(hours % 24, 'hour')}` : unit(days, 'day')
- if (hours >= 1) return minutes % 60 > 0 ? `${unit(hours, 'hour')} ${unit(minutes % 60, 'minute')}` : unit(hours, 'hour')
- return unit(minutes, 'minute')
-}
diff --git a/web/src/lib/useSwipe.ts b/web/src/lib/useSwipe.ts
deleted file mode 100644
index da8821a..0000000
--- a/web/src/lib/useSwipe.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import { useRef, type TouchEvent } from 'react'
-
-/**
- * Handlers for a vertical swipe with a finger: spread them on an element. A swipe counts when it is long enough and goes
- * more up or down than sideways, so that a scroll, a tap or a slide of a slider does not trigger it. The browser still
- * scrolls as it always did: this only looks at where the finger started and where it left.
- */
-export function useSwipe({
- onUp,
- onDown,
- distance = 80,
- allow,
-}: {
- onUp?: () => void
- onDown?: () => void
- distance?: number
- /** Asked when the finger goes down: false ignores this swipe (the page under the finger is scrolled, say). */
- allow?: (e: TouchEvent) => boolean
-}) {
- const start = useRef<{ x: number; y: number } | null>(null)
- return {
- onTouchStart(e: TouchEvent) {
- const t = e.touches[0]
- start.current = t && (allow?.(e) ?? true) ? { x: t.clientX, y: t.clientY } : null
- },
- onTouchEnd(e: TouchEvent) {
- const from = start.current
- start.current = null
- const t = e.changedTouches[0]
- if (!from || !t) return
- const dy = t.clientY - from.y
- const dx = t.clientX - from.x
- if (Math.abs(dx) > Math.abs(dy) / 1.5) return
- if (dy >= distance) onDown?.()
- else if (dy <= -distance) onUp?.()
- },
- onTouchCancel() {
- start.current = null
- },
- }
-}
diff --git a/web/src/main.tsx b/web/src/main.tsx
index 693a143..4aa850c 100644
--- a/web/src/main.tsx
+++ b/web/src/main.tsx
@@ -4,13 +4,10 @@ import './index.css'
import App from './App.tsx'
import { restoreSession } from './auth/session'
import { initI18n } from './i18n'
-import { usePwa } from './pwa/store'
-import { registerServiceWorker } from './pwa/register'
import { initTheme } from './theme/theme'
initTheme()
void restoreSession()
-registerServiceWorker({ onWaiting: (registration) => usePwa.getState().setWaiting(registration) })
void initI18n().then(() => {
createRoot(document.getElementById('root')!).render(
diff --git a/web/src/pages/AlbumPage.tsx b/web/src/pages/AlbumPage.tsx
index ffd3178..f3d878a 100644
--- a/web/src/pages/AlbumPage.tsx
+++ b/web/src/pages/AlbumPage.tsx
@@ -4,7 +4,6 @@ import { Link, useParams } from 'react-router-dom'
import { useAlbum, useTrackList } from '@/api/catalog'
import { ApiError } from '@/api/client'
import Cover from '@/components/Cover'
-import FavoriteButton from '@/components/FavoriteButton'
import LoadMore from '@/components/LoadMore'
import { EmptyMessage, ErrorMessage, Loading } from '@/components/Status'
import TrackList from '@/components/TrackList'
@@ -35,12 +34,12 @@ function AlbumView({ id }: { id: number }) {
return (
-
-
+
+
-
-
{a.title}
+
+
{a.title}
{a.artist ? (
@@ -57,12 +56,11 @@ function AlbumView({ id }: { id: number }) {
-
-
playTracks(items, 0)}>
+
+
playTracks(items, 0)}>
{t('player.play')}
-
{tracks.isError ? (
diff --git a/web/src/pages/AlbumsPage.tsx b/web/src/pages/AlbumsPage.tsx
index 42412cb..177bb30 100644
--- a/web/src/pages/AlbumsPage.tsx
+++ b/web/src/pages/AlbumsPage.tsx
@@ -4,19 +4,17 @@ import { useAlbumList } from '@/api/catalog'
import { AlbumCard, CARD_GRID } from '@/components/cards'
import LoadMore from '@/components/LoadMore'
import { EmptyMessage, ErrorMessage, Loading } from '@/components/Status'
-import PageTitle from '@/components/PageTitle'
export default function AlbumsPage() {
const { t } = useTranslation()
const [params] = useSearchParams()
const q = params.get('q') ?? ''
- const sort = params.get('sort') === 'recent' ? 'recent' : undefined
- const query = useAlbumList({ q, sort })
+ const query = useAlbumList({ q })
const items = query.data?.items ?? []
return (
-
{t(sort ? 'home.recentlyAdded' : 'nav.albums')}
+
{t('nav.albums')}
{query.isError ? (
query.refetch()} />
) : query.isPending ? (
diff --git a/web/src/pages/ArtistPage.tsx b/web/src/pages/ArtistPage.tsx
index 33997d5..d1ef35d 100644
--- a/web/src/pages/ArtistPage.tsx
+++ b/web/src/pages/ArtistPage.tsx
@@ -1,11 +1,9 @@
-import { Play, Radio } from 'lucide-react'
+import { Play } from 'lucide-react'
import { useTranslation } from 'react-i18next'
import { useParams } from 'react-router-dom'
import { useAlbumList, useArtist, useTrackList } from '@/api/catalog'
import { ApiError } from '@/api/client'
-import { useStartRadio } from '@/api/radio'
import ArtistPhoto from '@/components/ArtistPhoto'
-import FavoriteButton from '@/components/FavoriteButton'
import { AlbumCard, CARD_GRID } from '@/components/cards'
import LidarrButton from '@/components/LidarrButton'
import LoadMore from '@/components/LoadMore'
@@ -29,7 +27,6 @@ function ArtistView({ id }: { id: number }) {
const albums = useAlbumList({ artistId: id })
const tracks = useTrackList({ artistId: id })
const playTracks = usePlayer((s) => s.playTracks)
- const radio = useStartRadio()
const songs = tracks.data?.items ?? []
if (artist.isError) {
@@ -55,25 +52,11 @@ function ArtistView({ id }: { id: number }) {
{t('artist.albumCount', { count: a.album_count })} · {t('artist.songCount', { count: a.track_count })}
{!nothingHere && (
-
+
playTracks(songs, 0)}>
{t('player.play')}
-
- radio.mutate(`artist:${a.id}`, {
- onSuccess: (data) => playTracks(data.tracks, 0, { id: data.id, title: t('radio.artist', { name: a.name }) }),
- })
- }
- >
-
- {t('radio.start')}
-
-
)}
diff --git a/web/src/pages/ArtistSections.tsx b/web/src/pages/ArtistSections.tsx
index 5353579..4941dcf 100644
--- a/web/src/pages/ArtistSections.tsx
+++ b/web/src/pages/ArtistSections.tsx
@@ -63,7 +63,7 @@ export function Similar({ artistId }: { artistId: number }) {
className="flex min-h-11 items-center gap-2 rounded-md bg-secondary px-4 font-semibold hover:bg-accent"
>
{item.artist.name}
- {item.in_library &&
{t('artist.inLibrary')} }
+ {item.in_library &&
{t('artist.inLibrary')} }
))}
diff --git a/web/src/pages/ArtistsPage.tsx b/web/src/pages/ArtistsPage.tsx
index 372d8bf..5fbfd05 100644
--- a/web/src/pages/ArtistsPage.tsx
+++ b/web/src/pages/ArtistsPage.tsx
@@ -4,7 +4,6 @@ import { useArtistList } from '@/api/catalog'
import { ArtistCard, CARD_GRID } from '@/components/cards'
import LoadMore from '@/components/LoadMore'
import { EmptyMessage, ErrorMessage, Loading } from '@/components/Status'
-import PageTitle from '@/components/PageTitle'
export default function ArtistsPage() {
const { t } = useTranslation()
@@ -15,7 +14,7 @@ export default function ArtistsPage() {
return (
-
{t('nav.artists')}
+
{t('nav.artists')}
{query.isError ? (
query.refetch()} />
) : query.isPending ? (
diff --git a/web/src/pages/DiscoverPage.test.tsx b/web/src/pages/DiscoverPage.test.tsx
index c3c2345..f9e3555 100644
--- a/web/src/pages/DiscoverPage.test.tsx
+++ b/web/src/pages/DiscoverPage.test.tsx
@@ -84,10 +84,8 @@ test('the arrow keys move between the tabs', async () => {
renderPage()
tab('Suggestions').focus()
await userEvent.keyboard('{ArrowRight}')
- expect(tab('From your listening')).toHaveAttribute('aria-selected', 'true')
- expect(tab('From your listening')).toHaveFocus()
- await userEvent.keyboard('{ArrowRight}')
expect(tab('Wishlist')).toHaveAttribute('aria-selected', 'true')
- await userEvent.keyboard('{ArrowLeft}{ArrowLeft}{ArrowLeft}')
+ expect(tab('Wishlist')).toHaveFocus()
+ await userEvent.keyboard('{ArrowLeft}{ArrowLeft}')
expect(tab('Not interested')).toHaveAttribute('aria-selected', 'true')
})
diff --git a/web/src/pages/DiscoverPage.tsx b/web/src/pages/DiscoverPage.tsx
index e65bd63..8c256bc 100644
--- a/web/src/pages/DiscoverPage.tsx
+++ b/web/src/pages/DiscoverPage.tsx
@@ -3,13 +3,10 @@ import { useTranslation } from 'react-i18next'
import { useSearchParams } from 'react-router-dom'
import { cn } from '@/lib/utils'
import MarkedList from './discover/MarkedList'
-import ListeningTab from './discover/ListeningTab'
import SuggestionsTab from './discover/SuggestionsTab'
-import PageTitle from '@/components/PageTitle'
const TABS = [
{ id: 'suggestions', key: 'discover.tabs.suggestions' },
- { id: 'mine', key: 'discover.tabs.mine' },
{ id: 'wishlist', key: 'discover.tabs.wishlist' },
{ id: 'dismissed', key: 'discover.tabs.dismissed' },
] as const
@@ -42,9 +39,9 @@ export default function DiscoverPage() {
return (
-
{t('discover.title')}
+
{t('discover.title')}
-
+
{TABS.map((tab) => (
choose(tab.id)}
className={cn(
- '-mb-px min-h-12 border-b-[3px] px-4 font-semibold focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',
- current === tab.id ? 'border-primary text-foreground' : 'border-transparent text-muted-foreground hover:text-foreground',
+ 'min-h-11 rounded-lg px-4 font-semibold focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',
+ current === tab.id ? 'bg-secondary text-foreground' : 'text-muted-foreground hover:text-foreground',
)}
>
{t(tab.key)}
@@ -69,7 +66,7 @@ export default function DiscoverPage() {
- {current === 'suggestions' ? : current === 'mine' ? : }
+ {current === 'suggestions' ? : }
)
diff --git a/web/src/pages/FavoritesPage.test.tsx b/web/src/pages/FavoritesPage.test.tsx
deleted file mode 100644
index 4d966bc..0000000
--- a/web/src/pages/FavoritesPage.test.tsx
+++ /dev/null
@@ -1,89 +0,0 @@
-import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
-import { render, screen, within } from '@testing-library/react'
-import userEvent from '@testing-library/user-event'
-import { MemoryRouter } from 'react-router-dom'
-import { beforeEach, expect, test, vi } from 'vitest'
-import { initI18n } from '@/i18n'
-import { apiError, mockFetch, type MockRoutes } from '@/test/mockFetch'
-import FavoritesPage from './FavoritesPage'
-
-beforeEach(async () => {
- vi.spyOn(navigator, 'language', 'get').mockReturnValue('en-US')
- await initI18n()
-})
-
-const track = { id: 7, title: 'Karma Police', duration_ms: 264000, track_no: 2, disc_no: 1, album: { id: 3, title: 'OK Computer' }, artists: [{ id: 1, name: 'Radiohead' }], format: 'flac', replay_gain: null }
-const album = { id: 3, title: 'OK Computer', artist: { id: 1, name: 'Radiohead' }, track_count: 12, duration_ms: 3200000 }
-const artist = { id: 1, name: 'Radiohead', album_count: 9, track_count: 90 }
-const page = (items: object[]) => ({ items, total: items.length, limit: 50, offset: 0 })
-const ids = (t: number[], a: number[], r: number[]) => ({ tracks: t, albums: a, artists: r })
-
-function setup(routes: MockRoutes = {}) {
- const mocked = mockFetch({
- 'GET /api/v1/me/favorites/tracks': () => page([track]),
- 'GET /api/v1/me/favorites/albums': () => page([album]),
- 'GET /api/v1/me/favorites/artists': () => page([artist]),
- 'GET /api/v1/me/favorites/ids': () => ids([7], [3], [1]),
- ...routes,
- })
- render(
-
-
-
-
- ,
- )
- return mocked
-}
-
-test('it shows the songs, the albums and the artists that are favourites, each in its own part', async () => {
- setup()
- expect(screen.getByRole('heading', { level: 1, name: 'Favourites' })).toBeInTheDocument()
- const songs = await screen.findByRole('region', { name: 'Songs' })
- expect(await within(songs).findByText('Karma Police')).toBeInTheDocument()
- const albums = await screen.findByRole('region', { name: 'Albums' })
- expect(await within(albums).findByRole('link', { name: /OK Computer/ })).toHaveAttribute('href', '/albums/3')
- const artists = await screen.findByRole('region', { name: 'Artists' })
- expect(await within(artists).findByRole('link', { name: /Radiohead/ })).toHaveAttribute('href', '/artists/1')
-})
-
-test('a part with nothing in it is left out', async () => {
- setup({ 'GET /api/v1/me/favorites/albums': () => page([]), 'GET /api/v1/me/favorites/artists': () => page([]) })
- await screen.findByRole('region', { name: 'Songs' })
- expect(screen.queryByRole('region', { name: 'Albums' })).not.toBeInTheDocument()
- expect(screen.queryByRole('region', { name: 'Artists' })).not.toBeInTheDocument()
-})
-
-test('with no favourites at all it says how to make one', async () => {
- setup({
- 'GET /api/v1/me/favorites/tracks': () => page([]),
- 'GET /api/v1/me/favorites/albums': () => page([]),
- 'GET /api/v1/me/favorites/artists': () => page([]),
- 'GET /api/v1/me/favorites/ids': () => ids([], [], []),
- })
- expect(await screen.findByText(/Nothing here yet/)).toBeInTheDocument()
- expect(screen.queryByRole('region')).not.toBeInTheDocument()
-})
-
-test('taking a song back removes it from the list', async () => {
- let songs = [track]
- setup({
- 'GET /api/v1/me/favorites/tracks': () => page(songs),
- 'DELETE /api/v1/me/favorites/tracks/7': () => {
- songs = []
- return new Response(null, { status: 204 })
- },
- })
- await userEvent.click(await screen.findByRole('button', { name: 'Remove from favourites' }))
- expect(await screen.findByRole('region', { name: 'Albums' })).toBeInTheDocument()
- await vi.waitFor(() => expect(screen.queryByRole('region', { name: 'Songs' })).not.toBeInTheDocument())
-})
-
-test('a list that cannot be read has a way to try again', async () => {
- let fail = true
- setup({ 'GET /api/v1/me/favorites/tracks': () => (fail ? apiError(500, 'internal', 'x') : page([track])) })
- const retry = await screen.findByRole('button', { name: 'Try again' })
- fail = false
- await userEvent.click(retry)
- expect(await screen.findByText('Karma Police')).toBeInTheDocument()
-})
diff --git a/web/src/pages/FavoritesPage.tsx b/web/src/pages/FavoritesPage.tsx
deleted file mode 100644
index 0b673f5..0000000
--- a/web/src/pages/FavoritesPage.tsx
+++ /dev/null
@@ -1,65 +0,0 @@
-import { useTranslation } from 'react-i18next'
-import { usePagedList, type Album, type Artist, type Track } from '@/api/catalog'
-import { AlbumCard, ArtistCard, CARD_GRID } from '@/components/cards'
-import LoadMore from '@/components/LoadMore'
-import PageTitle from '@/components/PageTitle'
-import Section from '@/components/Section'
-import { EmptyMessage, ErrorMessage, Loading } from '@/components/Status'
-import TrackList from '@/components/TrackList'
-
-/** What a person marked with a heart: the songs, the albums and the artists, newest first. A part with nothing is not shown. */
-export default function FavoritesPage() {
- const { t } = useTranslation()
- const tracks = usePagedList
('/me/favorites/tracks', {})
- const albums = usePagedList('/me/favorites/albums', {})
- const artists = usePagedList('/me/favorites/artists', {})
- const all = [tracks, albums, artists]
- const failed = all.find((q) => q.isError)
- const empty = all.every((q) => q.data?.total === 0)
-
- return (
-
-
{t('nav.favorites')}
- {failed ? (
-
all.forEach((q) => q.isError && void q.refetch())} />
- ) : all.some((q) => q.isPending) ? (
-
- ) : empty ? (
- {t('favorites.none')}
- ) : (
- <>
- {(tracks.data?.total ?? 0) > 0 && (
-
- )}
- {(albums.data?.total ?? 0) > 0 && (
-
-
- {(albums.data?.items ?? []).map((album) => (
-
-
-
- ))}
-
-
-
- )}
- {(artists.data?.total ?? 0) > 0 && (
-
-
- {(artists.data?.items ?? []).map((artist) => (
-
-
-
- ))}
-
-
-
- )}
- >
- )}
-
- )
-}
diff --git a/web/src/pages/FriendPage.test.tsx b/web/src/pages/FriendPage.test.tsx
deleted file mode 100644
index e64920f..0000000
--- a/web/src/pages/FriendPage.test.tsx
+++ /dev/null
@@ -1,195 +0,0 @@
-import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
-import { render, screen, waitFor, within } from '@testing-library/react'
-import userEvent from '@testing-library/user-event'
-import { createMemoryRouter, RouterProvider } from 'react-router-dom'
-import { beforeEach, expect, test, vi } from 'vitest'
-import { initI18n } from '@/i18n'
-import { usePlayer } from '@/player/store'
-import { apiError, mockFetch, type MockRoutes } from '@/test/mockFetch'
-import FriendPage from './FriendPage'
-
-const artist = (id: number, name: string, albums = 1, tracks = 3) => ({ id, name, album_count: albums, track_count: tracks })
-const album = (id: number, title: string, by = 'Shared Band') => ({
- id, title, artist: { id: 1, name: by }, track_count: 10, duration_ms: 2_400_000,
-})
-const track = (id: number, title: string) => ({
- id, title, duration_ms: 195_000, track_no: id, disc_no: 1, album: { id: 7, title: 'Shared Album' }, artists: [{ id: 1, name: 'Shared Band' }], format: 'mp3',
-})
-const page = (items: T[], total = items.length, offset = 0) => ({ items, total, limit: 50, offset })
-
-function routes(over: MockRoutes = {}): MockRoutes {
- return {
- 'GET /api/v1/friends': () => ({ friends: [{ id: 3, name: 'Anna' }] }),
- 'GET /api/v1/friends/3/artists': () => page([artist(1, 'Shared Band', 2, 12), artist(2, 'Other Band', 1, 1)]),
- 'GET /api/v1/friends/3/albums': () => page([album(7, 'Shared Album')]),
- 'GET /api/v1/friends/3/tracks': () => page([track(1, 'Shared Song'), track(2, 'Second Song')]),
- ...over,
- }
-}
-
-function renderAt(url = '/friends/3') {
- const router = createMemoryRouter([{ path: '/friends/:friend', element: }], { initialEntries: [url] })
- const client = new QueryClient({ defaultOptions: { queries: { retry: false } } })
- render(
-
-
- ,
- )
- return router
-}
-
-beforeEach(async () => {
- vi.spyOn(navigator, 'language', 'get').mockReturnValue('en-US')
- await initI18n()
- usePlayer.setState({ queue: [], original: [], index: 0, playing: false, positionMs: 0, shuffle: false, repeat: 'off', playId: 0 })
-})
-
-test('it is headed with the name of the friend and says whose music this is', async () => {
- mockFetch(routes())
- renderAt()
- expect(await screen.findByRole('heading', { level: 1, name: 'Music of Anna' })).toBeInTheDocument()
- expect(screen.getByText(/Anna’s server shares this music/)).toBeInTheDocument()
-})
-
-test('it opens on the artists, with how much each has', async () => {
- mockFetch(routes())
- renderAt()
- expect(await screen.findByRole('tab', { name: 'Artists', selected: true })).toBeInTheDocument()
- const item = (await screen.findByText('Shared Band')).closest('li') as HTMLElement
- expect(item).toHaveTextContent('2 albums')
- expect(item).toHaveTextContent('12 songs')
- expect(screen.getByText('Other Band')).toBeInTheDocument()
-})
-
-test('an artist leads to its albums, and an album to its songs, with what was chosen said', async () => {
- const user = userEvent.setup()
- const { calls } = mockFetch(routes())
- renderAt()
- await user.click(await screen.findByRole('button', { name: /Shared Band/ }))
- expect(await screen.findByRole('tab', { name: 'Albums', selected: true })).toBeInTheDocument()
- expect(await screen.findByText('Shared Album')).toBeInTheDocument()
- expect(screen.getByText('Albums of Shared Band')).toBeInTheDocument()
- expect(calls.find((c) => c.key === 'GET /api/v1/friends/3/albums')?.url.searchParams.get('artist_id')).toBe('1')
-
- await user.click(screen.getByRole('button', { name: /Shared Album/ }))
- expect(await screen.findByRole('tab', { name: 'Songs', selected: true })).toBeInTheDocument()
- expect(await screen.findByText('Shared Song')).toBeInTheDocument()
- expect(screen.getByText('Songs of Shared Album')).toBeInTheDocument()
- expect(calls.filter((c) => c.key === 'GET /api/v1/friends/3/tracks').at(-1)?.url.searchParams.get('album_id')).toBe('7')
-})
-
-test('a song shows its length and its artists', async () => {
- mockFetch(routes())
- renderAt('/friends/3?tab=songs')
- const row = (await screen.findByText('Shared Song')).closest('li') as HTMLElement
- expect(row).toHaveTextContent('3:15')
- expect(row).toHaveTextContent('Shared Band')
-})
-
-test('the tabs are chosen with the keyboard and a click, and the choice stays in the address', async () => {
- const user = userEvent.setup()
- mockFetch(routes())
- const router = renderAt()
- await user.click(await screen.findByRole('tab', { name: 'Songs' }))
- expect(await screen.findByText('Shared Song')).toBeInTheDocument()
- expect(router.state.location.search).toContain('tab=songs')
- screen.getByRole('tab', { name: 'Songs' }).focus()
- await user.keyboard('{ArrowLeft}')
- expect(await screen.findByRole('tab', { name: 'Albums', selected: true })).toBeInTheDocument()
-})
-
-test('a search asks the friend once typing stops, and is kept in the address', async () => {
- const user = userEvent.setup()
- const { calls } = mockFetch(routes())
- const router = renderAt()
- await screen.findByText('Shared Band')
- await user.type(screen.getByRole('searchbox', { name: 'Search the music of Anna' }), 'other')
- await waitFor(() => expect(calls.filter((c) => c.key === 'GET /api/v1/friends/3/artists').some((c) => c.url.searchParams.get('q') === 'other')).toBe(true))
- expect(router.state.location.search).toContain('q=other')
- // Not once for each letter.
- expect(calls.filter((c) => c.key === 'GET /api/v1/friends/3/artists' && c.url.searchParams.get('q')).length).toBe(1)
-})
-
-test('more of a long list is one click away', async () => {
- const user = userEvent.setup()
- const { calls } = mockFetch(
- routes({
- 'GET /api/v1/friends/3/artists': ({ url }) => {
- const offset = Number(url.searchParams.get('offset') ?? 0)
- return offset === 0 ? page([artist(1, 'First Band')], 2, 0) : page([artist(2, 'Second Band')], 2, 1)
- },
- }),
- )
- renderAt()
- await screen.findByText('First Band')
- await user.click(screen.getByRole('button', { name: 'Show more' }))
- expect(await screen.findByText('Second Band')).toBeInTheDocument()
- expect(calls.filter((c) => c.key === 'GET /api/v1/friends/3/artists').map((c) => c.url.searchParams.get('offset'))).toEqual(['0', '1'])
-})
-
-test('a friend that shares nothing says so', async () => {
- mockFetch(routes({ 'GET /api/v1/friends/3/artists': () => page([]) }))
- renderAt()
- expect(await screen.findByText('Anna has not shared anything yet.')).toBeInTheDocument()
-})
-
-test('a search that finds nothing says what was searched for', async () => {
- mockFetch(routes({ 'GET /api/v1/friends/3/artists': () => page([]) }))
- renderAt('/friends/3?q=zzz')
- expect(await screen.findByText('Nothing matches “zzz”.')).toBeInTheDocument()
-})
-
-test.each([
- ['friend_unreachable', 502, 'Anna could not be reached. Try again later.'],
- ['friend_gone', 409, 'Anna no longer takes this server for a friend. An admin can tell you more.'],
- ['friend_busy', 429, 'Anna is busy. Try again in a moment.'],
- ['friend_not_found', 404, 'This friend is not there any more.'],
-])('a friend that answers %s is said in words, with a way to try again', async (code, status, text) => {
- mockFetch(routes({ 'GET /api/v1/friends/3/artists': () => apiError(status, code) }))
- renderAt()
- const alert = await screen.findByRole('alert')
- expect(alert).toHaveTextContent(text)
- expect(within(alert).getByRole('button', { name: 'Try again' })).toBeInTheDocument()
-})
-
-test('a friend that is not in the list is not there', async () => {
- mockFetch(routes({ 'GET /api/v1/friends': () => ({ friends: [] }) }))
- renderAt()
- expect(await screen.findByText('This friend is not there any more.')).toBeInTheDocument()
-})
-
-test('a song of a friend plays when it is clicked, with the rest of the page after it, as the friend’s tracks', async () => {
- const user = userEvent.setup()
- mockFetch(routes())
- renderAt('/friends/3?tab=songs')
- await user.click(await screen.findByRole('button', { name: /Second Song/ }))
- const state = usePlayer.getState()
- expect(state.playing).toBe(true)
- expect(state.index).toBe(1)
- expect(state.queue.map((t) => [t.id, t.friend])).toEqual([[1, 3], [2, 3]])
- expect(screen.getByRole('button', { name: /Second Song/ })).toHaveAttribute('aria-current', 'true')
- expect(screen.getByRole('button', { name: /Shared Song/ })).not.toHaveAttribute('aria-current')
-})
-
-test('a local song with the same id is not the one that is marked as playing', async () => {
- mockFetch(routes())
- usePlayer.getState().playTracks([{ ...track(2, 'Local'), album: null, artists: [] }])
- renderAt('/friends/3?tab=songs')
- expect(await screen.findByRole('button', { name: /Second Song/ })).not.toHaveAttribute('aria-current')
-})
-
-test('the albums of a friend show their covers from this server’s route for that friend', async () => {
- mockFetch(routes())
- renderAt('/friends/3?tab=albums')
- const row = (await screen.findByText('Shared Album')).closest('li') as HTMLElement
- expect(row.querySelector('img')!.getAttribute('src')).toContain('/api/v1/friends/3/albums/7/cover')
-})
-
-test('the page of a friend has a band in the friend colour on top, and its tabs are underlined in that colour', async () => {
- mockFetch(routes())
- renderAt()
- await screen.findByRole('heading', { level: 1, name: 'Music of Anna' })
- expect(document.querySelector('[data-friend-band]')).toHaveClass('bg-friend')
- expect(screen.getByRole('tab', { name: 'Artists', selected: true })).toHaveClass('border-friend')
- expect(screen.getByRole('tab', { name: 'Albums' })).toHaveClass('border-transparent')
-})
diff --git a/web/src/pages/FriendPage.tsx b/web/src/pages/FriendPage.tsx
deleted file mode 100644
index ba7e129..0000000
--- a/web/src/pages/FriendPage.tsx
+++ /dev/null
@@ -1,231 +0,0 @@
-import { useEffect, useRef, useState, type KeyboardEvent } from 'react'
-import { useTranslation } from 'react-i18next'
-import { useParams, useSearchParams } from 'react-router-dom'
-import { ApiError } from '@/api/client'
-import { useFriendAlbums, useFriendArtists, useFriends, useFriendTracks } from '@/api/friends'
-import Cover from '@/components/Cover'
-import LoadMore from '@/components/LoadMore'
-import { EmptyMessage, ErrorMessage, Loading } from '@/components/Status'
-import { Button } from '@/components/ui/button'
-import TrackRow from '@/components/TrackRow'
-import { Input } from '@/components/ui/input'
-import { formatTime } from '@/lib/time'
-import { trackKey } from '@/player/media'
-import { currentTrack, usePlayer } from '@/player/store'
-import { cn } from '@/lib/utils'
-import PageTitle from '@/components/PageTitle'
-
-const TABS = ['artists', 'albums', 'songs'] as const
-type Tab = (typeof TABS)[number]
-
-/** Wait this long after the last keystroke before asking the friend. */
-const DEBOUNCE_MS = 250
-/** What the friend's server accepts as search text. */
-const MAX_QUERY_LENGTH = 200
-
-const parseTab = (value: string | null): Tab => TABS.find((tab) => tab === value) ?? 'artists'
-const parseId = (value: string | null): number | undefined => {
- const n = Number(value)
- return Number.isInteger(n) && n > 0 ? n : undefined
-}
-
-/** What went wrong with a friend, in words that name it. Anything not about a friend gets the usual text. */
-function FriendError({ error, name, onRetry }: { error: unknown; name: string; onRetry(): void }) {
- const { t, i18n } = useTranslation()
- const code = error instanceof ApiError ? error.code : ''
- const key = `friends.errors.${code}`
- if (!i18n.exists(key)) return
- return (
-
-
{t(key, { name })}
-
- {t('common.retry')}
-
-
- )
-}
-
-const rowClass = 'flex min-h-14 w-full items-center gap-3 rounded-lg px-4 py-2 text-left'
-
-/**
- * The music of one friend: its artists, albums and songs, and a search. Everything is asked of the friend's server
- * when a page is opened, through this one, and nothing is kept. The ids are the friend's own: an artist leads to
- * its albums, and an album to its songs, by those.
- */
-export default function FriendPage() {
- const { t } = useTranslation()
- const { friend: friendParam } = useParams()
- const friendId = Number(friendParam)
- const friends = useFriends()
- const [params, setParams] = useSearchParams()
- const tab = parseTab(params.get('tab'))
- const artistId = parseId(params.get('artist'))
- const albumId = parseId(params.get('album'))
- const of = params.get('of') ?? ''
- const [text, setText] = useState(params.get('q') ?? '')
- const q = Array.from(text.trim()).slice(0, MAX_QUERY_LENGTH).join('')
- const buttons = useRef>({})
- const playTracks = usePlayer((st) => st.playTracks)
- const playingKey = usePlayer((st) => {
- const now = currentTrack(st)
- return now ? trackKey(now) : null
- })
-
- // The search is kept in the address, but only once typing stops: the friend is asked once, not for every letter.
- const [typed, setTyped] = useState(q)
- useEffect(() => {
- const timer = setTimeout(() => setTyped(q), DEBOUNCE_MS)
- return () => clearTimeout(timer)
- }, [q])
- useEffect(() => {
- setParams(
- (prev) => {
- const next = new URLSearchParams(prev)
- if (typed) next.set('q', typed)
- else next.delete('q')
- return next
- },
- { replace: true },
- )
- }, [typed, setParams])
-
- const found = friends.data?.find((f) => f.id === friendId)
- const name = found?.name ?? ''
- const ready = found !== undefined
- const artists = useFriendArtists(friendId, typed, { enabled: ready && tab === 'artists' })
- const albums = useFriendAlbums(friendId, { q: typed, artistId }, { enabled: ready && tab === 'albums' })
- const songs = useFriendTracks(friendId, { q: typed, artistId, albumId }, { enabled: ready && tab === 'songs' })
- const query = tab === 'artists' ? artists : tab === 'albums' ? albums : songs
-
- function go(next: Record) {
- setText('')
- setTyped('')
- setParams(next)
- }
-
- function onKeyDown(event: KeyboardEvent) {
- const step = event.key === 'ArrowRight' ? 1 : event.key === 'ArrowLeft' ? -1 : 0
- if (step === 0) return
- event.preventDefault()
- const next = TABS[(TABS.indexOf(tab) + step + TABS.length) % TABS.length]
- go(next === 'artists' ? {} : { tab: next })
- buttons.current[next]?.focus()
- }
-
- if (friends.isError) return void friends.refetch()} />
- if (friends.isPending) return
- if (!ready) return {t('friends.errors.friend_not_found')}
-
- const items = query.data?.items ?? []
- const filter = tab === 'albums' && artistId ? t('friends.albumsOf', { name: of }) : tab === 'songs' && (albumId || artistId) ? t('friends.songsOf', { name: of }) : ''
-
- return (
-
- {/* What comes from elsewhere is marked at the top of the page, in its colour. */}
-
-
-
{t('friends.musicOf', { name })}
-
{t('friends.whose', { name })}
-
-
-
-
- {t('friends.searchLabel', { name })}
-
- setText(e.target.value)}
- />
-
-
-
- {TABS.map((id) => (
- {
- buttons.current[id] = el
- }}
- type="button"
- role="tab"
- id={`friend-tab-${id}`}
- aria-selected={tab === id}
- aria-controls="friend-panel"
- tabIndex={tab === id ? 0 : -1}
- onClick={() => go(id === 'artists' ? {} : { tab: id })}
- className={cn(
- '-mb-px min-h-12 border-b-[3px] px-4 font-semibold focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',
- tab === id ? 'border-friend text-foreground' : 'border-transparent text-muted-foreground hover:text-foreground',
- )}
- >
- {t(`friends.tabs.${id}`)}
-
- ))}
-
-
-
- {filter && (
-
-
{filter}
-
go({ tab })}>
- {t('friends.showAll')}
-
-
- )}
- {query.isError ? (
-
void query.refetch()} />
- ) : query.isPending ? (
-
- ) : items.length === 0 ? (
- {typed ? t('empty.noMatch', { q: typed }) : t('friends.nothing', { name })}
- ) : (
- <>
-
- {tab === 'artists' &&
- artists.data?.items.map((a) => (
-
- go({ tab: 'albums', artist: String(a.id), of: a.name })}>
- {a.name}
-
- {t('friends.albumCount', { count: a.album_count })} · {t('friends.songCount', { count: a.track_count })}
-
-
-
- ))}
- {tab === 'albums' &&
- albums.data?.items.map((a) => (
-
- go({ tab: 'songs', album: String(a.id), of: a.title })}>
-
-
- {a.title}
- {a.artist?.name ?? '—'}
-
-
- {t('friends.songCount', { count: a.track_count })} · {formatTime(a.duration_ms)}
-
-
-
- ))}
- {tab === 'songs' &&
- songs.data?.items.map((song, i) => (
-
- playTracks((songs.data?.items ?? []).map((x) => ({ ...x, friend: friendId })), i)}
- />
-
- ))}
-
-
- >
- )}
-
-
- )
-}
diff --git a/web/src/pages/FriendsPage.test.tsx b/web/src/pages/FriendsPage.test.tsx
deleted file mode 100644
index 3c23c3b..0000000
--- a/web/src/pages/FriendsPage.test.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
-import { render, screen, within } from '@testing-library/react'
-import { MemoryRouter } from 'react-router-dom'
-import { beforeEach, expect, test, vi } from 'vitest'
-import { initI18n } from '@/i18n'
-import { apiError, mockFetch } from '@/test/mockFetch'
-import FriendsPage from './FriendsPage'
-
-function renderPage() {
- const client = new QueryClient({ defaultOptions: { queries: { retry: false } } })
- return render(
-
-
-
-
- ,
- )
-}
-
-beforeEach(async () => {
- vi.spyOn(navigator, 'language', 'get').mockReturnValue('en-US')
- await initI18n()
-})
-
-test('each friend is a link to its music, by name', async () => {
- mockFetch({ 'GET /api/v1/friends': () => ({ friends: [{ id: 3, name: 'Anna' }, { id: 5, name: 'Bruno' }] }) })
- renderPage()
- expect(await screen.findByRole('heading', { level: 1, name: 'Friends' })).toBeInTheDocument()
- const list = within(await screen.findByRole('list'))
- expect(list.getByRole('link', { name: 'Anna' })).toHaveAttribute('href', '/friends/3')
- expect(list.getByRole('link', { name: 'Bruno' })).toHaveAttribute('href', '/friends/5')
-})
-
-test('it says what a friend is, so nobody wonders whose music this is', async () => {
- mockFetch({ 'GET /api/v1/friends': () => ({ friends: [{ id: 3, name: 'Anna' }] }) })
- renderPage()
- expect(await screen.findByText(/Music that the admin of another Sonda server shares/)).toBeInTheDocument()
-})
-
-test('with no friend it says where friends are made', async () => {
- mockFetch({ 'GET /api/v1/friends': () => ({ friends: [] }) })
- renderPage()
- expect(await screen.findByText(/no friends yet/i)).toBeInTheDocument()
-})
-
-test('a failure to read them is said in words with a way to try again', async () => {
- mockFetch({ 'GET /api/v1/friends': () => apiError(500, 'internal') })
- renderPage()
- const alert = await screen.findByRole('alert')
- expect(within(alert).getByRole('button', { name: 'Try again' })).toBeInTheDocument()
-})
diff --git a/web/src/pages/FriendsPage.tsx b/web/src/pages/FriendsPage.tsx
deleted file mode 100644
index 7815000..0000000
--- a/web/src/pages/FriendsPage.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import { useTranslation } from 'react-i18next'
-import { Link } from 'react-router-dom'
-import { useFriends } from '@/api/friends'
-import { EmptyMessage, ErrorMessage, Loading } from '@/components/Status'
-import PageTitle from '@/components/PageTitle'
-
-/** The friends whose music can be browsed. Each is a way into the music that another Sonda server shares. */
-export default function FriendsPage() {
- const { t } = useTranslation()
- const friends = useFriends()
-
- return (
-
-
{t('friends.title')}
-
{t('friends.intro')}
- {friends.isError ? (
-
void friends.refetch()} />
- ) : friends.isPending ? (
-
- ) : friends.data.length === 0 ? (
- {t('friends.noneYet')}
- ) : (
-
- {friends.data.map((friend) => (
-
-
- {friend.name}
-
-
- ))}
-
- )}
-
- )
-}
diff --git a/web/src/pages/HistoryPage.test.tsx b/web/src/pages/HistoryPage.test.tsx
deleted file mode 100644
index a80ecf6..0000000
--- a/web/src/pages/HistoryPage.test.tsx
+++ /dev/null
@@ -1,156 +0,0 @@
-import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
-import { render, screen, within } from '@testing-library/react'
-import userEvent from '@testing-library/user-event'
-import { MemoryRouter, useLocation } from 'react-router-dom'
-import { beforeEach, expect, test, vi } from 'vitest'
-import { initI18n } from '@/i18n'
-import { apiError, mockFetch, type MockRoutes } from '@/test/mockFetch'
-import HistoryPage from './HistoryPage'
-
-beforeEach(async () => {
- vi.spyOn(navigator, 'language', 'get').mockReturnValue('en-US')
- await initI18n()
-})
-
-const months = [
- { year: 2026, month: 3, plays: 5 },
- { year: 2026, month: 1, plays: 2 },
- { year: 2025, month: 12, plays: 9 },
-]
-
-// Mid-month and mid-day, so the zone of the machine running the tests does not move a listen to another day.
-const listen = (id: number, at: string, title: string, artists: [number, string][]) => ({
- id,
- track: { id: id + 100, title, artists: artists.map(([aid, name]) => ({ id: aid, name })) },
- event_type: 'complete',
- occurred_at: at,
- duration_played_ms: 1000,
- counted: true,
-})
-
-const march = [
- listen(3, '2026-03-16T13:30:00Z', 'Karma Police', [[1, 'Radiohead']]),
- listen(2, '2026-03-16T12:00:00Z', 'Debaser', [[2, 'Pixies'], [3, 'Frank Black']]),
- listen(1, '2026-03-10T12:00:00Z', 'Song 2', [[4, 'Blur']]),
-]
-
-const page = (items: object[], total = items.length) => ({ items, total, limit: 100, offset: 0 })
-
-function Where() {
- const l = useLocation()
- return {l.pathname + l.search}
-}
-
-function setup(routes: MockRoutes = {}, at = '/history') {
- const mocked = mockFetch({
- 'GET /api/v1/listens/months': () => ({ months }),
- 'GET /api/v1/listens': () => page(march),
- ...routes,
- })
- const client = new QueryClient({ defaultOptions: { queries: { retry: false } } })
- render(
-
-
-
-
-
- ,
- )
- return mocked
-}
-
-test('it opens on the latest month, with a button for each year and its listens a day at a time', async () => {
- const { calls } = setup()
- expect(screen.getByRole('heading', { level: 1, name: 'History' })).toBeInTheDocument()
- const years = await screen.findByRole('group', { name: 'Years' })
- expect(within(years).getByRole('button', { name: /2026/ })).toHaveAttribute('aria-pressed', 'true')
- expect(within(years).getByRole('button', { name: /2026/ })).toHaveTextContent('7') // 5 + 2
- expect(within(years).getByRole('button', { name: /2025/ })).toHaveAttribute('aria-pressed', 'false')
-
- const month = await screen.findByRole('region', { name: 'March 2026' })
- expect(within(month).getByText('5 listens')).toBeInTheDocument()
- expect(await within(month).findByText('Karma Police')).toBeInTheDocument()
- expect(within(month).getByRole('link', { name: 'Frank Black' })).toHaveAttribute('href', '/artists/3')
- expect(within(month).getAllByRole('region').map((r) => r.getAttribute('aria-label'))).toEqual(['Monday, March 16, 2026', 'Tuesday, March 10, 2026'])
-
- const asked = calls.find((c) => c.key === 'GET /api/v1/listens')!
- expect(asked.url.searchParams.get('counted')).toBe('true')
- expect(asked.url.searchParams.get('from')).toBe(new Date(2026, 2, 1).toISOString())
- expect(asked.url.searchParams.get('until')).toBe(new Date(2026, 3, 1).toISOString())
- const zone = calls.find((c) => c.key === 'GET /api/v1/listens/months')!
- expect(zone.url.searchParams.get('tz')).toBe(Intl.DateTimeFormat().resolvedOptions().timeZone)
-})
-
-test('the months of the year are buttons, and one with no listens is off', async () => {
- setup()
- const group = await screen.findByRole('group', { name: 'Months of 2026' })
- expect(within(group).getByRole('button', { name: 'Mar: 5 listens' })).toHaveAttribute('aria-pressed', 'true')
- expect(within(group).getByRole('button', { name: 'Feb: 0 listens' })).toBeDisabled()
- expect(within(group).getAllByRole('button')).toHaveLength(12)
-})
-
-test('a month with one listen says listen, not listens', async () => {
- setup({ 'GET /api/v1/listens/months': () => ({ months: [{ year: 2026, month: 3, plays: 1 }] }) })
- expect(await screen.findByRole('button', { name: 'Mar: 1 listen' })).toBeInTheDocument()
-})
-
-test('choosing a month or a year changes the address and reads its listens', async () => {
- const { calls } = setup({
- 'GET /api/v1/listens': ({ url }) => (url.searchParams.get('from') === new Date(2026, 0, 1).toISOString() ? page([listen(9, '2026-01-15T12:00:00Z', 'Nancy Boy', [[5, 'Placebo']])]) : page(march)),
- })
- await userEvent.click(await screen.findByRole('button', { name: 'Jan: 2 listens' }))
- expect(screen.getByTestId('where')).toHaveTextContent('/history?year=2026&month=1')
- expect(await screen.findByText('Nancy Boy')).toBeInTheDocument()
- expect(calls.filter((c) => c.key === 'GET /api/v1/listens')).toHaveLength(2)
-
- await userEvent.click(screen.getByRole('button', { name: /2025/ }))
- expect(screen.getByTestId('where')).toHaveTextContent('/history?year=2025')
- expect(await screen.findByRole('region', { name: 'December 2025' })).toBeInTheDocument()
-})
-
-test('the address says which year and month, and a bad one is ignored', async () => {
- setup({}, '/history?year=2025&month=12')
- expect(await screen.findByRole('region', { name: 'December 2025' })).toBeInTheDocument()
- expect(screen.getByRole('button', { name: /2025/ })).toHaveAttribute('aria-pressed', 'true')
-})
-
-test('a year or month that does not exist falls back to the latest', async () => {
- setup({}, '/history?year=1999&month=13')
- expect(await screen.findByRole('region', { name: 'March 2026' })).toBeInTheDocument()
-})
-
-test('a month longer than a page has a button for the next one', async () => {
- const { calls } = setup({
- 'GET /api/v1/listens': ({ url }) =>
- url.searchParams.get('offset') === '0' ? { items: [march[0]], total: 2, limit: 100, offset: 0 } : { items: [march[1]], total: 2, limit: 100, offset: 1 },
- })
- await screen.findByText('Karma Police')
- await userEvent.click(screen.getByRole('button', { name: 'Show more' }))
- expect(await screen.findByText('Debaser')).toBeInTheDocument()
- expect(screen.queryByRole('button', { name: 'Show more' })).not.toBeInTheDocument()
- expect(calls.filter((c) => c.key === 'GET /api/v1/listens')).toHaveLength(2)
-})
-
-test('with no listens at all it says where they come from', async () => {
- setup({ 'GET /api/v1/listens/months': () => ({ months: [] }) })
- expect(await screen.findByText(/You have no listens yet/)).toBeInTheDocument()
- expect(screen.getByRole('link', { name: 'Import your history from Spotify' })).toHaveAttribute('href', '/import')
-})
-
-test('a month that cannot be read has a way to try again', async () => {
- let fail = true
- setup({ 'GET /api/v1/listens': () => (fail ? apiError(500, 'internal', 'x') : page(march)) })
- const retry = await screen.findByRole('button', { name: 'Try again' })
- fail = false
- await userEvent.click(retry)
- expect(await screen.findByText('Karma Police')).toBeInTheDocument()
-})
-
-test('months that cannot be read have a way to try again', async () => {
- let fail = true
- setup({ 'GET /api/v1/listens/months': () => (fail ? apiError(500, 'internal', 'x') : { months }) })
- const retry = await screen.findByRole('button', { name: 'Try again' })
- fail = false
- await userEvent.click(retry)
- expect(await screen.findByRole('group', { name: 'Years' })).toBeInTheDocument()
-})
diff --git a/web/src/pages/HistoryPage.tsx b/web/src/pages/HistoryPage.tsx
deleted file mode 100644
index 73a5da0..0000000
--- a/web/src/pages/HistoryPage.tsx
+++ /dev/null
@@ -1,168 +0,0 @@
-import { useTranslation } from 'react-i18next'
-import { Link, useSearchParams } from 'react-router-dom'
-import { useListenMonths, useMonthListens, type ListenItem, type ListenMonth } from '@/api/history'
-import PageTitle from '@/components/PageTitle'
-import { EmptyMessage, ErrorMessage, Loading } from '@/components/Status'
-import { Button } from '@/components/ui/button'
-import { cn } from '@/lib/utils'
-
-const number = (value: string | null) => {
- const n = Number(value)
- return Number.isInteger(n) && n > 0 ? n : null
-}
-
-/** One day of listens: the day in words, and each listen with its time, its song and its artists. */
-function Day({ day, items }: { day: Date; items: ListenItem[] }) {
- const { i18n } = useTranslation()
- const date = new Intl.DateTimeFormat(i18n.language, { dateStyle: 'full' }).format(day)
- const time = new Intl.DateTimeFormat(i18n.language, { timeStyle: 'short' })
- return (
-
- {date}
-
- {items.map((it) => (
-
- {time.format(new Date(it.occurred_at))}
- {it.track.title}
-
- {it.track.artists.map((a, i) => (
-
- {i > 0 && ', '}
-
- {a.name}
-
-
- ))}
-
-
- ))}
-
-
- )
-}
-
-/** The listens of one month, a day at a time, with a button for the next page. */
-function MonthList({ month }: { month: ListenMonth }) {
- const { t } = useTranslation()
- const list = useMonthListens(month)
- if (list.isError) return void list.refetch()} />
- if (list.isPending) return
- if (list.data.items.length === 0) return {t('history.noneMonth')}
-
- const days: { day: Date; items: ListenItem[] }[] = []
- for (const it of list.data.items) {
- const at = new Date(it.occurred_at)
- const last = days[days.length - 1]
- if (last && last.day.toDateString() === at.toDateString()) last.items.push(it)
- else days.push({ day: at, items: [it] })
- }
- return (
-
- {days.map((d) => (
-
- ))}
- {list.hasNextPage && (
- void list.fetchNextPage()}>
- {t('common.showMore')}
-
- )}
-
- )
-}
-
-/**
- * What you listened to, by year and by month: a button for each year with its plays, the months of the chosen year
- * as bars, and the listens of the chosen month a day at a time. The choice is in the address.
- */
-export default function HistoryPage() {
- const { t, i18n } = useTranslation()
- const [params, setParams] = useSearchParams()
- const months = useListenMonths()
-
- const all = months.data ?? []
- const years = [...new Set(all.map((m) => m.year))]
- const year = years.includes(number(params.get('year')) ?? 0) ? (number(params.get('year')) as number) : years[0]
- const ofYear = all.filter((m) => m.year === year)
- const chosen = ofYear.find((m) => m.month === number(params.get('month'))) ?? ofYear[0] ?? null
- const biggest = Math.max(1, ...ofYear.map((m) => m.plays))
- const monthName = new Intl.DateTimeFormat(i18n.language, { month: 'short' })
- const monthLong = new Intl.DateTimeFormat(i18n.language, { month: 'long', year: 'numeric' })
-
- function choose(next: { year: number; month?: number }) {
- setParams(next.month ? { year: String(next.year), month: String(next.month) } : { year: String(next.year) })
- }
-
- return (
-
-
{t('nav.history')}
-
- {months.isError ? (
-
void months.refetch()} />
- ) : months.isPending ? (
-
- ) : all.length === 0 ? (
-
- {t('history.none')}
-
- {t('history.import')}
-
-
- ) : (
- <>
-
- {years.map((y) => {
- const total = all.filter((m) => m.year === y).reduce((sum, m) => sum + m.plays, 0)
- return (
- choose({ year: y })}>
- {y}
- {total}
-
- )
- })}
-
-
-
- {Array.from({ length: 12 }, (_, i) => i + 1).map((m) => {
- const found = ofYear.find((x) => x.month === m)
- const plays = found?.plays ?? 0
- const on = chosen?.month === m
- return (
- choose({ year, month: m })}
- className={cn(
- 'flex min-h-28 flex-col items-center justify-end gap-1 rounded-md border px-1 pb-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',
- on ? 'border-primary bg-card' : 'border-border',
- found ? 'hover:border-primary' : 'opacity-40',
- )}
- >
-
- {plays}
-
- 0 ? 4 : 0, (plays / biggest) * 56)}px` }} />
-
- {monthName.format(new Date(year, m - 1, 1))}
-
-
- )
- })}
-
-
- {chosen && (
-
-
- {monthLong.format(new Date(chosen.year, chosen.month - 1, 1))}
- {t('history.plays', { count: chosen.plays })}
-
-
-
- )}
- >
- )}
-
- )
-}
diff --git a/web/src/pages/HomePage.test.tsx b/web/src/pages/HomePage.test.tsx
index 7b9870a..ff67379 100644
--- a/web/src/pages/HomePage.test.tsx
+++ b/web/src/pages/HomePage.test.tsx
@@ -13,7 +13,7 @@ const page = (items: object[], total = items.length) => ({ items, total, limit:
const listen = (trackId: number, i = 0) => ({
id: 1000 + i,
- track: { id: trackId, title: `Song ${trackId}`, artists: [{ id: 5, name: 'Radiohead' }] },
+ track: { id: trackId, title: `Song ${trackId}` },
event_type: 'complete',
occurred_at: '2026-11-12T10:00:00Z',
duration_played_ms: 200_000,
@@ -81,7 +81,7 @@ test.each([
test('the history is asked for as counted listens, 30 at most', async () => {
const { calls } = mockFetch(routes())
renderHome()
- await screen.findByRole('button', { name: /^Song 1/ })
+ await screen.findByRole('button', { name: 'Song 1' })
const call = calls.find((c) => c.key === 'GET /api/v1/listens')!
expect(call.url.searchParams.get('counted')).toBe('true')
expect(call.url.searchParams.get('limit')).toBe('30')
@@ -100,13 +100,13 @@ test('at most six songs are shown, the most recent first', async () => {
renderHome()
const shelf = await screen.findByRole('region', { name: 'Recently played' })
const names = (await within(shelf).findAllByRole('button')).map((b) => b.textContent)
- expect(names).toEqual(['Song 1Radiohead', 'Song 2Radiohead', 'Song 3Radiohead', 'Song 4Radiohead', 'Song 5Radiohead', 'Song 6Radiohead'])
+ expect(names).toEqual(['Song 1', 'Song 2', 'Song 3', 'Song 4', 'Song 5', 'Song 6'])
})
test('a click on a recent song fetches it and plays it', async () => {
const { calls } = mockFetch(routes({ 'GET /api/v1/tracks/2': () => track(2) }))
renderHome()
- await userEvent.click(await screen.findByRole('button', { name: /^Song 2/ }))
+ await userEvent.click(await screen.findByRole('button', { name: 'Song 2' }))
await vi.waitFor(() => expect(usePlayer.getState().queue.map((t) => t.id)).toEqual([2]))
expect(usePlayer.getState().playing).toBe(true)
expect(calls.some((c) => c.key === 'GET /api/v1/tracks/2')).toBe(true)
@@ -115,7 +115,7 @@ test('a click on a recent song fetches it and plays it', async () => {
test('a recent song that is gone from the library says so and plays nothing', async () => {
mockFetch(routes({ 'GET /api/v1/tracks/2': () => apiError(404, 'track_not_found') }))
renderHome()
- await userEvent.click(await screen.findByRole('button', { name: /^Song 2/ }))
+ await userEvent.click(await screen.findByRole('button', { name: 'Song 2' }))
expect(await screen.findByText('That song is no longer in your library.')).toBeInTheDocument()
expect(usePlayer.getState().queue).toEqual([])
})
@@ -126,20 +126,10 @@ test('with no history it says to play something', async () => {
expect(await screen.findByText('Play something and it will show up here.')).toBeInTheDocument()
})
-test('the albums shelf is the albums added last, asked of the server newest first', async () => {
- const { calls } = mockFetch(routes())
- renderHome()
- await screen.findByRole('region', { name: 'Recently added' })
- expect(screen.queryByRole('region', { name: 'Albums' })).not.toBeInTheDocument()
- const asked = calls.filter((c) => c.key === 'GET /api/v1/albums').at(-1)!
- expect(asked.url.searchParams.get('sort')).toBe('recent')
- expect(asked.url.searchParams.get('limit')).toBe('10')
-})
-
test('albums and artists have their own shelves with links to their pages', async () => {
mockFetch(routes())
renderHome()
- const albums = await screen.findByRole('region', { name: 'Recently added' })
+ const albums = await screen.findByRole('region', { name: 'Albums' })
expect(await within(albums).findByRole('link', { name: /OK Computer/ })).toHaveAttribute('href', '/albums/9')
const artists = await screen.findByRole('region', { name: 'Artists' })
expect(await within(artists).findByRole('link', { name: /Radiohead/ })).toHaveAttribute('href', '/artists/5')
@@ -148,8 +138,8 @@ test('albums and artists have their own shelves with links to their pages', asyn
test('a shelf with more than ten items links to the whole list', async () => {
mockFetch(routes({ 'GET /api/v1/albums': () => page([album], 40) }))
renderHome()
- const albums = await screen.findByRole('region', { name: 'Recently added' })
- expect(await within(albums).findByRole('link', { name: 'See all' })).toHaveAttribute('href', '/albums?sort=recent')
+ const albums = await screen.findByRole('region', { name: 'Albums' })
+ expect(await within(albums).findByRole('link', { name: 'See all' })).toHaveAttribute('href', '/albums')
})
test('an empty library says so instead of showing empty shelves', async () => {
@@ -160,7 +150,7 @@ test('an empty library says so instead of showing empty shelves', async () => {
}))
renderHome()
expect(await screen.findByText(/Your library is empty/)).toBeInTheDocument()
- expect(screen.queryByRole('region', { name: 'Recently added' })).not.toBeInTheDocument()
+ expect(screen.queryByRole('region', { name: 'Albums' })).not.toBeInTheDocument()
})
test('when the history cannot be read the shelves of albums and artists still show', async () => {
@@ -169,29 +159,3 @@ test('when the history cannot be read the shelves of albums and artists still sh
expect(await screen.findByRole('link', { name: /OK Computer/ })).toBeInTheDocument()
expect(await screen.findByRole('alert')).toHaveTextContent('Something went wrong. Try again.')
})
-
-test('Home ends with a way to Discover, which has no tab on a phone and is hidden on a wide screen', async () => {
- mockFetch(routes())
- renderHome()
- const link = await screen.findByRole('link', { name: 'Discover' })
- expect(link).toHaveAttribute('href', '/discover')
- expect(link.closest('div.sm\\:hidden')).not.toBeNull()
-})
-
-test('an admin also has a way to the Requests, a person who is not does not', async () => {
- mockFetch(routes())
- renderHome()
- await screen.findByRole('link', { name: 'Discover' })
- expect(screen.queryByRole('link', { name: 'Requests' })).not.toBeInTheDocument()
- document.body.innerHTML = ''
- sessionStore.setState({ status: 'authenticated', user: { id: 1, email: 'tom@example.org', is_admin: true } })
- mockFetch(routes())
- renderHome()
- expect(await screen.findByRole('link', { name: 'Requests' })).toHaveAttribute('href', '/requests')
-})
-
-test('a recent song shows who made it under its title', async () => {
- mockFetch(routes({ 'GET /api/v1/listens': () => page([listen(1)]) }))
- renderHome()
- expect(await screen.findByRole('button', { name: /^Song 1\s*Radiohead$/ })).toBeInTheDocument()
-})
diff --git a/web/src/pages/HomePage.tsx b/web/src/pages/HomePage.tsx
index 7034d9f..79c601d 100644
--- a/web/src/pages/HomePage.tsx
+++ b/web/src/pages/HomePage.tsx
@@ -5,14 +5,11 @@ import { Link } from 'react-router-dom'
import { useAlbumList, useArtistList, type Track } from '@/api/catalog'
import { api, ApiError } from '@/api/client'
import { useRecentListens } from '@/api/listens'
-import { useSession } from '@/auth/session'
import { AlbumCard, ArtistCard, CARD_GRID } from '@/components/cards'
-import LinkRows from '@/components/LinkRows'
import Section from '@/components/Section'
import { EmptyMessage, ErrorMessage, Loading } from '@/components/Status'
import { errorMessageKey } from '@/i18n'
import { usePlayer } from '@/player/store'
-import PageTitle from '@/components/PageTitle'
/** How many recent songs, albums and artists the page shows. */
const RECENT = 6
@@ -26,11 +23,10 @@ function greetingKey(hour: number): string {
export default function HomePage() {
const { t } = useTranslation()
- const { user } = useSession()
const queryClient = useQueryClient()
const playTracks = usePlayer((s) => s.playTracks)
const history = useRecentListens()
- const albums = useAlbumList({ pageSize: SHELF, sort: 'recent' })
+ const albums = useAlbumList({ pageSize: SHELF })
const artists = useArtistList(undefined, { pageSize: SHELF })
const [playError, setPlayError] = useState(null)
// Read once per visit of the page: the greeting does not need to change while it is open.
@@ -59,7 +55,7 @@ export default function HomePage() {
return (
-
{t(greetingKey(hour))}
+
{t(greetingKey(hour))}
{libraryEmpty ? (
{t('home.emptyLibrary')}
@@ -79,14 +75,9 @@ export default function HomePage() {
play(track.id)}
- className="flex min-h-14 w-full items-center border-b border-border py-1 text-left hover:text-primary"
+ className="flex min-h-14 w-full items-center rounded-lg bg-secondary px-4 text-left font-bold hover:bg-accent"
>
-
- {track.title}
- {track.artists.length > 0 && (
- {track.artists.map((a) => a.name).join(', ')}
- )}
-
+ {track.title}
))}
@@ -103,7 +94,7 @@ export default function HomePage() {
albums.refetch()} />
) : (
albumItems.length > 0 && (
-
+
{albumItems.map((album) => (
@@ -112,7 +103,7 @@ export default function HomePage() {
))}
{(albums.data?.total ?? 0) > albumItems.length && (
-
+
{t('common.seeAll')}
)}
@@ -133,7 +124,7 @@ export default function HomePage() {
))}
{(artists.data?.total ?? 0) > artistItems.length && (
-
+
{t('common.seeAll')}
)}
@@ -142,11 +133,6 @@ export default function HomePage() {
)}
>
)}
-
- {/* On a phone Discover has no tab of its own: this is the way to it. */}
-
-
-
)
}
diff --git a/web/src/pages/ImportPage.test.tsx b/web/src/pages/ImportPage.test.tsx
deleted file mode 100644
index ab53c9f..0000000
--- a/web/src/pages/ImportPage.test.tsx
+++ /dev/null
@@ -1,81 +0,0 @@
-import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
-import { render, screen, within } from '@testing-library/react'
-import userEvent from '@testing-library/user-event'
-import { MemoryRouter } from 'react-router-dom'
-import { beforeEach, expect, test, vi } from 'vitest'
-import { initI18n } from '@/i18n'
-import { apiError, mockFetch, type MockRoutes } from '@/test/mockFetch'
-import ImportPage from './ImportPage'
-
-beforeEach(async () => {
- vi.spyOn(navigator, 'language', 'get').mockReturnValue('en-US')
- await initI18n()
-})
-
-const run = (id: number, imported: number, at: string) => ({
- id,
- created_at: at,
- history: { entries: imported + 5, matched: imported, imported, already_there: 0, not_found: 5, ignored: 0, kept_outside: 4 },
- playlists: [],
- missing: { total: 1, artists: [{ name: 'Blur', count: 5 }] },
-})
-
-function setup(routes: MockRoutes) {
- const mocked = mockFetch(routes)
- const client = new QueryClient({ defaultOptions: { queries: { retry: false }, mutations: { retry: false } } })
- render(
-
-
-
-
- ,
- )
- return mocked
-}
-
-test('the page has the form to import and the imports of the past, newest first', async () => {
- setup({
- 'GET /api/v1/me/import/spotify': () => ({ items: [run(2, 40, '2026-11-15T10:00:00Z'), run(1, 7, '2026-11-01T09:00:00Z')], total: 2, limit: 100, offset: 0 }),
- })
- expect(screen.getByRole('heading', { level: 1, name: 'Import' })).toBeInTheDocument()
- expect(screen.getByLabelText('Files from Spotify')).toBeInTheDocument()
-
- const past = await screen.findByRole('region', { name: 'Past imports' })
- const cards = await within(past).findAllByRole('article')
- expect(cards).toHaveLength(2)
- expect(within(cards[0]).getByText('40 listens added to your history.')).toBeInTheDocument()
- expect(within(cards[1]).getByText('7 listens added to your history.')).toBeInTheDocument()
-})
-
-test('with no import yet it says where they will be kept', async () => {
- setup({ 'GET /api/v1/me/import/spotify': () => ({ items: [], total: 0, limit: 100, offset: 0 }) })
- expect(await screen.findByText(/No import yet/)).toBeInTheDocument()
-})
-
-test('a list that cannot be read has a way to try again', async () => {
- let fail = true
- const { calls } = setup({
- 'GET /api/v1/me/import/spotify': () => (fail ? apiError(500, 'internal', 'x') : { items: [run(1, 3, '2026-11-01T09:00:00Z')], total: 1, limit: 100, offset: 0 }),
- })
- const retry = await screen.findByRole('button', { name: 'Try again' })
- fail = false
- await userEvent.click(retry)
- expect(await screen.findByText('3 listens added to your history.')).toBeInTheDocument()
- expect(calls.filter((c) => c.key === 'GET /api/v1/me/import/spotify').length).toBeGreaterThan(1)
-})
-
-test('an import that is done shows up in the list', async () => {
- let done = false
- setup({
- 'GET /api/v1/me/import/spotify': () => ({ items: done ? [run(1, 12, '2026-11-15T10:00:00Z')] : [], total: done ? 1 : 0, limit: 100, offset: 0 }),
- 'POST /api/v1/me/import/spotify': () => {
- done = true
- return run(1, 12, '2026-11-15T10:00:00Z')
- },
- })
- await screen.findByText(/No import yet/)
- await userEvent.upload(screen.getByLabelText('Files from Spotify'), new File(['PK'], 'my_spotify_data.zip'))
- await userEvent.click(screen.getByRole('button', { name: 'Import' }))
- expect(await screen.findByText('12 listens added to your history.')).toBeInTheDocument()
- expect(screen.queryByText(/No import yet/)).not.toBeInTheDocument()
-})
diff --git a/web/src/pages/ImportPage.tsx b/web/src/pages/ImportPage.tsx
deleted file mode 100644
index 5debb08..0000000
--- a/web/src/pages/ImportPage.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import { useTranslation } from 'react-i18next'
-import { useSpotifyImports } from '@/api/importSpotify'
-import ImportReportCard from '@/components/ImportReportCard'
-import PageTitle from '@/components/PageTitle'
-import Section from '@/components/Section'
-import SpotifyImportBlock from '@/components/SpotifyImportBlock'
-import { EmptyMessage, ErrorMessage, Loading } from '@/components/Status'
-
-/** Bringing music data in from elsewhere (for now Spotify), and what each import did, kept so it can be read again. */
-export default function ImportPage() {
- const { t } = useTranslation()
- const past = useSpotifyImports()
- return (
-
-
{t('nav.import')}
-
-
-
-
- {past.isError ? (
- void past.refetch()} />
- ) : past.isPending ? (
-
- ) : past.data.items.length === 0 ? (
- {t('import.none')}
- ) : (
-
- {past.data.items.map((report) => (
-
- ))}
-
- )}
-
-
- )
-}
diff --git a/web/src/pages/LibraryPage.test.tsx b/web/src/pages/LibraryPage.test.tsx
deleted file mode 100644
index 101a6d8..0000000
--- a/web/src/pages/LibraryPage.test.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import { render, screen, within } from '@testing-library/react'
-import { MemoryRouter } from 'react-router-dom'
-import { beforeEach, expect, test, vi } from 'vitest'
-import { sessionStore } from '@/auth/session'
-import { initI18n } from '@/i18n'
-import LibraryPage from './LibraryPage'
-import MorePage from './MorePage'
-
-beforeEach(async () => {
- vi.spyOn(navigator, 'language', 'get').mockReturnValue('en-US')
- await initI18n()
-})
-
-test('Library is a list of the places of the music, each a row that leads there', () => {
- render(
-
-
- ,
- )
- expect(screen.getByRole('heading', { level: 1, name: 'Library' })).toBeInTheDocument()
- const links = screen.getAllByRole('link').map((a) => [a.textContent, a.getAttribute('href')])
- // The same order as the menu of a wide screen: the music, then what you listened to. Discover is on Home.
- expect(links).toEqual([
- ['Artists', '/artists'],
- ['Albums', '/albums'],
- ['Songs', '/songs'],
- ['Favourites', '/favorites'],
- ['Playlists', '/playlists'],
- ['Smart playlists', '/smart-playlists'],
- ['Mixes', '/mixes'],
- ['Radio', '/radio'],
- ['History', '/history'],
- ['Statistics', '/stats'],
- ['Import', '/import'],
- ])
- expect(within(screen.getByRole('region', { name: 'Your listening' })).getAllByRole('link')).toHaveLength(3)
- expect(screen.queryByRole('link', { name: 'Discover' })).not.toBeInTheDocument()
-})
-
-test('More has Settings, and Admin only for an admin', () => {
- sessionStore.setState({ status: 'authenticated', user: { id: 1, email: 'ann@example.org', is_admin: false } })
- const { unmount } = render(
-
-
- ,
- )
- expect(screen.getByRole('heading', { level: 1, name: 'More' })).toBeInTheDocument()
- expect(screen.queryByRole('link', { name: 'Import' })).not.toBeInTheDocument()
- expect(screen.getByRole('link', { name: 'Settings' })).toHaveAttribute('href', '/settings')
- expect(screen.queryByRole('link', { name: 'Admin' })).not.toBeInTheDocument()
- unmount()
-
- sessionStore.setState({ status: 'authenticated', user: { id: 2, email: 'tom@example.org', is_admin: true } })
- render(
-
-
- ,
- )
- expect(screen.getByRole('link', { name: 'Admin' })).toHaveAttribute('href', '/admin')
-})
diff --git a/web/src/pages/LibraryPage.tsx b/web/src/pages/LibraryPage.tsx
deleted file mode 100644
index b1b7be9..0000000
--- a/web/src/pages/LibraryPage.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-import { useTranslation } from 'react-i18next'
-import LinkRows from '@/components/LinkRows'
-import PageTitle from '@/components/PageTitle'
-import Section from '@/components/Section'
-
-/** Where the music is, and what you listened to: one row for each way into it. It is the Library tab of the phone. */
-export default function LibraryPage() {
- const { t } = useTranslation()
- return (
-
-
{t('nav.library')}
-
-
-
- )
-}
diff --git a/web/src/pages/MixPage.tsx b/web/src/pages/MixPage.tsx
deleted file mode 100644
index 6108174..0000000
--- a/web/src/pages/MixPage.tsx
+++ /dev/null
@@ -1,96 +0,0 @@
-import { ListPlus, Play, Shuffle } from 'lucide-react'
-import { useState } from 'react'
-import { useTranslation } from 'react-i18next'
-import { Link, useParams } from 'react-router-dom'
-import { ApiError } from '@/api/client'
-import { useMix, useSaveMix } from '@/api/mixes'
-import MixCover from '@/components/MixCover'
-import { EmptyMessage, ErrorMessage, Loading } from '@/components/Status'
-import TrackList from '@/components/TrackList'
-import { Button } from '@/components/ui/button'
-import { errorMessageKey } from '@/i18n'
-import { formatTime } from '@/lib/time'
-import { usePlayer } from '@/player/store'
-import { mixTitle } from './mixTitle'
-
-export default function MixPage() {
- const id = useParams().id ?? ''
- // Another mix starts again from the mix of the day.
- return
-}
-
-function MixView({ id }: { id: string }) {
- const { t } = useTranslation()
- const [variant, setVariant] = useState(0)
- const query = useMix(id, variant)
- const save = useSaveMix()
- const playTracks = usePlayer((s) => s.playTracks)
-
- if (query.isError) {
- if (query.error instanceof ApiError && query.error.status === 404) return {t('mixes.notFound')}
- return query.refetch()} />
- }
- if (!query.data) return
- const mix = query.data
- const title = mixTitle(t, mix)
- const empty = mix.tracks.length === 0
- // The songs shown are still the old ones while the next come: nothing is kept or shuffled then.
- const waiting = query.isPlaceholderData
- const duration = mix.tracks.reduce((sum, track) => sum + track.duration_ms, 0)
-
- return (
-
-
-
-
-
{title}
- {mix.artists.length > 0 &&
{t('mixes.with', { artists: mix.artists.join(', ') })}
}
-
{t('playlists.meta', { count: mix.tracks.length, duration: formatTime(duration) })}
-
-
playTracks(mix.tracks, 0)}>
-
- {t('player.play')}
-
-
{
- save.reset()
- setVariant(variant + 1)
- }}
- >
-
- {t('mixes.shuffle')}
-
-
save.mutate({ id, name: title, variant: mix.variant })}
- >
-
- {t('mixes.save')}
-
-
-
-
-
- {save.isSuccess && (
-
- {t('mixes.saved', { name: save.data.name })}
-
- {t('mixes.open')}
-
-
- )}
- {save.isError && (
-
- {t(errorMessageKey(save.error instanceof ApiError ? save.error.code : 'unknown'))}
-
- )}
-
- {!empty &&
}
-
- )
-}
diff --git a/web/src/pages/MixesPage.tsx b/web/src/pages/MixesPage.tsx
deleted file mode 100644
index 5ace2e1..0000000
--- a/web/src/pages/MixesPage.tsx
+++ /dev/null
@@ -1,61 +0,0 @@
-import { useTranslation } from 'react-i18next'
-import { Link } from 'react-router-dom'
-import { useMixes, type Mix } from '@/api/mixes'
-import { TONES, toneOfText } from '@/components/tones'
-import Section from '@/components/Section'
-import { EmptyMessage, ErrorMessage, Loading } from '@/components/Status'
-import { mixTitle } from './mixTitle'
-import PageTitle from '@/components/PageTitle'
-
-/** Tiles are wide, a few in a row: the name needs room. */
-const TILES = 'grid grid-cols-[repeat(auto-fit,minmax(min(250px,100%),1fr))] gap-4'
-
-function MixCard({ mix }: { mix: Mix }) {
- const { t } = useTranslation()
- const tone = toneOfText(mix.id)
- return (
-
- {mixTitle(t, mix)}
- {t(mix.kind === 'genre' ? 'mixes.fromGenres' : 'mixes.fromListening')}
-
- )
-}
-
-/** The mixes made for me, the ones from my listening first, then one for each genre. */
-export default function MixesPage() {
- const { t } = useTranslation()
- const query = useMixes()
- const forYou = query.data?.filter((m) => m.kind !== 'genre') ?? []
- const genres = query.data?.filter((m) => m.kind === 'genre') ?? []
-
- return (
-
-
{t('nav.mixes')}
- {query.isError ? (
-
query.refetch()} />
- ) : query.isPending ? (
-
- ) : query.data.length === 0 ? (
- {t('mixes.empty')}
- ) : (
- <>
- {forYou.length > 0 && (
-
- {forYou.map((m) => )}
-
- )}
- {genres.length > 0 && (
-
- {genres.map((m) => )}
-
- )}
- >
- )}
-
- )
-}
diff --git a/web/src/pages/MorePage.tsx b/web/src/pages/MorePage.tsx
deleted file mode 100644
index 308e437..0000000
--- a/web/src/pages/MorePage.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import { useTranslation } from 'react-i18next'
-import { useSession } from '@/auth/session'
-import LinkRows from '@/components/LinkRows'
-import PageTitle from '@/components/PageTitle'
-
-/** What is left: the settings and, for an admin, the admin area. It is the More tab of the phone. */
-export default function MorePage() {
- const { t } = useTranslation()
- const { user } = useSession()
- const links = [{ to: '/settings', label: t('nav.settings') }]
- if (user?.is_admin) links.push({ to: '/admin', label: t('nav.admin') })
- return (
-
- )
-}
diff --git a/web/src/pages/NotFoundPage.tsx b/web/src/pages/NotFoundPage.tsx
index d734dfe..5e1a305 100644
--- a/web/src/pages/NotFoundPage.tsx
+++ b/web/src/pages/NotFoundPage.tsx
@@ -1,12 +1,11 @@
import { Link } from 'react-router-dom'
import { useTranslation } from 'react-i18next'
-import PageTitle from '@/components/PageTitle'
export default function NotFoundPage() {
const { t } = useTranslation()
return (
-
{t('common.notFound')}
+
{t('common.notFound')}
{t('common.backHome')}
diff --git a/web/src/pages/PlaylistPage.tsx b/web/src/pages/PlaylistPage.tsx
index 803577a..5fcdc06 100644
--- a/web/src/pages/PlaylistPage.tsx
+++ b/web/src/pages/PlaylistPage.tsx
@@ -13,10 +13,7 @@ import {
type Playlist,
type PlaylistItem,
} from '@/api/playlists'
-import FavoriteButton from '@/components/FavoriteButton'
-import MixCover from '@/components/MixCover'
import { EmptyMessage, ErrorMessage, Loading } from '@/components/Status'
-import SuggestName from '@/components/SuggestName'
import TrackRow from '@/components/TrackRow'
import { Button } from '@/components/ui/button'
import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle } from '@/components/ui/dialog'
@@ -47,11 +44,7 @@ function PlaylistView({ id }: { id: number }) {
const remove = useRemoveItem()
const del = useDeletePlaylist()
const playTracks = usePlayer((s) => s.playTracks)
- // Only a track of this server: a friend's may share the id.
- const playingId = usePlayer((s) => {
- const now = currentTrack(s)
- return now && !now.friend ? now.id : undefined
- })
+ const playingId = usePlayer((s) => currentTrack(s)?.id)
const [renaming, setRenaming] = useState(false)
const [deleting, setDeleting] = useState(false)
const [started, setStarted] = useState
(null)
@@ -89,26 +82,23 @@ function PlaylistView({ id }: { id: number }) {
return (