mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-06 20:10:12 +02:00
Hide search / clear actions on web
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import isElectron from 'is-electron';
|
||||
import { RiAddFill, RiSubtractFill } from 'react-icons/ri';
|
||||
import { LyricsOverride } from '/@/renderer/api/types';
|
||||
import { Button, NumberInput } from '/@/renderer/components';
|
||||
@@ -29,9 +30,11 @@ export const LyricsActions = ({ onRemoveLyric, onSearchOverride }: LyricsActions
|
||||
};
|
||||
|
||||
const isActionsDisabled = !currentSong;
|
||||
const isDesktop = isElectron();
|
||||
|
||||
return (
|
||||
<>
|
||||
{isDesktop ? (
|
||||
<Button
|
||||
uppercase
|
||||
disabled={isActionsDisabled}
|
||||
@@ -46,6 +49,7 @@ export const LyricsActions = ({ onRemoveLyric, onSearchOverride }: LyricsActions
|
||||
>
|
||||
Search
|
||||
</Button>
|
||||
) : null}
|
||||
<Button
|
||||
aria-label="Decrease lyric offset"
|
||||
variant="subtle"
|
||||
@@ -67,6 +71,7 @@ export const LyricsActions = ({ onRemoveLyric, onSearchOverride }: LyricsActions
|
||||
>
|
||||
<RiAddFill />
|
||||
</Button>
|
||||
{isDesktop ? (
|
||||
<Button
|
||||
uppercase
|
||||
disabled={isActionsDisabled}
|
||||
@@ -75,6 +80,7 @@ export const LyricsActions = ({ onRemoveLyric, onSearchOverride }: LyricsActions
|
||||
>
|
||||
Clear
|
||||
</Button>
|
||||
) : null}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user