forked from shaytan/rdgen
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a68e9d8a83 | ||
|
|
995f78b6a1 |
1
.github/workflows/generator-linux.yml
vendored
1
.github/workflows/generator-linux.yml
vendored
@@ -298,6 +298,7 @@ jobs:
|
|||||||
sed -i -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs
|
sed -i -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs
|
||||||
echo -n "${{ inputs.custom }}" | cat > ./custom.txt
|
echo -n "${{ inputs.custom }}" | cat > ./custom.txt
|
||||||
sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml
|
sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml
|
||||||
|
sed -i -e '|https://admin.rustdesk.com|${{ inputs.apiServer }}|' ./src/common.rs
|
||||||
|
|
||||||
- name: change url to custom
|
- name: change url to custom
|
||||||
if: fromJson(inputs.extras).urlLink != 'https://rustdesk.com'
|
if: fromJson(inputs.extras).urlLink != 'https://rustdesk.com'
|
||||||
|
|||||||
1
.github/workflows/generator-macos.yml
vendored
1
.github/workflows/generator-macos.yml
vendored
@@ -239,6 +239,7 @@ jobs:
|
|||||||
sed -i -e 's|rs-ny.rustdesk.com|${{ inputs.server }}|' ./libs/hbb_common/src/config.rs
|
sed -i -e 's|rs-ny.rustdesk.com|${{ inputs.server }}|' ./libs/hbb_common/src/config.rs
|
||||||
sed -i -e 's|OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=|${{ inputs.key }}|' ./libs/hbb_common/src/config.rs
|
sed -i -e 's|OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=|${{ inputs.key }}|' ./libs/hbb_common/src/config.rs
|
||||||
sed -i -e 's|For faster connection, please set up your own server||' ./src/lang/en.rs
|
sed -i -e 's|For faster connection, please set up your own server||' ./src/lang/en.rs
|
||||||
|
sed -i -e '|https://admin.rustdesk.com|${{ inputs.apiServer }}|' ./src/common.rs
|
||||||
|
|
||||||
sed -i '' -e '/const KEY:/,/};/d' ./src/common.rs
|
sed -i '' -e '/const KEY:/,/};/d' ./src/common.rs
|
||||||
sed -i '' -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs
|
sed -i '' -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs
|
||||||
|
|||||||
1
.github/workflows/generator-windows.yml
vendored
1
.github/workflows/generator-windows.yml
vendored
@@ -237,6 +237,7 @@ jobs:
|
|||||||
sed -i -e 's|For faster connection, please set up your own server||' ./src/lang/en.rs
|
sed -i -e 's|For faster connection, please set up your own server||' ./src/lang/en.rs
|
||||||
sed -i -e '/const KEY:/,/};/d' ./src/common.rs
|
sed -i -e '/const KEY:/,/};/d' ./src/common.rs
|
||||||
sed -i -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs
|
sed -i -e '/let Ok(data) = sign::verify(&data, &pk)/,/};/d' ./src/common.rs
|
||||||
|
sed -i -e '|https://admin.rustdesk.com|${{ inputs.apiServer }}|' ./src/common.rs
|
||||||
# ./flutter/pubspec.yaml
|
# ./flutter/pubspec.yaml
|
||||||
sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml
|
sed -i '/intl:/a \ \ archive: ^3.6.1' ./flutter/pubspec.yaml
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
from django import forms
|
from django import forms
|
||||||
|
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'),('linux','Linux (currently unavailable)'),('android','Android'),('macos','macOS')], initial='windows')
|
||||||
version = forms.ChoiceField(choices=[('master','nightly'),('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.3.7')
|
version = forms.ChoiceField(choices=[('1.3.8','nightly'),('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.3.7')
|
||||||
delayFix = forms.BooleanField(initial=True, required=False)
|
delayFix = forms.BooleanField(initial=True, required=False)
|
||||||
|
|
||||||
#General
|
#General
|
||||||
@@ -77,3 +78,27 @@ class GenerateForm(forms.Form):
|
|||||||
hidecm = forms.BooleanField(initial=False, required=False)
|
hidecm = forms.BooleanField(initial=False, required=False)
|
||||||
statussort = forms.BooleanField(initial=False, required=False)
|
statussort = forms.BooleanField(initial=False, required=False)
|
||||||
removeNewVersionNotif = forms.BooleanField(initial=False, required=False)
|
removeNewVersionNotif = forms.BooleanField(initial=False, required=False)
|
||||||
|
|
||||||
|
def clean_iconfile(self):
|
||||||
|
print("checking icon")
|
||||||
|
image = self.cleaned_data['iconfile']
|
||||||
|
try:
|
||||||
|
# Open the image using Pillow
|
||||||
|
img = Image.open(image)
|
||||||
|
|
||||||
|
# Check if the image is a PNG (optional, but good practice)
|
||||||
|
if img.format != 'PNG':
|
||||||
|
raise forms.ValidationError("Only PNG images are allowed.")
|
||||||
|
|
||||||
|
# Get image dimensions
|
||||||
|
width, height = img.size
|
||||||
|
|
||||||
|
# Check for square dimensions
|
||||||
|
if width != height:
|
||||||
|
raise forms.ValidationError("Custom App Icon dimensions must be square.")
|
||||||
|
|
||||||
|
return image
|
||||||
|
except OSError: # Handle cases where the uploaded file is not a valid image
|
||||||
|
raise forms.ValidationError("Invalid icon file.")
|
||||||
|
except Exception as e: # Catch any other image processing errors
|
||||||
|
raise forms.ValidationError(f"Error processing icon: {e}")
|
||||||
@@ -122,6 +122,20 @@
|
|||||||
.error {
|
.error {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
.errorlist {
|
||||||
|
color: red;
|
||||||
|
display: flex; /* Enable flexbox for centering */
|
||||||
|
justify-content: center; /* Center horizontally */
|
||||||
|
align-items: center; /* Center vertically (if needed) */
|
||||||
|
list-style: none; /* Remove bullet points if it's a list */
|
||||||
|
padding: 0; /* Remove default padding */
|
||||||
|
margin: 10px auto; /* Center the list itself, add some top/bottom margin */
|
||||||
|
width: fit-content; /* Make the width fit the content */
|
||||||
|
}
|
||||||
|
|
||||||
|
.errorlist li {
|
||||||
|
margin: 5px; /* Add some spacing between list items */
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -137,6 +151,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% if form.iconfile.errors %}
|
||||||
|
<ul class="errorlist">
|
||||||
|
{% for error in form.iconfile.errors %}
|
||||||
|
<li>{{ error }}</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
<div class="platform">
|
<div class="platform">
|
||||||
<h2><i class="fas fa-desktop"></i> Select Platform</h2>
|
<h2><i class="fas fa-desktop"></i> Select Platform</h2>
|
||||||
<div class="platform-icons">
|
<div class="platform-icons">
|
||||||
|
|||||||
Reference in New Issue
Block a user