refactor(ipc): complete tauri-specta typed-IPC cutover, contract guards, and layering cleanup (#1230)

This commit is contained in:
Psychotoxical
2026-07-04 16:00:31 +02:00
committed by GitHub
parent fdbb9deac6
commit 77ab95170d
199 changed files with 3691 additions and 1252 deletions
@@ -1,7 +1,8 @@
import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useNavigate } from 'react-router-dom';
import { invoke } from '@tauri-apps/api/core';
import { commands } from '@/generated/bindings';
import { linuxWaylandTextRenderSettingsAvailable } from '@/lib/api/platformShell';
import { save as saveDialog } from '@tauri-apps/plugin-dialog';
import { open as openUrl } from '@tauri-apps/plugin-shell';
import { AppWindow, ChevronDown, Download, ExternalLink, Globe, HardDrive, Info, Scale, Sliders, Users } from 'lucide-react';
@@ -29,7 +30,7 @@ export function SystemTab() {
useEffect(() => {
if (!IS_LINUX) return;
invoke<boolean>('linux_wayland_text_render_settings_available')
linuxWaylandTextRenderSettingsAvailable()
.then(setWaylandTextRenderAvailable)
.catch(() => {});
}, []);
@@ -43,8 +44,9 @@ export function SystemTab() {
});
if (!selected || Array.isArray(selected)) return;
try {
const lines = await invoke<number>('export_runtime_logs', { path: selected });
showToast(t('settings.loggingExportSuccess', { count: lines }), 3500, 'info');
const res = await commands.exportRuntimeLogs(selected);
if (res.status === 'error') throw new Error(res.error);
showToast(t('settings.loggingExportSuccess', { count: res.data }), 3500, 'info');
} catch (e) {
console.error(e);
showToast(t('settings.loggingExportError'), 4500, 'error');