|
@@ -1298,10 +1298,41 @@ def change(platform: str, mode: str, path_dest: str, features: dict, security: d
|
|
|
f.write(indented_str(3, '// UIAction(title: "Live Streaming".localized(), handler: {(_) in'))
|
|
|
f.write(indented_str(4, "// APIS.openStreaming();"))
|
|
|
f.write(indented_str(3, "// }),"))
|
|
|
+ elif "//FLOATING" in line:
|
|
|
+ if mode == "floating":
|
|
|
+ if features["cc"]["status"]:
|
|
|
+ f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CC)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2, '// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CC)'))
|
|
|
+ if features["nc"]["status"]:
|
|
|
+ f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_NOTIF_CENTER)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2, '// Nexilis.defaultFloatingButton.append(Nexilis.IDX_NOTIF_CENTER)'))
|
|
|
+ if features["im"]["status"]:
|
|
|
+ f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CHAT)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CHAT)'))
|
|
|
+ if features["call"]["status"]:
|
|
|
+ f.write(indented_str(2,'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CALL)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CALL)'))
|
|
|
+ if features["ls"]["status"]:
|
|
|
+ f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_STREAM)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_STREAM)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(0, ""))
|
|
|
+ elif "APIS.connect" in line:
|
|
|
+ if mode == "floating":
|
|
|
+ replaced = line.replace("false", "true")
|
|
|
+ f.write(replaced)
|
|
|
+ else:
|
|
|
+ f.write(line)
|
|
|
else:
|
|
|
f.write(line)
|
|
|
elif platform == "ios_flutter":
|
|
|
main_act_path = os.path.join(path_dest, "lib/main.dart")
|
|
|
+ main_act_ios = os.path.join(path_dest, "ios/Runner/AppDelegate.swift")
|
|
|
with open(main_act_path, "r") as f:
|
|
|
lines = f.readlines()
|
|
|
with open(main_act_path, "w") as f:
|
|
@@ -1381,8 +1412,45 @@ def change(platform: str, mode: str, path_dest: str, features: dict, security: d
|
|
|
f.write(indented_str(4, "// break;", spaces=2))
|
|
|
else:
|
|
|
f.write(line)
|
|
|
+ with open(main_act_ios, "r") as f:
|
|
|
+ lines = f.readlines()
|
|
|
+ with open(main_act_ios, "w") as f:
|
|
|
+ for line in lines:
|
|
|
+ if "//FLOATING" in line:
|
|
|
+ if mode == "floating":
|
|
|
+ if features["cc"]["status"]:
|
|
|
+ f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CC)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2, '// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CC)'))
|
|
|
+ if features["nc"]["status"]:
|
|
|
+ f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_NOTIF_CENTER)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2, '// Nexilis.defaultFloatingButton.append(Nexilis.IDX_NOTIF_CENTER)'))
|
|
|
+ if features["im"]["status"]:
|
|
|
+ f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CHAT)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CHAT)'))
|
|
|
+ if features["call"]["status"]:
|
|
|
+ f.write(indented_str(2,'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CALL)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CALL)'))
|
|
|
+ if features["ls"]["status"]:
|
|
|
+ f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_STREAM)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_STREAM)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(0, ""))
|
|
|
+ elif "APIS.connect" in line:
|
|
|
+ if mode == "floating":
|
|
|
+ replaced = line.replace("false", "true")
|
|
|
+ f.write(replaced)
|
|
|
+ else:
|
|
|
+ f.write(line)
|
|
|
+ else:
|
|
|
+ f.write(line)
|
|
|
elif platform == "ios_ionic":
|
|
|
main_act_path = os.path.join(path_dest, "src/app/app.component.ts")
|
|
|
+ main_act_ios = os.path.join(path_dest, "ios/App/App/AppDelegate.swift")
|
|
|
with open(main_act_path, "r") as f:
|
|
|
lines = f.readlines()
|
|
|
with open(main_act_path, "w") as f:
|
|
@@ -1472,8 +1540,45 @@ def change(platform: str, mode: str, path_dest: str, features: dict, security: d
|
|
|
f.write(indented_str(4, "// },", spaces=2))
|
|
|
else:
|
|
|
f.write(line)
|
|
|
+ with open(main_act_ios, "r") as f:
|
|
|
+ lines = f.readlines()
|
|
|
+ with open(main_act_ios, "w") as f:
|
|
|
+ for line in lines:
|
|
|
+ if "//FLOATING" in line:
|
|
|
+ if mode == "floating":
|
|
|
+ if features["cc"]["status"]:
|
|
|
+ f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CC)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2, '// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CC)'))
|
|
|
+ if features["nc"]["status"]:
|
|
|
+ f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_NOTIF_CENTER)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2, '// Nexilis.defaultFloatingButton.append(Nexilis.IDX_NOTIF_CENTER)'))
|
|
|
+ if features["im"]["status"]:
|
|
|
+ f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CHAT)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CHAT)'))
|
|
|
+ if features["call"]["status"]:
|
|
|
+ f.write(indented_str(2,'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CALL)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CALL)'))
|
|
|
+ if features["ls"]["status"]:
|
|
|
+ f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_STREAM)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_STREAM)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(0, ""))
|
|
|
+ elif "APIS.connect" in line:
|
|
|
+ if mode == "floating":
|
|
|
+ replaced = line.replace("false", "true")
|
|
|
+ f.write(replaced)
|
|
|
+ else:
|
|
|
+ f.write(line)
|
|
|
+ else:
|
|
|
+ f.write(line)
|
|
|
elif platform == "ios_react":
|
|
|
main_act_path = os.path.join(path_dest, "App.tsx")
|
|
|
+ main_act_ios = os.path.join(path_dest, "ios/CallNative.swift")
|
|
|
with open(main_act_path, "r") as f:
|
|
|
lines = f.readlines()
|
|
|
with open(main_act_path, "w") as f:
|
|
@@ -1728,7 +1833,42 @@ def change(platform: str, mode: str, path_dest: str, features: dict, security: d
|
|
|
f.write(indented_str(5, "/> */}", spaces=2))
|
|
|
else:
|
|
|
f.write(line)
|
|
|
-
|
|
|
+ with open(main_act_ios, "r") as f:
|
|
|
+ lines = f.readlines()
|
|
|
+ with open(main_act_ios, "w") as f:
|
|
|
+ for line in lines:
|
|
|
+ if "//FLOATING" in line:
|
|
|
+ if mode == "floating":
|
|
|
+ if features["cc"]["status"]:
|
|
|
+ f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CC)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2, '// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CC)'))
|
|
|
+ if features["nc"]["status"]:
|
|
|
+ f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_NOTIF_CENTER)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2, '// Nexilis.defaultFloatingButton.append(Nexilis.IDX_NOTIF_CENTER)'))
|
|
|
+ if features["im"]["status"]:
|
|
|
+ f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CHAT)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CHAT)'))
|
|
|
+ if features["call"]["status"]:
|
|
|
+ f.write(indented_str(2,'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CALL)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CALL)'))
|
|
|
+ if features["ls"]["status"]:
|
|
|
+ f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_STREAM)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_STREAM)'))
|
|
|
+ else:
|
|
|
+ f.write(indented_str(0, ""))
|
|
|
+ elif "APIS.connect" in line:
|
|
|
+ if mode == "floating":
|
|
|
+ replaced = line.replace("false", "true")
|
|
|
+ f.write(replaced)
|
|
|
+ else:
|
|
|
+ f.write(line)
|
|
|
+ else:
|
|
|
+ f.write(line)
|
|
|
|
|
|
def deliver_zip(path_dest, uid):
|
|
|
rand_name = ''.join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(32))
|