Fixes some links in exported html files

This commit is contained in:
Rsl1122 2019-09-26 18:56:05 +03:00
parent 74067723e1
commit c928979f70
4 changed files with 8 additions and 1 deletions

View File

@ -69,6 +69,7 @@ public class NetworkPageExporter extends FileExporter {
this.theme = theme;
exportPaths = new ExportPaths();
exportPaths.put("./players", toRelativePathFromRoot("players"));
}
public void export(Path toDirectory, Server server) throws IOException, NotFoundException, ParseException {

View File

@ -69,6 +69,8 @@ public class PlayerPageExporter extends FileExporter {
this.theme = theme;
exportPaths = new ExportPaths();
exportPaths.put("../network", toRelativePathFromRoot("network"));
exportPaths.put("../server", toRelativePathFromRoot("server"));
}
public void export(Path toDirectory, UUID playerUUID, String playerName) throws IOException, NotFoundException, ParseException {

View File

@ -25,6 +25,7 @@ import com.djrapitops.plan.delivery.webserver.response.errors.ErrorResponse;
import com.djrapitops.plan.exceptions.ParseException;
import com.djrapitops.plan.exceptions.connection.NotFoundException;
import com.djrapitops.plan.exceptions.connection.WebException;
import com.djrapitops.plan.identification.ServerInfo;
import com.djrapitops.plan.settings.locale.Locale;
import com.djrapitops.plan.settings.theme.Theme;
import com.djrapitops.plan.storage.file.PlanFiles;
@ -59,7 +60,8 @@ public class PlayersPageExporter extends FileExporter {
PageFactory pageFactory,
RootJSONHandler jsonHandler,
Locale locale,
Theme theme
Theme theme,
ServerInfo serverInfo
) {
this.files = files;
this.pageFactory = pageFactory;
@ -68,6 +70,7 @@ public class PlayersPageExporter extends FileExporter {
this.theme = theme;
exportPaths = new ExportPaths();
exportPaths.put("/", toRelativePathFromRoot(serverInfo.getServer().isProxy() ? "network" : "server"));
}
public void export(Path toDirectory) throws IOException, NotFoundException, ParseException {

View File

@ -74,6 +74,7 @@ public class ServerPageExporter extends FileExporter {
this.serverInfo = serverInfo;
exportPaths = new ExportPaths();
exportPaths.put("../network", toRelativePathFromRoot("network"));
}
public void export(Path toDirectory, Server server) throws IOException, NotFoundException, ParseException {