feat: remove fetching of machine data on settings page load to improve performance
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
1.5.4 (2026-02-10)
|
1.5.4 (2026-02-10)
|
||||||
Aggiunti i pulsanti "Download" al MailViewer, PDF e Image viewer, per scaricare il file invece di aprirlo direttamente.
|
Aggiunti i pulsanti "Download" al MailViewer, PDF e Image viewer, per scaricare il file invece di aprirlo direttamente.
|
||||||
Refactor del sistema di bug report.
|
Refactor del sistema di bug report.
|
||||||
|
Rimosso temporaneamente il fetching dei dati macchina all'apertura della pagine delle impostazioni, per evitare problemi di performance.
|
||||||
|
|
||||||
1.5.3 (2026-02-10)
|
1.5.3 (2026-02-10)
|
||||||
Sistemato un bug dove, al primo avvio, il tema chiaro era applicato insieme all'opzioni del tema scuro sul contenuto mail, causando un contrasto eccessivo.
|
Sistemato un bug dove, al primo avvio, il tema chiaro era applicato insieme all'opzioni del tema scuro sul contenuto mail, causando un contrasto eccessivo.
|
||||||
|
|||||||
@@ -1,25 +1,18 @@
|
|||||||
import type { PageLoad } from './$types';
|
import type { PageLoad } from './$types';
|
||||||
import { GetMachineData, GetConfig } from "$lib/wailsjs/go/main/App";
|
import { GetConfig } from "$lib/wailsjs/go/main/App";
|
||||||
import { browser } from '$app/environment';
|
import { browser } from '$app/environment';
|
||||||
import { dangerZoneEnabled } from "$lib/stores/app";
|
|
||||||
import { get } from "svelte/store";
|
|
||||||
|
|
||||||
export const load = (async () => {
|
export const load = (async () => {
|
||||||
if (!browser) return { machineData: null, config: null };
|
if (!browser) return { config: null };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const [machineData, configRoot] = await Promise.all([
|
const configRoot = await GetConfig();
|
||||||
get(dangerZoneEnabled) ? GetMachineData() : Promise.resolve(null),
|
|
||||||
GetConfig()
|
|
||||||
]);
|
|
||||||
return {
|
return {
|
||||||
machineData,
|
|
||||||
config: configRoot.EMLy
|
config: configRoot.EMLy
|
||||||
};
|
};
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Failed to load settings data", e);
|
console.error("Failed to load settings data", e);
|
||||||
return {
|
return {
|
||||||
machineData: null,
|
|
||||||
config: null
|
config: null
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user