@@ -152,6 +152,7 @@ async function autoSubmitForm(myForm) {
152152 // they're part of the form. Avoids CSS stacking context issues, maybe?
153153 /** @type {HTMLLIElement | null } */
154154 const protocolOption = document . querySelector (
155+ // biome-ignore lint/style/useTemplate: Have to skip interpolation for the main.tf interpolation
155156 'p-dropdownitem[ng-reflect-label="' + PROTOCOL + '"] li' ,
156157 ) ;
157158
@@ -191,6 +192,7 @@ async function autoSubmitForm(myForm) {
191192
192193 if ( input === null ) {
193194 throw new Error (
195+ // biome-ignore lint/style/useTemplate: Have to skip interpolation for the main.tf interpolation
194196 'Unable to element that matches query "' + querySelector + '"' ,
195197 ) ;
196198 }
@@ -293,6 +295,7 @@ function setupFormDetection() {
293295 */
294296function setupAlwaysOnStyles ( ) {
295297 const styleId = "coder-patch--styles-always-on" ;
298+ // biome-ignore lint/style/useTemplate: Have to skip interpolation for the main.tf interpolation
296299 const existingContainer = document . querySelector ( "#" + styleId ) ;
297300 if ( existingContainer ) {
298301 return ;
@@ -310,11 +313,24 @@ function setupAlwaysOnStyles() {
310313 document . head . appendChild ( styleContainer ) ;
311314}
312315
316+ /**
317+ * This ensures that the Devolutions login form (which by default, always shows
318+ * up on screen when the app first launches) stays visually hidden from the user
319+ * when they open Devolutions via the Coder module.
320+ *
321+ * The form will still be filled out automatically and submitted in the
322+ * background via the rest of the logic in this file, so this function is mainly
323+ * to help avoid screen flickering and make the overall experience feel a little
324+ * more polished (even though it's just one giant hack).
325+ *
326+ * @returns {void }
327+ */
313328function hideFormForInitialSubmission ( ) {
314329 const styleId = "coder-patch--styles-initial-submission" ;
315330 const cssOpacityVariableName = "--coder-opacity-multiplier" ;
316331
317332 /** @type {HTMLStyleElement | null } */
333+ // biome-ignore lint/style/useTemplate: Have to skip interpolation for the main.tf interpolation
318334 let styleContainer = document . querySelector ( "#" + styleId ) ;
319335 if ( ! styleContainer ) {
320336 styleContainer = document . createElement ( "style" ) ;
0 commit comments