mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-08 08:12:57 +08:00
Merge remote-tracking branch 'origin/unstable' into unstable
# Conflicts: # src/main/java/emu/grasscutter/server/http/documentation/HandbookHandler.java
This commit is contained in:
commit
959f0ad261
@ -136,9 +136,9 @@ export type CommandResponse = {
|
||||
};
|
||||
|
||||
export type WindowDetails = {
|
||||
address: string,
|
||||
port: number,
|
||||
disable: boolean
|
||||
address: string;
|
||||
port: number;
|
||||
disable: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -174,11 +174,8 @@ export function getWindowDetails(): WindowDetails {
|
||||
const { address, port, disable } = details;
|
||||
|
||||
return {
|
||||
address: address == "{{DETAILS_ADDRESS}}" ?
|
||||
"127.0.0.1" : address,
|
||||
port: port == "{{DETAILS_PORT}}" ?
|
||||
443 : parseInt(port),
|
||||
disable: disable == "{{DETAILS_DISABLE}}" ?
|
||||
false : disable == "true"
|
||||
address: address == "{{DETAILS_ADDRESS}}" ? "127.0.0.1" : address,
|
||||
port: port == "{{DETAILS_PORT}}" ? 443 : parseInt(port),
|
||||
disable: disable == "{{DETAILS_DISABLE}}" ? false : disable == "true"
|
||||
};
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package emu.grasscutter.server.http.documentation;
|
||||
|
||||
import static emu.grasscutter.config.Configuration.HANDBOOK;
|
||||
|
||||
import emu.grasscutter.Grasscutter;
|
||||
import emu.grasscutter.auth.AuthenticationSystem.AuthenticationRequest;
|
||||
import emu.grasscutter.server.http.Router;
|
||||
@ -11,8 +13,6 @@ import io.javalin.Javalin;
|
||||
import io.javalin.http.ContentType;
|
||||
import io.javalin.http.Context;
|
||||
|
||||
import static emu.grasscutter.config.Configuration.HANDBOOK;
|
||||
|
||||
/** Handles requests for the new GM Handbook. */
|
||||
public final class HandbookHandler implements Router {
|
||||
private String handbook;
|
||||
@ -32,7 +32,7 @@ public final class HandbookHandler implements Router {
|
||||
this.handbook
|
||||
.replace("{{DETAILS_ADDRESS}}", server.address)
|
||||
.replace("{{DETAILS_PORT}}", String.valueOf(server.port))
|
||||
.replace("{{DETAILS_DISABLE}}", Boolean.toString(!server.canChange));
|
||||
.replace("{{DETAILS_DISABLE}}", Boolean.toString(server.canChange));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user