1 parent
c54acd2e36
commit
79addd4aba
14 files changed
+831
-2
No files matched your search
@@ -81,6 +81,38 @@ export async function exportErrorLogs(
|
||||
return await invoke('plugin:utils|export_error_logs', { outputPath, errorMessage })
|
||||
}
|
||||
|
||||
export async function exportLauncherLogs({
|
||||
range = 'last2Hours',
|
||||
level = 'all',
|
||||
includeSystemInfo = true,
|
||||
includeInstanceLogs = false,
|
||||
includeCrashAnalysis = false,
|
||||
fileNamePrefix = 'Starlight Launcher logs',
|
||||
} = {}) {
|
||||
const timestamp = new Date().toISOString().replace(/[:.]/g, '-')
|
||||
const outputPath = await save({
|
||||
defaultPath: `${fileNamePrefix} ${timestamp}.zip`,
|
||||
filters: [
|
||||
{
|
||||
name: 'ZIP archive',
|
||||
extensions: ['zip'],
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
if (!outputPath) return null
|
||||
|
||||
await invoke('plugin:utils|export_launcher_logs', {
|
||||
outputPath,
|
||||
range,
|
||||
level,
|
||||
includeSystemInfo,
|
||||
includeInstanceLogs,
|
||||
includeCrashAnalysis,
|
||||
})
|
||||
return outputPath
|
||||
}
|
||||
|
||||
export async function createInstanceShortcut(instanceName, instanceId, options = {}) {
|
||||
const outputPath = await save({
|
||||
defaultPath: `Modrinth - ${instanceName}`,
|
||||
|
||||
Reference in new issue
Block a user