Skip to content

Commit

Permalink
fix: patches for ARM-based Macs
Browse files Browse the repository at this point in the history
  • Loading branch information
ViRb3 committed Jan 17, 2022
1 parent 1f8119c commit f014464
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ var formNames = assets.FormNames{
FormBuilderId: "builder_id",
FormAppDebug: "app_debug",
FormAllDevices: "all_devices",
FormMac: "mac",
FormFileShare: "file_share",
FormToken: "token",
FormId: "id",
Expand Down Expand Up @@ -538,6 +539,9 @@ func uploadUnsignedApp(c echo.Context) error {
if c.FormValue(formNames.FormAllDevices) != "" {
signArgs += " -a"
}
if c.FormValue(formNames.FormMac) != "" {
signArgs += " -m"
}
if c.FormValue(formNames.FormAppDebug) != "" {
signArgs += " -d"
}
Expand Down
15 changes: 14 additions & 1 deletion src/assets/index.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,19 @@
>?</a
>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="formMac" name="{{.FormMac}}" />
<label style="display: inline" class="form-check-label" for="formMac">
Enable patches for Macs
</label>
<a
style="color: blue"
data-bs-toggle="tooltip"
data-bs-placement="right"
title="Applies patches that make the app work better on Macs, such as freeform window resizing."
>?</a
>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="formFileShare" name="{{.FormFileShare}}" />
<label style="display: inline" class="form-check-label" for="formFileShare">
Expand Down Expand Up @@ -508,7 +521,7 @@
addTusFileHook(formTweaksSelect, "tweak");

modalElem.addEventListener("shown.bs.modal", function () {
modalBody.style.minHeight = `${modalBody.offsetHeight}px`;
modalBody.style.minHeight = `30.5rem`;
});
for (let item of dropdownCreateFrom) {
item.addEventListener("click", function () {
Expand Down
1 change: 1 addition & 0 deletions src/assets/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ type FormNames struct {
FormBuilderId string
FormAppDebug string
FormAllDevices string
FormMac string
FormFileShare string
FormToken string
FormId string
Expand Down

0 comments on commit f014464

Please sign in to comment.