fix: more money, more problems
This commit is contained in:
@@ -48,7 +48,7 @@ const formFieldEntries = {
|
|||||||
querySelector: "web-client-username-control input",
|
querySelector: "web-client-username-control input",
|
||||||
|
|
||||||
/** @readonly */
|
/** @readonly */
|
||||||
value: "CODER_USERNAME",
|
value: "${CODER_USERNAME}",
|
||||||
},
|
},
|
||||||
|
|
||||||
/** @readonly */
|
/** @readonly */
|
||||||
@@ -57,7 +57,7 @@ const formFieldEntries = {
|
|||||||
querySelector: "web-client-password-control input",
|
querySelector: "web-client-password-control input",
|
||||||
|
|
||||||
/** @readonly */
|
/** @readonly */
|
||||||
value: "CODER_PASSWORD",
|
value: "${CODER_PASSWORD}",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ function setInputValue(inputField, inputText) {
|
|||||||
if (i === -1) {
|
if (i === -1) {
|
||||||
inputField.value = "";
|
inputField.value = "";
|
||||||
} else {
|
} else {
|
||||||
inputField.value = `${inputField.value}${currentChar}`;
|
inputField.value = `$${inputField.value}$${currentChar}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
inputField.dispatchEvent(inputEvent);
|
inputField.dispatchEvent(inputEvent);
|
||||||
@@ -184,7 +184,7 @@ async function autoSubmitForm(myForm) {
|
|||||||
// they're part of the form. Avoids CSS stacking context issues, maybe?
|
// they're part of the form. Avoids CSS stacking context issues, maybe?
|
||||||
/** @type {HTMLLIElement | null} */
|
/** @type {HTMLLIElement | null} */
|
||||||
const protocolOption = document.querySelector(
|
const protocolOption = document.querySelector(
|
||||||
`p-dropdownitem[ng-reflect-label="${PROTOCOL}"] li`,
|
`p-dropdownitem[ng-reflect-label="$${PROTOCOL}"] li`,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (protocolOption === null) {
|
if (protocolOption === null) {
|
||||||
@@ -223,7 +223,7 @@ async function autoSubmitForm(myForm) {
|
|||||||
|
|
||||||
if (input === null) {
|
if (input === null) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Unable to element that matches query "${querySelector}"`,
|
`Unable to element that matches query "$${querySelector}"`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -332,7 +332,7 @@ function setupFormDetection() {
|
|||||||
function setupObscuringStyles() {
|
function setupObscuringStyles() {
|
||||||
const styleId = "coder-patch--styles";
|
const styleId = "coder-patch--styles";
|
||||||
|
|
||||||
const existingContainer = document.querySelector(`#${styleId}`);
|
const existingContainer = document.querySelector(`#$${styleId}`);
|
||||||
if (existingContainer) {
|
if (existingContainer) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,10 +95,10 @@ resource "coder_script" "windows-rdp" {
|
|||||||
$patch = '<script defer id="coder-patch" src="coder.js"></script>'
|
$patch = '<script defer id="coder-patch" src="coder.js"></script>'
|
||||||
|
|
||||||
# Always copy the file in case we change it.
|
# Always copy the file in case we change it.
|
||||||
"${replace(templatefile("${path.module}/devolutions-patch.js", {
|
"${templatefile("${path.module}/devolutions-patch.js", {
|
||||||
CODER_USERNAME : var.admin_username,
|
CODER_USERNAME : var.admin_username,
|
||||||
CODER_PASSWORD : var.admin_password,
|
CODER_PASSWORD : var.admin_password,
|
||||||
}), "$", "$$")}" | Set-Content "$root\coder.js"
|
})}" | Set-Content "$root\coder.js"
|
||||||
|
|
||||||
# Only inject the src if we have not before.
|
# Only inject the src if we have not before.
|
||||||
$isPatched = Select-String -Path "$devolutionsHtml" -Pattern "$patch"
|
$isPatched = Select-String -Path "$devolutionsHtml" -Pattern "$patch"
|
||||||
|
|||||||
Reference in New Issue
Block a user