mirror of
https://github.com/p-stream/p-stream.git
synced 2026-04-20 15:22:14 +00:00
add check for active embed
This commit is contained in:
parent
7161ee8163
commit
9443b09782
1 changed files with 7 additions and 1 deletions
|
|
@ -29,6 +29,7 @@ export function EmbedOption(props: {
|
|||
routerId: string;
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const currentEmbedId = usePlayerStore((s) => s.embedId);
|
||||
const unknownEmbedName = t("player.menus.sources.unknownOption");
|
||||
|
||||
const embedName = useMemo(() => {
|
||||
|
|
@ -45,7 +46,12 @@ export function EmbedOption(props: {
|
|||
);
|
||||
|
||||
return (
|
||||
<SelectableLink loading={loading} error={errored} onClick={run}>
|
||||
<SelectableLink
|
||||
loading={loading}
|
||||
error={errored}
|
||||
onClick={run}
|
||||
selected={props.embedId === currentEmbedId}
|
||||
>
|
||||
<span className="flex flex-col">
|
||||
<span>{embedName}</span>
|
||||
</span>
|
||||
|
|
|
|||
Loading…
Reference in a new issue