feat: add current mode rank to small image

This commit is contained in:
2025-07-08 17:45:08 +02:00
parent d6623891bb
commit 376ee1e648
4 changed files with 50 additions and 36 deletions

View File

@@ -3,15 +3,17 @@ import { invoke } from '@tauri-apps/api/core';
export const connect = async () => await invoke('presence_connect');
export const disconnect = async () => await invoke('presence_disconnect');
export const updateStatus = async (status: {
state?: string | null;
details?: string | null;
state: string;
details: string;
largeImageKey?: string;
}) =>
await invoke('presence_update_status', {
state: status.state,
details: status.details,
largeImageKey: status.largeImageKey,
status: {
state: status.state,
details: status.details,
largeImageKey: status.largeImageKey,
},
});
export const updateUser = async (user: { username: string; id?: string | null }) =>
await invoke('presence_update_user', { username: user.username, id: user.id });
await invoke('presence_update_user', { user: { username: user.username, id: user.id } });
export const isConnected = async () => await invoke<boolean>('presence_is_connected');