mirror of
https://github.com/bryangerlach/rdgen.git
synced 2025-11-29 08:33:23 +00:00
Update Views
This commit is contained in:
@@ -119,14 +119,18 @@ def generator_view(request):
|
|||||||
decodedCustom['password'] = permPass
|
decodedCustom['password'] = permPass
|
||||||
if theme != "system":
|
if theme != "system":
|
||||||
if themeDorO == "default":
|
if themeDorO == "default":
|
||||||
decodedCustom['default-settings']['theme'] = theme
|
if platform == "windows-x86":
|
||||||
|
decodedCustom['default-settings']['allow-darktheme'] = 'Y' if theme == "dark" else 'N'
|
||||||
|
else:
|
||||||
|
decodedCustom['default-settings']['theme'] = theme
|
||||||
elif themeDorO == "override":
|
elif themeDorO == "override":
|
||||||
decodedCustom['override-settings']['theme'] = theme
|
if platform == "windows-x86":
|
||||||
#decodedCustom['approve-mode'] = passApproveMode
|
decodedCustom['override-settings']['allow-darktheme'] = 'Y' if theme == "dark" else 'N'
|
||||||
|
else:
|
||||||
|
decodedCustom['override-settings']['theme'] = theme
|
||||||
decodedCustom['enable-lan-discovery'] = 'N' if denyLan else 'Y'
|
decodedCustom['enable-lan-discovery'] = 'N' if denyLan else 'Y'
|
||||||
#decodedCustom['direct-server'] = 'Y' if enableDirectIP else 'N'
|
#decodedCustom['direct-server'] = 'Y' if enableDirectIP else 'N'
|
||||||
decodedCustom['allow-auto-disconnect'] = 'Y' if autoClose else 'N'
|
decodedCustom['allow-auto-disconnect'] = 'Y' if autoClose else 'N'
|
||||||
decodedCustom['allow-remove-wallpaper'] = 'Y' if removeWallpaper else 'N'
|
|
||||||
if permissionsDorO == "default":
|
if permissionsDorO == "default":
|
||||||
decodedCustom['default-settings']['access-mode'] = permissionsType
|
decodedCustom['default-settings']['access-mode'] = permissionsType
|
||||||
decodedCustom['default-settings']['enable-keyboard'] = 'Y' if enableKeyboard else 'N'
|
decodedCustom['default-settings']['enable-keyboard'] = 'Y' if enableKeyboard else 'N'
|
||||||
@@ -139,9 +143,10 @@ def generator_view(request):
|
|||||||
decodedCustom['default-settings']['enable-block-input'] = 'Y' if enableBlockingInput else 'N'
|
decodedCustom['default-settings']['enable-block-input'] = 'Y' if enableBlockingInput else 'N'
|
||||||
decodedCustom['default-settings']['allow-remote-config-modification'] = 'Y' if enableRemoteModi else 'N'
|
decodedCustom['default-settings']['allow-remote-config-modification'] = 'Y' if enableRemoteModi else 'N'
|
||||||
decodedCustom['default-settings']['direct-server'] = 'Y' if enableDirectIP else 'N'
|
decodedCustom['default-settings']['direct-server'] = 'Y' if enableDirectIP else 'N'
|
||||||
decodedCustom['default-settings']['hide-cm'] = 'Y' if hidecm else 'N'
|
|
||||||
decodedCustom['default-settings']['verification-method'] = 'use-permanent-password' if hidecm else 'use-both-passwords'
|
decodedCustom['default-settings']['verification-method'] = 'use-permanent-password' if hidecm else 'use-both-passwords'
|
||||||
decodedCustom['default-settings']['approve-mode'] = passApproveMode
|
decodedCustom['default-settings']['approve-mode'] = passApproveMode
|
||||||
|
decodedCustom['default-settings']['allow-hide-cm'] = 'Y' if hidecm else 'N'
|
||||||
|
decodedCustom['default-settings']['allow-remove-wallpaper'] = 'Y' if removeWallpaper else 'N'
|
||||||
else:
|
else:
|
||||||
decodedCustom['override-settings']['access-mode'] = permissionsType
|
decodedCustom['override-settings']['access-mode'] = permissionsType
|
||||||
decodedCustom['override-settings']['enable-keyboard'] = 'Y' if enableKeyboard else 'N'
|
decodedCustom['override-settings']['enable-keyboard'] = 'Y' if enableKeyboard else 'N'
|
||||||
@@ -153,6 +158,11 @@ def generator_view(request):
|
|||||||
decodedCustom['override-settings']['enable-record-session'] = 'Y' if enableRecording else 'N'
|
decodedCustom['override-settings']['enable-record-session'] = 'Y' if enableRecording else 'N'
|
||||||
decodedCustom['override-settings']['enable-block-input'] = 'Y' if enableBlockingInput else 'N'
|
decodedCustom['override-settings']['enable-block-input'] = 'Y' if enableBlockingInput else 'N'
|
||||||
decodedCustom['override-settings']['allow-remote-config-modification'] = 'Y' if enableRemoteModi else 'N'
|
decodedCustom['override-settings']['allow-remote-config-modification'] = 'Y' if enableRemoteModi else 'N'
|
||||||
|
decodedCustom['override-settings']['direct-server'] = 'Y' if enableDirectIP else 'N'
|
||||||
|
decodedCustom['override-settings']['verification-method'] = 'use-permanent-password' if hidecm else 'use-both-passwords'
|
||||||
|
decodedCustom['override-settings']['approve-mode'] = passApproveMode
|
||||||
|
decodedCustom['override-settings']['allow-hide-cm'] = 'Y' if hidecm else 'N'
|
||||||
|
decodedCustom['override-settings']['allow-remove-wallpaper'] = 'Y' if removeWallpaper else 'N'
|
||||||
|
|
||||||
for line in defaultManual.splitlines():
|
for line in defaultManual.splitlines():
|
||||||
k, value = line.split('=')
|
k, value = line.split('=')
|
||||||
@@ -179,16 +189,17 @@ def generator_view(request):
|
|||||||
extras['rdgen'] = 'true'
|
extras['rdgen'] = 'true'
|
||||||
extras['cycleMonitor'] = 'true' if cycleMonitor else 'false'
|
extras['cycleMonitor'] = 'true' if cycleMonitor else 'false'
|
||||||
extras['xOffline'] = 'true' if xOffline else 'false'
|
extras['xOffline'] = 'true' if xOffline else 'false'
|
||||||
extras['hidecm'] = 'true' if hidecm else 'false'
|
|
||||||
extras['removeNewVersionNotif'] = 'true' if removeNewVersionNotif else 'false'
|
extras['removeNewVersionNotif'] = 'true' if removeNewVersionNotif else 'false'
|
||||||
extras['compname'] = compname
|
extras['compname'] = compname
|
||||||
extra_input = json.dumps(extras)
|
extra_input = json.dumps(extras)
|
||||||
|
|
||||||
####from here run the github action, we need user, repo, access token.
|
####from here run the github action, we need user, repo, access token.
|
||||||
if platform == 'windows':
|
if platform == 'windows':
|
||||||
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-windows.yml/dispatches'
|
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-windows.yml/dispatches'
|
||||||
|
if platform == 'windows-x86':
|
||||||
|
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-windows-x86.yml/dispatches'
|
||||||
elif platform == 'linux':
|
elif platform == 'linux':
|
||||||
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-linux.yml/dispatches'
|
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-linux.yml/dispatches'
|
||||||
elif platform == 'android':
|
elif platform == 'android':
|
||||||
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-android.yml/dispatches'
|
url = 'https://api.github.com/repos/'+_settings.GHUSER+'/'+_settings.REPONAME+'/actions/workflows/generator-android.yml/dispatches'
|
||||||
elif platform == 'macos':
|
elif platform == 'macos':
|
||||||
@@ -392,4 +403,4 @@ def save_custom_client(request):
|
|||||||
for chunk in file.chunks():
|
for chunk in file.chunks():
|
||||||
f.write(chunk)
|
f.write(chunk)
|
||||||
|
|
||||||
return HttpResponse("File saved successfully!")
|
return HttpResponse("File saved successfully!")
|
||||||
|
|||||||
Reference in New Issue
Block a user