Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src-tauri/src/persistence/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ pub struct Preferences {
/// Show the button that opens the parametric EQ in the player bar. On by
/// default, as it was before it could be hidden.
pub show_eq_button: bool,
/// Design of the big play button: "theme" (whatever the theme brings)
/// or "circle" | "orb" | "record" | "square" | "sticker".
pub play_button_style: String,
/// "raw" for the original file, or "mp3-320" / "mp3-192" / "mp3-128"
/// for server-side transcoding.
pub streaming_format: String,
Expand Down Expand Up @@ -193,6 +196,7 @@ impl Default for Preferences {
startup_device_config: None,
show_output_picker: false,
show_eq_button: true,
play_button_style: "theme".into(),
streaming_format: "raw".into(),
replay_gain: ReplayGainSettings::default(),
crossfade_secs: 0,
Expand Down Expand Up @@ -436,7 +440,8 @@ mod tests {
"checkForUpdates": false,
"discordPresence": true,
"showOutputPicker": true,
"showEqButton": false
"showEqButton": false,
"playButtonStyle": "record"
}"#;
let prefs: Preferences = serde_json::from_str(raw).expect("camelCase names must match");
assert!(prefs.direct_scrobble);
Expand All @@ -451,6 +456,7 @@ mod tests {
assert!(prefs.discord_presence);
assert!(prefs.show_output_picker);
assert!(!prefs.show_eq_button);
assert_eq!(prefs.play_button_style, "record");

// ...and come back out under the same names.
let back = serde_json::to_value(&prefs).unwrap();
Expand All @@ -466,6 +472,7 @@ mod tests {
assert_eq!(back["discordPresence"], serde_json::json!(true));
assert_eq!(back["showOutputPicker"], serde_json::json!(true));
assert_eq!(back["showEqButton"], serde_json::json!(false));
assert_eq!(back["playButtonStyle"], serde_json::json!("record"));
}

/// Before ListenBrainz, direct scrobbling was "Last.fm only". A settings
Expand Down Expand Up @@ -806,6 +813,7 @@ mod tests {
assert!(!s.prefs.discord_presence, "Discord presence defaults to off");
assert!(!s.prefs.show_output_picker, "the player bar output picker defaults to off");
assert!(s.prefs.show_eq_button, "the player bar EQ button stays shown");
assert_eq!(s.prefs.play_button_style, "theme", "the play button follows the theme");
// And the new shape round-trips.
let back = serde_json::to_string(&s).unwrap();
let s2: Settings = serde_json::from_str(&back).unwrap();
Expand Down
97 changes: 97 additions & 0 deletions src/assets/fonts/archivo/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
Archivo (archivo-*.woff2) is licensed under the SIL Open Font License 1.1.

===== Archivo =====
Copyright 2020 The Archivo Project Authors (https://github.com/Omnibus-Type/Archivo) Archivo-Italic[wdth,wght].ttf: Copyright 2020 The Archivo Project Authors (https://github.com/Omnibus-Type/Archivo)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/layout/PlayerBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function PlayerBar() {

return (
<footer
className={`relative flex h-[84px] shrink-0 items-center gap-4 px-4 ${
className={`player-bar relative flex h-[84px] shrink-0 items-center gap-4 px-4 ${
liquid ? "glass rounded-2xl" : "classic-panel border-t border-edge"
}`}
>
Expand Down
8 changes: 4 additions & 4 deletions src/components/layout/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,21 +96,21 @@ export function Sidebar() {
const items = visibleNavItems(usePrefsStore((s) => s.prefs.hiddenNavItems));
return (
<nav
className={`flex w-52 shrink-0 flex-col ${
className={`sidebar flex w-52 shrink-0 flex-col ${
liquid ? "glass rounded-2xl" : "classic-panel border-r border-edge"
}`}
>
<div className="flex items-center gap-2 px-4 pt-4 pb-6">
<Logo className="size-7" />
<span className="text-lg font-semibold tracking-tight">Reverb</span>
<span className="brand text-lg font-semibold tracking-tight">Reverb</span>
</div>
<div className="flex flex-1 flex-col gap-0.5 overflow-y-auto px-2">
{items.map(({ to, labelKey, icon: Icon }) => (
<NavLink
key={to}
to={to}
className={({ isActive }) =>
`flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors ${
`nav-link flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors ${
isActive
? "glass-active bg-surface-2 font-medium text-text"
: "glass-hover text-dim hover:bg-surface-2/60 hover:text-text"
Expand All @@ -130,7 +130,7 @@ export function Sidebar() {
<NavLink
to="/settings"
className={({ isActive }) =>
`flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors ${
`nav-link flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors ${
isActive
? "glass-active bg-surface-2 font-medium text-text"
: "glass-hover text-dim hover:bg-surface-2/60 hover:text-text"
Expand Down
6 changes: 3 additions & 3 deletions src/components/library/AlbumCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ export function AlbumCard({ album }: { album: Album }) {
return (
<AlbumContextMenu album={album}>
<div
className="group w-full cursor-pointer rounded-lg p-3 transition-colors hover:bg-surface"
className="media-card group w-full cursor-pointer rounded-lg p-3 transition-colors hover:bg-surface"
onClick={() => navigate(`/albums/${album.id}`)}
>
<div className="relative">
<div className="card-art relative">
<CoverImage coverArt={album.coverArt} size={300} alt={album.name} className="rounded-md" />
<button
aria-label={t("table.playSong", { title: album.name })}
onClick={playAlbum}
className="absolute right-2 bottom-2 flex size-10 translate-y-1 cursor-pointer items-center justify-center rounded-full bg-accent text-white opacity-0 shadow-lg transition-all group-hover:translate-y-0 group-hover:opacity-100 hover:scale-105 hover:bg-accent-bright"
className="card-play absolute right-2 bottom-2 flex size-10 translate-y-1 cursor-pointer items-center justify-center rounded-full bg-accent text-white opacity-0 shadow-lg transition-all group-hover:translate-y-0 group-hover:opacity-100 hover:scale-105 hover:bg-accent-bright"
>
<Play className="ml-0.5 size-5 fill-current" />
</button>
Expand Down
4 changes: 2 additions & 2 deletions src/components/library/ArtistCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ export function ArtistCard({ artist }: { artist: Artist }) {
return (
<ArtistContextMenu artist={artist}>
<div
className="group w-full cursor-pointer rounded-lg p-3 transition-colors hover:bg-surface"
className="media-card group w-full cursor-pointer rounded-lg p-3 transition-colors hover:bg-surface"
onClick={() => navigate(`/artists/${artist.id}`)}
>
<CoverImage
coverArt={artist.coverArt}
size={300}
alt={artist.name}
className="rounded-full"
className="card-art rounded-full"
/>
<div className="mt-2 truncate text-center text-sm font-medium">{artist.name}</div>
<div className="truncate text-center text-xs text-dim">
Expand Down
4 changes: 2 additions & 2 deletions src/components/library/GenreCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export function GenreCard({ genre }: { genre: Genre }) {
return (
<div
onClick={() => navigate(genrePath(genre.value))}
className="group w-full cursor-pointer p-3"
className="media-card group w-full cursor-pointer p-3"
>
<div className="relative overflow-hidden rounded-md ring-1 ring-white/5 transition-all group-hover:ring-accent/40">
<div className="card-art relative overflow-hidden rounded-md ring-1 ring-white/5 transition-all group-hover:ring-accent/40">
<GenreMosaic covers={covers} size={300} />

{/* Scrim has to hold up over pale artwork, so it stays opaque under
Expand Down
6 changes: 3 additions & 3 deletions src/components/library/MixCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ export function MixCard({ mix }: { mix: Mix }) {

return (
<div
className="group w-full cursor-pointer rounded-lg p-3 transition-colors hover:bg-surface"
className="media-card group w-full cursor-pointer rounded-lg p-3 transition-colors hover:bg-surface"
onClick={() => navigate(`/mixes/${mix.id}`)}
>
<div className="relative">
<div className="card-art relative">
<GenreMosaic covers={mixCovers(mix)} size={300} className="rounded-md" />
<button
aria-label={t("table.playSong", { title })}
onClick={(e) => {
e.stopPropagation();
usePlayerStore.getState().playContext(mix.songs, 0);
}}
className="absolute right-2 bottom-2 flex size-10 translate-y-1 cursor-pointer items-center justify-center rounded-full bg-accent text-white opacity-0 shadow-lg transition-all group-hover:translate-y-0 group-hover:opacity-100 hover:scale-105 hover:bg-accent-bright"
className="card-play absolute right-2 bottom-2 flex size-10 translate-y-1 cursor-pointer items-center justify-center rounded-full bg-accent text-white opacity-0 shadow-lg transition-all group-hover:translate-y-0 group-hover:opacity-100 hover:scale-105 hover:bg-accent-bright"
>
<Play className="ml-0.5 size-5 fill-current" />
</button>
Expand Down
6 changes: 3 additions & 3 deletions src/components/library/PlaylistCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ export function PlaylistCard({ playlist }: { playlist: Playlist }) {

return (
<div
className="group w-full cursor-pointer rounded-lg p-3 transition-colors hover:bg-surface"
className="media-card group w-full cursor-pointer rounded-lg p-3 transition-colors hover:bg-surface"
onClick={() => navigate(`/playlists/${playlist.id}`)}
>
<div className="relative">
<div className="card-art relative">
<CoverImage
coverArt={playlist.coverArt}
size={300}
Expand All @@ -53,7 +53,7 @@ export function PlaylistCard({ playlist }: { playlist: Playlist }) {
<button
aria-label={t("table.playSong", { title: playlist.name })}
onClick={playPlaylist}
className="absolute right-2 bottom-2 flex size-10 translate-y-1 cursor-pointer items-center justify-center rounded-full bg-accent text-white opacity-0 shadow-lg transition-all group-hover:translate-y-0 group-hover:opacity-100 hover:scale-105 hover:bg-accent-bright"
className="card-play absolute right-2 bottom-2 flex size-10 translate-y-1 cursor-pointer items-center justify-center rounded-full bg-accent text-white opacity-0 shadow-lg transition-all group-hover:translate-y-0 group-hover:opacity-100 hover:scale-105 hover:bg-accent-bright"
>
<Play className="ml-0.5 size-5 fill-current" />
</button>
Expand Down
4 changes: 2 additions & 2 deletions src/components/library/SongTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export function SongTableHeaderRow({
const t = useT();
return (
<div
className={`mx-4 grid items-center gap-x-3 border-b border-edge px-3 pb-2 ${className}`}
className={`song-table-head mx-4 grid items-center gap-x-3 border-b border-edge px-3 pb-2 ${className}`}
style={{ gridTemplateColumns: gridTemplate }}
>
<span className="text-center text-[11px] font-semibold text-faint">#</span>
Expand Down Expand Up @@ -256,7 +256,7 @@ function SongRow({

return (
<div
className={`group grid h-full items-center gap-x-3 rounded-md px-3 transition-colors select-none ${
className={`song-row group grid h-full items-center gap-x-3 rounded-md px-3 transition-colors select-none ${
selected ? "bg-surface-2 ring-1 ring-accent/40 ring-inset" : "hover:bg-surface"
} ${isCurrent && !selected ? "bg-surface" : ""}`}
style={{ gridTemplateColumns: gridTemplate }}
Expand Down
8 changes: 7 additions & 1 deletion src/components/player/TransportControls.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Pause, Play, Repeat, Repeat1, Shuffle, SkipBack, SkipForward } from "lucide-react";
import { useT } from "../../lib/i18n";
import { resolvePlayButton } from "../../lib/playButton";
import { usePlayerStore } from "../../stores/playerStore";
import { usePrefsStore } from "../../stores/prefsStore";
import { IconButton } from "../ui/Button";
import { Spinner } from "../ui/Spinner";

Expand All @@ -11,6 +13,8 @@ export function TransportControls() {
const repeat = usePlayerStore((s) => s.repeat);
const hasQueue = usePlayerStore((s) => s.queue.length > 0);
const { togglePlay, next, previous, toggleShuffle, cycleRepeat } = usePlayerStore.getState();
// globals.css draws each design off data-design; data-playing spins the record.
const design = usePrefsStore((s) => resolvePlayButton(s.prefs.playButtonStyle, s.prefs.theme));

const playing = state === "playing";
const buffering = state === "buffering";
Expand All @@ -31,10 +35,12 @@ export function TransportControls() {
aria-label={playing ? t("player.pause") : t("common.play")}
onClick={togglePlay}
disabled={!hasQueue && state === "stopped"}
data-design={design}
data-playing={playing || undefined}
className="play-button mx-1 flex size-10 cursor-pointer items-center justify-center rounded-full bg-text text-bg transition-transform hover:scale-105 disabled:cursor-not-allowed disabled:opacity-40"
>
{buffering ? (
<Spinner className="size-5 border-bg/30 border-t-bg" />
<Spinner className="size-5 border-current/30 border-t-current" />
) : playing ? (
<Pause className="size-5 fill-current" />
) : (
Expand Down
8 changes: 8 additions & 0 deletions src/lib/i18n/messages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,14 @@ export const de: Messages = {
"seekBar.bars": "Balken",
"seekBar.thin": "Dünn",
"seekBar.thick": "Dick",
"settings.playButton": "Wiedergabetaste",
"settings.playButtonHint": "Die große Wiedergabetaste im Player und im Vollbildplayer. „Zum Design passend“ nimmt die Form, die das Design mitbringt.",
"playButton.theme": "Zum Design passend",
"playButton.circle": "Kreis",
"playButton.orb": "Kugel",
"playButton.record": "Schallplatte",
"playButton.square": "Quadrat",
"playButton.sticker": "Sticker",
"settings.radio": "Radio",
"settings.radioHint":
"Spielt am Ende der Warteschlange Titel wie den letzten weiter: ähnliche, wenn der Server einen Last.fm-Agenten hat, sonst aus demselben Genre.",
Expand Down
8 changes: 8 additions & 0 deletions src/lib/i18n/messages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,14 @@ export const en = {
"seekBar.bars": "Bars",
"seekBar.thin": "Thin",
"seekBar.thick": "Thick",
"settings.playButton": "Play button",
"settings.playButtonHint": "The big play button in the player and full-screen player. Match theme uses the design the theme brings.",
"playButton.theme": "Match theme",
"playButton.circle": "Circle",
"playButton.orb": "Orb",
"playButton.record": "Record",
"playButton.square": "Square",
"playButton.sticker": "Sticker",
"settings.radio": "Radio",
"settings.radioHint":
"When the queue ends, keep playing songs like the last one: similar ones when the server has a Last.fm agent, otherwise from the same genre.",
Expand Down
8 changes: 8 additions & 0 deletions src/lib/i18n/messages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,14 @@ export const es: Messages = {
"seekBar.bars": "Barras",
"seekBar.thin": "Fina",
"seekBar.thick": "Gruesa",
"settings.playButton": "Botón de reproducción",
"settings.playButtonHint": "El botón grande de reproducción del reproductor y del reproductor a pantalla completa. «Según el tema» usa el diseño que trae el tema.",
"playButton.theme": "Según el tema",
"playButton.circle": "Círculo",
"playButton.orb": "Orbe",
"playButton.record": "Vinilo",
"playButton.square": "Cuadrado",
"playButton.sticker": "Pegatina",
"settings.radio": "Radio",
"settings.radioHint":
"Cuando la cola termina, sigue con canciones como la última: similares si el servidor tiene un agente de Last.fm, si no, del mismo género.",
Expand Down
Loading
Loading