forked from mirror/BlueMap
Add setting to disable/enable free-flight-mode in the webapp
This commit is contained in:
parent
0e1e4056bb
commit
e78071115d
@ -1 +1 @@
|
||||
Subproject commit 037be99995746574e7b48c55a4dc4ef5d63e8747
|
||||
Subproject commit b230e582a29333eae3595f58c14528436ddf19cc
|
@ -102,6 +102,7 @@ public synchronized void createOrUpdateWebApp(boolean force) throws IOException
|
||||
public synchronized WebSettings updateWebAppSettings() throws IOException, InterruptedException {
|
||||
WebSettings webSettings = new WebSettings(new File(getRenderConfig().getWebRoot(), "data" + File.separator + "settings.json"));
|
||||
webSettings.set(getRenderConfig().isUseCookies(), "useCookies");
|
||||
webSettings.set(getRenderConfig().isEnableFreeFlight(), "freeFlightEnabled");
|
||||
webSettings.setAllMapsEnabled(false);
|
||||
for (BmMap map : getMaps().values()) {
|
||||
webSettings.setMapEnabled(true, map.getId());
|
||||
|
@ -35,6 +35,7 @@ public class RenderConfig {
|
||||
|
||||
private File webRoot = new File("web");
|
||||
private boolean useCookies;
|
||||
private boolean enableFreeFlight;
|
||||
private List<MapConfig> mapConfigs = new ArrayList<>();
|
||||
|
||||
public RenderConfig(ConfigurationNode node) throws IOException {
|
||||
@ -46,6 +47,9 @@ public RenderConfig(ConfigurationNode node) throws IOException {
|
||||
|
||||
//cookies
|
||||
useCookies = node.node("useCookies").getBoolean(true);
|
||||
|
||||
// free-flight mode
|
||||
enableFreeFlight = node.node("enableFreeFlight").getBoolean(true);
|
||||
|
||||
//maps
|
||||
mapConfigs = new ArrayList<>();
|
||||
@ -62,7 +66,11 @@ public File getWebRoot() {
|
||||
public boolean isUseCookies() {
|
||||
return useCookies;
|
||||
}
|
||||
|
||||
|
||||
public boolean isEnableFreeFlight() {
|
||||
return enableFreeFlight;
|
||||
}
|
||||
|
||||
public List<MapConfig> getMapConfigs(){
|
||||
return mapConfigs;
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
webroot: "web"
|
||||
useCookies: true
|
||||
enableFreeFlight: true
|
||||
maps: []
|
||||
|
@ -11,6 +11,10 @@ webroot: "web"
|
||||
# Default is true
|
||||
useCookies: true
|
||||
|
||||
# If the free-flight-mode in the web-application is enabled or not.
|
||||
# Default is true
|
||||
enableFreeFlight: true
|
||||
|
||||
# This is an array with multiple configured maps.
|
||||
# You can define multiple maps, for different worlds with different render-settings here
|
||||
maps: [
|
||||
|
@ -11,6 +11,10 @@ webroot: "bluemap/web"
|
||||
# Default is true
|
||||
useCookies: true
|
||||
|
||||
# If the free-flight-mode in the web-application is enabled or not.
|
||||
# Default is true
|
||||
enableFreeFlight: true
|
||||
|
||||
# This is an array with multiple configured maps.
|
||||
# You can define multiple maps, for different worlds with different render-settings here
|
||||
maps: [
|
||||
|
@ -1,3 +1,4 @@
|
||||
webroot: "bluemap/web"
|
||||
useCookies: true
|
||||
enableFreeFlight: true
|
||||
maps: []
|
||||
|
@ -11,6 +11,10 @@ webroot: "bluemap/web"
|
||||
# Default is true
|
||||
useCookies: true
|
||||
|
||||
# If the free-flight-mode in the web-application is enabled or not.
|
||||
# Default is true
|
||||
enableFreeFlight: true
|
||||
|
||||
# This is an array with multiple configured maps.
|
||||
# You can define multiple maps, for different worlds with different render-settings here
|
||||
maps: [
|
||||
|
@ -1,3 +1,4 @@
|
||||
webroot: "bluemap/web"
|
||||
useCookies: true
|
||||
enableFreeFlight: true
|
||||
maps: []
|
||||
|
@ -11,6 +11,10 @@ webroot: "bluemap/web"
|
||||
# Default is true
|
||||
useCookies: true
|
||||
|
||||
# If the free-flight-mode in the web-application is enabled or not.
|
||||
# Default is true
|
||||
enableFreeFlight: true
|
||||
|
||||
# This is an array with multiple configured maps.
|
||||
# You can define multiple maps, for different worlds with different render-settings here
|
||||
maps: [
|
||||
|
@ -1,3 +1,4 @@
|
||||
webroot: "bluemap/web"
|
||||
useCookies: true
|
||||
enableFreeFlight: true
|
||||
maps: []
|
||||
|
@ -11,6 +11,10 @@ webroot: "bluemap/web"
|
||||
# Default is true
|
||||
useCookies: true
|
||||
|
||||
# If the free-flight-mode in the web-application is enabled or not.
|
||||
# Default is true
|
||||
enableFreeFlight: true
|
||||
|
||||
# This is an array with multiple configured maps.
|
||||
# You can define multiple maps, for different worlds with different render-settings here
|
||||
maps: [
|
||||
|
@ -1,3 +1,4 @@
|
||||
webroot: "bluemap/web"
|
||||
useCookies: true
|
||||
enableFreeFlight: true
|
||||
maps: []
|
||||
|
@ -11,6 +11,10 @@ webroot: "bluemap/web"
|
||||
# Default is true
|
||||
useCookies: true
|
||||
|
||||
# If the free-flight-mode in the web-application is enabled or not.
|
||||
# Default is true
|
||||
enableFreeFlight: true
|
||||
|
||||
# This is an array with multiple configured maps.
|
||||
# You can define multiple maps, for different worlds with different render-settings here
|
||||
maps: [
|
||||
|
@ -1,3 +1,4 @@
|
||||
webroot: "bluemap/web"
|
||||
useCookies: true
|
||||
enableFreeFlight: true
|
||||
maps: []
|
||||
|
@ -11,6 +11,10 @@ webroot: "bluemap/web"
|
||||
# Default is true
|
||||
useCookies: true
|
||||
|
||||
# If the free-flight-mode in the web-application is enabled or not.
|
||||
# Default is true
|
||||
enableFreeFlight: true
|
||||
|
||||
# This is an array with multiple configured maps.
|
||||
# You can define multiple maps, for different worlds with different render-settings here
|
||||
maps: [
|
||||
|
@ -1,3 +1,4 @@
|
||||
webroot: "bluemap/web"
|
||||
useCookies: true
|
||||
enableFreeFlight: true
|
||||
maps: []
|
||||
|
@ -11,6 +11,10 @@ webroot: "bluemap/web"
|
||||
# Default is true
|
||||
useCookies: true
|
||||
|
||||
# If the free-flight-mode in the web-application is enabled or not.
|
||||
# Default is true
|
||||
enableFreeFlight: true
|
||||
|
||||
# This is an array with multiple configured maps.
|
||||
# You can define multiple maps, for different worlds with different render-settings here
|
||||
maps: [
|
||||
|
@ -1,3 +1,4 @@
|
||||
webroot: "bluemap/web"
|
||||
useCookies: true
|
||||
enableFreeFlight: true
|
||||
maps: []
|
||||
|
@ -11,6 +11,10 @@ webroot: "bluemap/web"
|
||||
# Default is true
|
||||
useCookies: true
|
||||
|
||||
# If the free-flight-mode in the web-application is enabled or not.
|
||||
# Default is true
|
||||
enableFreeFlight: true
|
||||
|
||||
# This is an array with multiple configured maps.
|
||||
# You can define multiple maps, for different worlds with different render-settings here
|
||||
maps: [
|
||||
|
@ -1,3 +1,4 @@
|
||||
webroot: "bluemap/web"
|
||||
useCookies: true
|
||||
enableFreeFlight: true
|
||||
maps: []
|
||||
|
@ -11,6 +11,10 @@ webroot: "bluemap/web"
|
||||
# Default is true
|
||||
useCookies: true
|
||||
|
||||
# If the free-flight-mode in the web-application is enabled or not.
|
||||
# Default is true
|
||||
enableFreeFlight: true
|
||||
|
||||
# This is an array with multiple configured maps.
|
||||
# You can define multiple maps, for different worlds with different render-settings here
|
||||
maps: [
|
||||
|
@ -1,3 +1,4 @@
|
||||
webroot: "bluemap/web"
|
||||
useCookies: true
|
||||
enableFreeFlight: true
|
||||
maps: []
|
||||
|
@ -11,6 +11,10 @@ webroot: "bluemap/web"
|
||||
# Default is true
|
||||
useCookies: true
|
||||
|
||||
# If the free-flight-mode in the web-application is enabled or not.
|
||||
# Default is true
|
||||
enableFreeFlight: true
|
||||
|
||||
# This is an array with multiple configured maps.
|
||||
# You can define multiple maps, for different worlds with different render-settings here
|
||||
maps: [
|
||||
|
Loading…
Reference in New Issue
Block a user