Complete private authentication, server integrations and activity reporting
Add Fabric/Forge version builds and Paper integration, preserve permanent player identities across renames, harden session authorization, and surface privacy-conscious launcher/server activity in the panel.
This commit is contained in:
commit
a1f19e86c6
74 files changed
+2108
-95
No files matched your search
@@ -13,7 +13,16 @@ export function mockEmit(event: string, payload: unknown) {
|
||||
}
|
||||
|
||||
export async function invoke<T>(cmd: string, args?: Record<string, unknown>): Promise<T> {
|
||||
if (inTauri) return tauriInvoke<T>(cmd, args);
|
||||
if (inTauri) {
|
||||
const result = await tauriInvoke<T>(cmd, args);
|
||||
const kinds: Record<string, string> = {
|
||||
bootstrap: 'launcher_open', save_settings: 'settings_changed', select_account: 'account_selected',
|
||||
cancel_launch: 'launch_cancelled', delete_instance_data: 'instance_deleted', clear_cache: 'cache_cleared',
|
||||
install_update: 'update_installed', open_folder: 'folder_opened',
|
||||
};
|
||||
if (kinds[cmd]) void tauriInvoke('record_activity', { kind: kinds[cmd], instanceId: args?.instanceId ?? null }).catch(() => {});
|
||||
return result;
|
||||
}
|
||||
const { mockInvoke } = await import('./mock');
|
||||
return mockInvoke(cmd, args ?? {}) as Promise<T>;
|
||||
}
|
||||
@@ -32,7 +41,10 @@ export async function windowAction(action: 'minimize' | 'maximize' | 'close' | '
|
||||
const w = getCurrentWindow();
|
||||
if (action === 'minimize') await w.minimize();
|
||||
else if (action === 'maximize') await w.toggleMaximize();
|
||||
else if (action === 'close') await w.close();
|
||||
else if (action === 'close') {
|
||||
await tauriInvoke('record_activity', { kind: 'launcher_close', instanceId: null }).catch(() => {});
|
||||
await w.close();
|
||||
}
|
||||
else await w.startDragging();
|
||||
}
|
||||
|
||||
@@ -43,6 +55,7 @@ export async function openUrl(url: string) {
|
||||
}
|
||||
const { openUrl } = await import('@tauri-apps/plugin-opener');
|
||||
await openUrl(url);
|
||||
void tauriInvoke('record_activity', { kind: 'link_opened', instanceId: null }).catch(() => {});
|
||||
}
|
||||
|
||||
export async function pickFile(title: string, filters?: { name: string; extensions: string[] }[]): Promise<string | null> {
|
||||
|
||||
Reference in new issue
Block a user