This commit is contained in:
Bryan Gerlach
2024-10-07 15:20:44 -05:00
parent 98fb105f28
commit 3691c06e55
5 changed files with 15 additions and 5 deletions

View File

@@ -3,6 +3,7 @@ from django import forms
class GenerateForm(forms.Form):
#Platform
platform = forms.ChoiceField(choices=[('windows','Windows'),('linux','Linux (currently unavailable)'),('android','Android (testing now available)')], initial='windows')
version = forms.ChoiceField(choices=[('master','beta'),('1.3.1,','1.3.1'),('1.3.0','1.3.0')], initial='1.3.1')
delayFix = forms.BooleanField(initial=True, required=False)
#General

View File

@@ -123,6 +123,8 @@
<option value="linux">Linux (testing, will likely have issues)</option>
<option value="android">Android (testing, will likely have issues)</option>
</select>
<label for="{{ form.version.id_for_label }}">Rustdesk Version:</label>
{{ form.version }}
<label for="{{ form.delayFix.id_for_label }}">{{ form.delayFix }} Fix connection delay when using third-party API</label>
</div>
</div>

View File

@@ -19,6 +19,7 @@ def generator_view(request):
form = GenerateForm(request.POST, request.FILES)
if form.is_valid():
platform = form.cleaned_data['platform']
version = form.cleaned_data['version']
delayFix = form.cleaned_data['delayFix']
server = form.cleaned_data['serverIP']
key = form.cleaned_data['key']
@@ -143,6 +144,7 @@ def generator_view(request):
extras['runasadmin'] = runasadmin
extras['urlLink'] = urlLink
extras['delayFix'] = 'true' if delayFix else 'false'
extras['version'] = version
extra_input = json.dumps(extras)
####from here run the github action, we need user, repo, access token.