chore: update setup for windows-rdp type-checking
This commit is contained in:
parent
bad778e037
commit
f7f7b3edd4
@ -152,6 +152,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(
|
||||||
|
// biome-ignore lint/style/useTemplate: Have to skip interpolation for the main.tf interpolation
|
||||||
'p-dropdownitem[ng-reflect-label="' + PROTOCOL + '"] li',
|
'p-dropdownitem[ng-reflect-label="' + PROTOCOL + '"] li',
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -191,6 +192,7 @@ async function autoSubmitForm(myForm) {
|
|||||||
|
|
||||||
if (input === null) {
|
if (input === null) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
|
// biome-ignore lint/style/useTemplate: Have to skip interpolation for the main.tf interpolation
|
||||||
'Unable to element that matches query "' + querySelector + '"',
|
'Unable to element that matches query "' + querySelector + '"',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -293,6 +295,7 @@ function setupFormDetection() {
|
|||||||
*/
|
*/
|
||||||
function setupAlwaysOnStyles() {
|
function setupAlwaysOnStyles() {
|
||||||
const styleId = "coder-patch--styles-always-on";
|
const styleId = "coder-patch--styles-always-on";
|
||||||
|
// biome-ignore lint/style/useTemplate: Have to skip interpolation for the main.tf interpolation
|
||||||
const existingContainer = document.querySelector("#" + styleId);
|
const existingContainer = document.querySelector("#" + styleId);
|
||||||
if (existingContainer) {
|
if (existingContainer) {
|
||||||
return;
|
return;
|
||||||
@ -310,11 +313,24 @@ function setupAlwaysOnStyles() {
|
|||||||
document.head.appendChild(styleContainer);
|
document.head.appendChild(styleContainer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This ensures that the Devolutions login form (which by default, always shows
|
||||||
|
* up on screen when the app first launches) stays visually hidden from the user
|
||||||
|
* when they open Devolutions via the Coder module.
|
||||||
|
*
|
||||||
|
* The form will still be filled out automatically and submitted in the
|
||||||
|
* background via the rest of the logic in this file, so this function is mainly
|
||||||
|
* to help avoid screen flickering and make the overall experience feel a little
|
||||||
|
* more polished (even though it's just one giant hack).
|
||||||
|
*
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
function hideFormForInitialSubmission() {
|
function hideFormForInitialSubmission() {
|
||||||
const styleId = "coder-patch--styles-initial-submission";
|
const styleId = "coder-patch--styles-initial-submission";
|
||||||
const cssOpacityVariableName = "--coder-opacity-multiplier";
|
const cssOpacityVariableName = "--coder-opacity-multiplier";
|
||||||
|
|
||||||
/** @type {HTMLStyleElement | null} */
|
/** @type {HTMLStyleElement | null} */
|
||||||
|
// biome-ignore lint/style/useTemplate: Have to skip interpolation for the main.tf interpolation
|
||||||
let styleContainer = document.querySelector("#" + styleId);
|
let styleContainer = document.querySelector("#" + styleId);
|
||||||
if (!styleContainer) {
|
if (!styleContainer) {
|
||||||
styleContainer = document.createElement("style");
|
styleContainer = document.createElement("style");
|
||||||
|
|||||||
11
registry/coder/modules/windows-rdp/tsconfig.json
Normal file
11
registry/coder/modules/windows-rdp/tsconfig.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
// Even though this module doesn't contain any TypeScript, it's still
|
||||||
|
// incredibly helpful to include a custom tsconfig file here to ensure that
|
||||||
|
// the raw, unprocessed JavaScript we send doesn't use features that are too
|
||||||
|
// modern, to maximize browser compatibility
|
||||||
|
"extends": ["../../../../tsconfig.json"],
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES6",
|
||||||
|
"module": "ES6"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,9 +1,5 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
// If we were just compiling for the tests, we could safely target ESNext at
|
|
||||||
// all times, but just because we've been starting to add more runtime logic
|
|
||||||
// files to some of the modules, erring on the side of caution by having a
|
|
||||||
// older compilation target
|
|
||||||
"target": "ES2024",
|
"target": "ES2024",
|
||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user