v3: localization fixes, char counters & limits on all text fields, ux fixes

This commit is contained in:
khannurien
2026-04-03 19:47:37 +00:00
parent 0ce80398a4
commit a69788c15b
48 changed files with 1133 additions and 305 deletions

View File

@@ -1,4 +1,6 @@
import { useState } from "react";
import { t } from "@lingui/core/macro";
import { Trans } from "@lingui/react/macro";
import type { Playlist } from "../model.ts";
import { Modal } from "./Modal.tsx";
import { PlaylistCreateForm } from "./PlaylistCreateForm.tsx";
@@ -12,7 +14,7 @@ interface NewPlaylistFormProps {
export function NewPlaylistForm(
{
onCreated,
toggleLabel = "+ New playlist",
toggleLabel,
toggleClassName = "new-playlist-toggle",
}: NewPlaylistFormProps,
) {
@@ -25,11 +27,11 @@ export function NewPlaylistForm(
className={toggleClassName}
onClick={() => setOpen(true)}
>
{toggleLabel}
{toggleLabel ?? <Trans>+ New playlist</Trans>}
</button>
{open && (
<Modal title="New playlist" onClose={() => setOpen(false)}>
<Modal title={t`New playlist`} onClose={() => setOpen(false)}>
<PlaylistCreateForm
onCreated={(playlist) => {
onCreated(playlist);