Add discord rich presence (#72)

This commit is contained in:
jeffvli 2023-10-23 06:58:39 -07:00
parent 2664a80851
commit 244c00c4c6
12 changed files with 391 additions and 7 deletions

View file

@ -25,6 +25,7 @@ import { getMpvProperties } from '/@/renderer/features/settings/components/playb
import { PlayerState, usePlayerStore, useQueueControls } from '/@/renderer/store';
import { FontType, PlaybackType, PlayerStatus } from '/@/renderer/types';
import '@ag-grid-community/styles/ag-grid.css';
import { useDiscordRpc } from '/@/renderer/features/discord-rpc/use-discord-rpc';
ModuleRegistry.registerModules([ClientSideRowModelModule, InfiniteRowModelModule]);
@ -37,7 +38,6 @@ const remote = isElectron() ? window.electron.remote : null;
export const App = () => {
const theme = useTheme();
const contentFont = useSettingsStore((state) => state.general.fontContent);
const accent = useSettingsStore((store) => store.general.accent);
const { builtIn, custom, system, type } = useSettingsStore((state) => state.font);
const { type: playbackType } = usePlaybackSettings();
@ -46,6 +46,7 @@ export const App = () => {
const { clearQueue, restoreQueue } = useQueueControls();
const remoteSettings = useRemoteSettings();
const textStyleRef = useRef<HTMLStyleElement>();
useDiscordRpc();
useEffect(() => {
if (type === FontType.SYSTEM && system) {