forked from shaytan/rdgen
Merge pull request #128 from Maxetto/website-changes
Proposal for Website changes
This commit is contained in:
@@ -3,7 +3,7 @@ from PIL import Image
|
|||||||
|
|
||||||
class GenerateForm(forms.Form):
|
class GenerateForm(forms.Form):
|
||||||
#Platform
|
#Platform
|
||||||
platform = forms.ChoiceField(choices=[('windows','Windows'),('linux','Linux (currently unavailable)'),('android','Android'),('macos','macOS')], initial='windows')
|
platform = forms.ChoiceField(choices=[('windows','Windows 64Bit'),('windows-x86','Windows 32Bit'),('linux','Linux'),('android','Android'),('macos','macOS')], initial='windows')
|
||||||
version = forms.ChoiceField(choices=[('master','nightly'),('1.4.2','1.4.2'),('1.4.1','1.4.1'),('1.4.0','1.4.0'),('1.3.9','1.3.9'),('1.3.8','1.3.8'),('1.3.7','1.3.7'),('1.3.6','1.3.6'),('1.3.5','1.3.5'),('1.3.4','1.3.4'),('1.3.3','1.3.3')], initial='1.4.2')
|
version = forms.ChoiceField(choices=[('master','nightly'),('1.4.2','1.4.2'),('1.4.1','1.4.1'),('1.4.0','1.4.0'),('1.3.9','1.3.9'),('1.3.8','1.3.8'),('1.3.7','1.3.7'),('1.3.6','1.3.6'),('1.3.5','1.3.5'),('1.3.4','1.3.4'),('1.3.3','1.3.3')], initial='1.4.2')
|
||||||
help_text="'master' is the development version (nightly build) with the latest features but may be less stable"
|
help_text="'master' is the development version (nightly build) with the latest features but may be less stable"
|
||||||
delayFix = forms.BooleanField(initial=True, required=False)
|
delayFix = forms.BooleanField(initial=True, required=False)
|
||||||
@@ -66,6 +66,7 @@ class GenerateForm(forms.Form):
|
|||||||
enableRecording = forms.BooleanField(initial=True, required=False)
|
enableRecording = forms.BooleanField(initial=True, required=False)
|
||||||
enableBlockingInput = forms.BooleanField(initial=True, required=False)
|
enableBlockingInput = forms.BooleanField(initial=True, required=False)
|
||||||
enableRemoteModi = forms.BooleanField(initial=False, required=False)
|
enableRemoteModi = forms.BooleanField(initial=False, required=False)
|
||||||
|
hidecm = forms.BooleanField(initial=False, required=False)
|
||||||
|
|
||||||
#Other
|
#Other
|
||||||
removeWallpaper = forms.BooleanField(initial=True, required=False)
|
removeWallpaper = forms.BooleanField(initial=True, required=False)
|
||||||
@@ -76,7 +77,6 @@ class GenerateForm(forms.Form):
|
|||||||
#custom added features
|
#custom added features
|
||||||
cycleMonitor = forms.BooleanField(initial=False, required=False)
|
cycleMonitor = forms.BooleanField(initial=False, required=False)
|
||||||
xOffline = forms.BooleanField(initial=False, required=False)
|
xOffline = forms.BooleanField(initial=False, required=False)
|
||||||
hidecm = forms.BooleanField(initial=False, required=False)
|
|
||||||
removeNewVersionNotif = forms.BooleanField(initial=False, required=False)
|
removeNewVersionNotif = forms.BooleanField(initial=False, required=False)
|
||||||
|
|
||||||
def clean_iconfile(self):
|
def clean_iconfile(self):
|
||||||
|
|||||||
@@ -129,6 +129,8 @@
|
|||||||
{% if platform == 'windows' %}
|
{% if platform == 'windows' %}
|
||||||
<a href='/download?filename={{filename}}.exe&uuid={{uuid}}' class="download-link">Download {{filename}}.exe</a>
|
<a href='/download?filename={{filename}}.exe&uuid={{uuid}}' class="download-link">Download {{filename}}.exe</a>
|
||||||
<a href='/download?filename={{filename}}.msi&uuid={{uuid}}' class="download-link">Download {{filename}}.msi</a>
|
<a href='/download?filename={{filename}}.msi&uuid={{uuid}}' class="download-link">Download {{filename}}.msi</a>
|
||||||
|
{% elif platform == 'windows-x86' %}
|
||||||
|
<a href='/download?filename={{filename}}.exe&uuid={{uuid}}' class="download-link">Download {{filename}}.exe</a>
|
||||||
{% elif platform == 'linux' %}
|
{% elif platform == 'linux' %}
|
||||||
<a href='/download?filename={{filename}}-x86_64.deb&uuid={{uuid}}' class="download-link">Download {{filename}}-x86_64.deb</a>
|
<a href='/download?filename={{filename}}-x86_64.deb&uuid={{uuid}}' class="download-link">Download {{filename}}-x86_64.deb</a>
|
||||||
<a href='/download?filename={{filename}}-x86_64.rpm&uuid={{uuid}}' class="download-link">Download {{filename}}-x86_64.rpm</a>
|
<a href='/download?filename={{filename}}-x86_64.rpm&uuid={{uuid}}' class="download-link">Download {{filename}}-x86_64.rpm</a>
|
||||||
@@ -177,7 +179,7 @@
|
|||||||
platformLogos.macos.style.display = 'block';
|
platformLogos.macos.style.display = 'block';
|
||||||
platformNote.textContent = 'Note: For macOS, you may need to adjust security settings to run the application.';
|
platformNote.textContent = 'Note: For macOS, you may need to adjust security settings to run the application.';
|
||||||
platformNote.style.display = 'block';
|
platformNote.style.display = 'block';
|
||||||
} else if (platform === 'windows') {
|
} else if (platform === 'windows' || platform === 'windows-x86') {
|
||||||
document.getElementById('pageTitle').textContent = 'Windows Build Generated';
|
document.getElementById('pageTitle').textContent = 'Windows Build Generated';
|
||||||
platformLogos.windows.style.display = 'block';
|
platformLogos.windows.style.display = 'block';
|
||||||
platformNote.textContent = 'Note: You might need to disable SmartScreen or adjust Windows security settings.';
|
platformNote.textContent = 'Note: You might need to disable SmartScreen or adjust Windows security settings.';
|
||||||
@@ -199,4 +201,4 @@
|
|||||||
updatePlatformUI();
|
updatePlatformUI();
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>{{ ... }}
|
</html>{{ ... }}
|
||||||
|
|||||||
@@ -233,7 +233,8 @@
|
|||||||
<i class="fab fa-apple platform-icon" data-platform="macos"></i>
|
<i class="fab fa-apple platform-icon" data-platform="macos"></i>
|
||||||
</div>
|
</div>
|
||||||
<select name="platform" id="id_platform">
|
<select name="platform" id="id_platform">
|
||||||
<option value="windows" selected>Windows</option>
|
<option value="windows" selected>Windows 64Bit</option>
|
||||||
|
<option value="windows-x86">Windows 32Bit</option>
|
||||||
<option value="linux">Linux</option>
|
<option value="linux">Linux</option>
|
||||||
<option value="android">Android</option>
|
<option value="android">Android</option>
|
||||||
<option value="macos">macOS</option>
|
<option value="macos">macOS</option>
|
||||||
@@ -294,7 +295,9 @@
|
|||||||
|
|
||||||
<label for="{{ form.enableDirectIP.id_for_label }}">{{ form.enableDirectIP }} Enable direct IP access</label><br>
|
<label for="{{ form.enableDirectIP.id_for_label }}">{{ form.enableDirectIP }} Enable direct IP access</label><br>
|
||||||
|
|
||||||
<label for="{{ form.autoClose.id_for_label }}">{{ form.autoClose }} Automatically close incoming sessions on user inactivity</label><br>
|
<label for="{{ form.autoClose.id_for_label }}">{{ form.autoClose }} Automatically close incoming sessions on user inactivity</label><br>
|
||||||
|
|
||||||
|
<label for="{{ form.hidecm.id_for_label }}">{{ form.hidecm }} Allow hiding the connection window from remote screen.</label><br>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="section">
|
<div class="section">
|
||||||
@@ -334,7 +337,6 @@
|
|||||||
<h2><i class="fas fa-code"></i> Code Changes</h2>
|
<h2><i class="fas fa-code"></i> Code Changes</h2>
|
||||||
<label for="{{ form.cycleMonitor.id_for_label }}">{{ form.cycleMonitor }} Add a button to cycle through available monitors to the minimized toolbar.</label><br>
|
<label for="{{ form.cycleMonitor.id_for_label }}">{{ form.cycleMonitor }} Add a button to cycle through available monitors to the minimized toolbar.</label><br>
|
||||||
<label for="{{ form.xOffline.id_for_label }}">{{ form.xOffline }} Display an X for offline devices in the addressbook.</label><br>
|
<label for="{{ form.xOffline.id_for_label }}">{{ form.xOffline }} Display an X for offline devices in the addressbook.</label><br>
|
||||||
<label for="{{ form.hidecm.id_for_label }}">{{ form.hidecm }} Allow hiding the connection window from remote screen.</label><br>
|
|
||||||
<label for="{{ form.removeNewVersionNotif.id_for_label }}">{{ form.removeNewVersionNotif }} Remove notification for new versions.</label><br>
|
<label for="{{ form.removeNewVersionNotif.id_for_label }}">{{ form.removeNewVersionNotif }} Remove notification for new versions.</label><br>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -154,6 +154,7 @@
|
|||||||
const platform = '{{platform}}'.toLowerCase();
|
const platform = '{{platform}}'.toLowerCase();
|
||||||
const platformLogos = {
|
const platformLogos = {
|
||||||
'windows': document.getElementById('windowsLogo'),
|
'windows': document.getElementById('windowsLogo'),
|
||||||
|
'windows-x86': document.getElementById('windowsLogo'),
|
||||||
'macos': document.getElementById('macosLogo'),
|
'macos': document.getElementById('macosLogo'),
|
||||||
'linux': document.getElementById('linuxLogo'),
|
'linux': document.getElementById('linuxLogo'),
|
||||||
'android': document.getElementById('androidLogo')
|
'android': document.getElementById('androidLogo')
|
||||||
@@ -167,7 +168,7 @@
|
|||||||
document.getElementById('pageTitle').textContent = 'Generating MacOS Build';
|
document.getElementById('pageTitle').textContent = 'Generating MacOS Build';
|
||||||
platformLogos.macos.style.display = 'block';
|
platformLogos.macos.style.display = 'block';
|
||||||
document.getElementById('macosNote').style.display = 'block';
|
document.getElementById('macosNote').style.display = 'block';
|
||||||
} else if (platform === 'windows') {
|
} else if (platform === 'windows' | platform === 'windows-x86') {
|
||||||
document.getElementById('pageTitle').textContent = 'Generating Windows Build';
|
document.getElementById('pageTitle').textContent = 'Generating Windows Build';
|
||||||
platformLogos.windows.style.display = 'block';
|
platformLogos.windows.style.display = 'block';
|
||||||
} else if (platform === 'linux') {
|
} else if (platform === 'linux') {
|
||||||
@@ -214,4 +215,4 @@
|
|||||||
}, 5000); // 5000 milliseconds = 5 seconds
|
}, 5000); // 5000 milliseconds = 5 seconds
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -119,9 +119,15 @@ 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['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'
|
||||||
@@ -137,7 +143,6 @@ 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-hide-cm'] = 'Y' if hidecm else 'N'
|
||||||
@@ -184,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':
|
||||||
|
|||||||
Reference in New Issue
Block a user