mirror of
https://github.com/bryangerlach/rdgen.git
synced 2026-01-20 14:00:58 +00:00
test input hiding
This commit is contained in:
8
.github/workflows/generator-windows.yml
vendored
8
.github/workflows/generator-windows.yml
vendored
@@ -368,10 +368,10 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: magick stuff
|
||||
if: ${{ env.iconlink != 'false' }}
|
||||
if: ${{ env.iconlink_url != 'false' }}
|
||||
continue-on-error: true
|
||||
run: |
|
||||
Invoke-WebRequest -Uri ${{ fromJson(env.iconlink).url }}/get_png?filename=${{ fromJson(env.iconlink).file }}"&"uuid=${{ fromJson(env.iconlink).uuid }} -OutFile ./res/iconx.png
|
||||
Invoke-WebRequest -Uri ${{ env.iconlink_url }}/get_png?filename=${{ env.iconlink_file }}"&"uuid=${{ env.iconlink_uuid }} -OutFile ./res/iconx.png
|
||||
mv ./res/icon.ico ./res/icon.ico.bak
|
||||
mv ./res/icon.png ./res/icon.png.bak
|
||||
mv ./res/tray-icon.ico ./res/tray-icon.ico.bak
|
||||
@@ -513,10 +513,10 @@ jobs:
|
||||
magick ./res/icon.png ./rustdesk/data/flutter_assets/assets/icon.svg
|
||||
|
||||
- name: logo stuff
|
||||
if: ${{ env.logolink != 'false' }}
|
||||
if: ${{ env.logolink_url != 'false' }}
|
||||
continue-on-error: true
|
||||
run: |
|
||||
Invoke-WebRequest -Uri ${{ fromJson(env.logolink).url }}/get_png?filename=${{ fromJson(env.logolink).file }}"&"uuid=${{ fromJson(env.logolink).uuid }} -OutFile ./rustdesk/data/flutter_assets/assets/logo.png
|
||||
Invoke-WebRequest -Uri ${{ env.logolink_url }}/get_png?filename=${{ env.logolink_file }}"&"uuid=${{ env.logolink_uuid }} -OutFile ./rustdesk/data/flutter_assets/assets/logo.png
|
||||
|
||||
- name: find Runner.res
|
||||
# Windows: find Runner.res (compiled from ./flutter/windows/runner/Runner.rc), copy to ./Runner.res
|
||||
|
||||
@@ -97,18 +97,22 @@ def generator_view(request):
|
||||
iconfile = form.cleaned_data.get('iconfile')
|
||||
if not iconfile:
|
||||
iconfile = form.cleaned_data.get('iconbase64')
|
||||
iconlink = save_png(iconfile,myuuid,full_url,"icon.png")
|
||||
iconlink_url, iconlink_uuid, iconlink_file = save_png(iconfile,myuuid,full_url,"icon.png")
|
||||
except:
|
||||
print("failed to get icon, using default")
|
||||
iconlink = "false"
|
||||
iconlink_url = "false"
|
||||
iconlink_uuid = "false"
|
||||
iconlink_file = "false"
|
||||
try:
|
||||
logofile = form.cleaned_data.get('logofile')
|
||||
if not logofile:
|
||||
logofile = form.cleaned_data.get('logobase64')
|
||||
logolink = save_png(logofile,myuuid,full_url,"logo.png")
|
||||
logolink_url, logolink_uuid, logolink_file = save_png(logofile,myuuid,full_url,"logo.png")
|
||||
except:
|
||||
print("failed to get logo")
|
||||
logolink = "false"
|
||||
logolink_url = "false"
|
||||
logolink_uuid = "false"
|
||||
logolink_file = "false"
|
||||
|
||||
###create the custom.txt json here and send in as inputs below
|
||||
decodedCustom = {}
|
||||
@@ -227,8 +231,12 @@ def generator_view(request):
|
||||
"apiServer":apiServer,
|
||||
"custom":encodedCustom,
|
||||
"uuid":myuuid,
|
||||
"iconlink":iconlink,
|
||||
"logolink":logolink,
|
||||
"iconlink_url":iconlink_url,
|
||||
"iconlink_uuid":iconlink_uuid,
|
||||
"iconlink_file":iconlink_file,
|
||||
"logolink_url":logolink_url,
|
||||
"logolink_uuid":logolink_uuid,
|
||||
"logolink_file":logolink_file,
|
||||
"appname":appname,
|
||||
"genurl":_settings.GENURL,
|
||||
"urlLink":urlLink,
|
||||
@@ -434,12 +442,12 @@ def save_png(file, uuid, domain, name):
|
||||
with open(file_save_path, "wb+") as f:
|
||||
for chunk in file.chunks():
|
||||
f.write(chunk)
|
||||
imageJson = {}
|
||||
imageJson['url'] = domain
|
||||
imageJson['uuid'] = uuid
|
||||
imageJson['file'] = name
|
||||
# imageJson = {}
|
||||
# imageJson['url'] = domain
|
||||
# imageJson['uuid'] = uuid
|
||||
# imageJson['file'] = name
|
||||
#return "%s/%s" % (domain, file_save_path)
|
||||
return json.dumps(imageJson)
|
||||
return domain, uuid, name
|
||||
|
||||
def save_custom_client(request):
|
||||
file = request.FILES['file']
|
||||
|
||||
Reference in New Issue
Block a user