|
@@ -51,6 +51,8 @@ public class SystemCache {
|
|
|
|
|
|
private TrialMode trialMode;
|
|
|
|
|
|
+ private boolean yjsObjectiveEnable;
|
|
|
+
|
|
|
@Value("${qmth.solar.host}")
|
|
|
private String host;
|
|
|
|
|
@@ -68,6 +70,7 @@ public class SystemCache {
|
|
|
Auth = true;
|
|
|
doubleTrack = true;
|
|
|
groupDeleteWarn = false;
|
|
|
+ yjsObjectiveEnable = false;
|
|
|
trialMode = TrialMode.SHARE;
|
|
|
}
|
|
|
} else if (s != null && SystemAuthType.OFFLINE.equals(s.getType())) {
|
|
@@ -77,6 +80,7 @@ public class SystemCache {
|
|
|
Auth = false;
|
|
|
doubleTrack = false;
|
|
|
groupDeleteWarn = false;
|
|
|
+ yjsObjectiveEnable = false;
|
|
|
trialMode = TrialMode.SHARE;
|
|
|
}
|
|
|
fileServer = configService.findByType(ConfigType.FILE_SERVER);
|
|
@@ -149,6 +153,14 @@ public class SystemCache {
|
|
|
this.trialMode = trialMode;
|
|
|
}
|
|
|
|
|
|
+ public boolean isYjsObjectiveEnable() {
|
|
|
+ return yjsObjectiveEnable;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setYjsObjectiveEnable(boolean yjsObjectiveEnable) {
|
|
|
+ this.yjsObjectiveEnable = yjsObjectiveEnable;
|
|
|
+ }
|
|
|
+
|
|
|
public void parseJson(JSONObject json) {
|
|
|
if (json != null) {
|
|
|
Auth = true;
|
|
@@ -194,10 +206,22 @@ public class SystemCache {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ this.yjsObjectiveEnable = false;
|
|
|
+ if (json.has("control") && json.getJSONObject("control").has("custom")
|
|
|
+ && json.getJSONObject("control").getJSONObject("custom").has("yjs_objective_enable")) {
|
|
|
+ try {
|
|
|
+ this.yjsObjectiveEnable = json.getJSONObject("control").getJSONObject("custom")
|
|
|
+ .getBoolean("yjs_objective_enable");
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
} else {
|
|
|
Auth = false;
|
|
|
doubleTrack = false;
|
|
|
groupDeleteWarn = false;
|
|
|
+ yjsObjectiveEnable = false;
|
|
|
expireTime = null;
|
|
|
trialMode = TrialMode.SHARE;
|
|
|
}
|