make inspector version a server api, split up output subtypes and tweak some option names
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -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>,
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user