make inspector version a server api, split up output subtypes and tweak some option names

This commit is contained in:
LukeFZ
2025-07-29 23:46:14 +02:00
parent 6583787d8f
commit 832b0020eb
13 changed files with 57 additions and 56 deletions

View File

@@ -6,14 +6,11 @@
$effect(() => {
if (signalRState.api === undefined) return;
const unregisterSetInspectorVersion =
signalRState.api.client.onSetInspectorVersion(async (version) => {
if (inspectorVersion === undefined) {
signalRState.api.server.getInspectorVersion().then((version) => {
inspectorVersion = version;
});
return () => {
unregisterSetInspectorVersion();
};
}
});
</script>

View File

@@ -45,12 +45,6 @@ export class SignalRClientApi {
return this.registerHandler("OnImportCompleted", handler);
}
onSetInspectorVersion(
handler: (version: string) => Promise<void>,
): () => void {
return this.registerHandler("SetInspectorVersion", handler);
}
private registerHandler(
name: string,
handler: (...args: any[]) => Promise<void>,

View File

@@ -41,4 +41,8 @@ export class SignalRServerApi {
async exportIl2CppFiles(targetDirectory: string) {
return await this.connection.send("ExportIl2CppFiles", targetDirectory);
}
async getInspectorVersion(): Promise<string> {
return await this.connection.invoke<string>("GetInspectorVersion");
}
}

View File

@@ -43,7 +43,7 @@ let mockFormatSettings: {
{
type: "option",
name: {
id: "flatten",
id: "flattenhierarchy",
label: "Don't nest folders (flatten hierarchy)",
},
default: false,
@@ -55,7 +55,7 @@ let mockFormatSettings: {
{
type: "combobox",
name: {
id: "sorting",
id: "sortingmode",
label: "Type sorting",
},
default: "alphabetical",
@@ -85,7 +85,7 @@ let mockFormatSettings: {
{
type: "option",
name: {
id: "compilable",
id: "mustcompile",
label: "Attempt to generate output that compiles",
},
default: false,
@@ -117,7 +117,7 @@ let mockFormatSettings: {
{
type: "filepath",
name: {
id: "assembliespath",
id: "unityassembliespath",
label: "Unity script assemblies path",
},
directoryPath: true,