[enhancement]: support viewing current/setting current time in remote

This commit is contained in:
Kendall Garner 2024-08-24 13:26:45 -07:00
parent b347b794b9
commit 5b2977e5e8
No known key found for this signature in database
GPG key ID: 18D2767419676C87
9 changed files with 61 additions and 13 deletions

View file

@ -21,7 +21,7 @@ import { Tooltip } from '/@/renderer/components/tooltip';
import { Rating } from '/@/renderer/components/rating';
export const RemoteContainer = () => {
const { repeat, shuffle, song, status, volume } = useInfo();
const { position, repeat, shuffle, song, status, volume } = useInfo();
const send = useSend();
const showImage = useShowImage();
@ -154,6 +154,16 @@ export const RemoteContainer = () => {
</div>
)}
</Group>
{id && position !== undefined && (
<WrapperSlider
label={(value) => formatDuration(value * 1e3)}
leftLabel={formatDuration(position * 1e3)}
max={song.duration / 1e3}
rightLabel={formatDuration(song.duration)}
value={position}
onChangeEnd={(e) => send({ event: 'position', position: e })}
/>
)}
<WrapperSlider
leftLabel={<RiVolumeUpFill size={20} />}
max={100}