From e7279592c6b7a3240f1238ca723d55c9739e0d8e Mon Sep 17 00:00:00 2001 From: MohamedElmdary Date: Mon, 27 May 2024 13:44:27 +0300 Subject: [PATCH 1/4] fix: some input.el are refs and other regular html fix: input.status might be ref --- .../src/components/weblet_layout.vue | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/playground/src/components/weblet_layout.vue b/packages/playground/src/components/weblet_layout.vue index 5f05c59514..404f41974e 100644 --- a/packages/playground/src/components/weblet_layout.vue +++ b/packages/playground/src/components/weblet_layout.vue @@ -202,7 +202,7 @@ function validateBeforeDeploy(fn: () => void) { const inputs = form.inputs as unknown as InputValidatorService[]; for (const input of inputs) { - const status = input.status; + const status = typeof input.status === "string" ? input.status : (input.status as any)?.value; if (status === ValidatorStatus.Invalid) { errorInput = [i, input.$el]; break out; @@ -217,7 +217,14 @@ function validateBeforeDeploy(fn: () => void) { } if (errorInput) { - const [tab, input] = errorInput; + const [tab, __input] = errorInput; + + const input = + __input && typeof __input === "object" && "value" in __input && __input.value instanceof HTMLElement + ? __input.value + : __input instanceof HTMLElement + ? __input + : null; if (!input || !__setTab) { return; @@ -227,7 +234,12 @@ function validateBeforeDeploy(fn: () => void) { // Timeout so the ui gets render before scroll setTimeout(() => { - const _input = input.querySelector("textarea") || input.querySelector("input") || input; + const _input = input.querySelector("textarea") || input.querySelector("input") || null; + if (!(_input instanceof HTMLElement)) { + return; + } + + console.log({ errorInput }); document.addEventListener("scrollend", () => _input.focus(), { once: true }); _input.scrollIntoView({ behavior: "smooth", block: "center" }); }, 250); From 932422c62adf00eebb3cbedae1ce7a98dcd16e9c Mon Sep 17 00:00:00 2001 From: MohamedElmdary Date: Mon, 27 May 2024 13:57:43 +0300 Subject: [PATCH 2/4] - fix: add d-tabs(config) to tf_algorand solution - fix: add d-tabs(config) to tf_casperlabs solution - fix: add d-tabs(config) to tf_funkwhale solution - fix: add d-tabs(config) to tf_nextcloud solution - fix: add d-tabs(config) to tf_node_pilot solution - fix: add d-tabs(config) to tf_peertube solution - fix: add d-tabs(config) to tf_staticwebsite solution - fix: add d-tabs(config) to tf_subsquid solution - fix: add d-tabs(config) to tf_umbrel solution - fix: add d-tabs(config) to tf_wordpress solution --- packages/playground/src/weblets/tf_algorand.vue | 8 +++----- packages/playground/src/weblets/tf_casperlabs.vue | 5 ++--- packages/playground/src/weblets/tf_funkwhale.vue | 5 ++--- packages/playground/src/weblets/tf_nextcloud.vue | 5 ++--- packages/playground/src/weblets/tf_node_pilot.vue | 5 ++--- packages/playground/src/weblets/tf_peertube.vue | 5 ++--- packages/playground/src/weblets/tf_staticwebsite.vue | 5 ++--- packages/playground/src/weblets/tf_subsquid.vue | 5 ++--- packages/playground/src/weblets/tf_umbrel.vue | 8 +++----- packages/playground/src/weblets/tf_wordpress.vue | 5 ++--- 10 files changed, 22 insertions(+), 34 deletions(-) diff --git a/packages/playground/src/weblets/tf_algorand.vue b/packages/playground/src/weblets/tf_algorand.vue index 8031f1b81c..12c2ec8e9f 100644 --- a/packages/playground/src/weblets/tf_algorand.vue +++ b/packages/playground/src/weblets/tf_algorand.vue @@ -11,7 +11,7 @@ title-image="images/icons/algorand.png" > - + - + @@ -184,15 +184,13 @@ import { computed, type Ref, ref, watch } from "vue"; import { manual } from "@/utils/manual"; import { useLayout } from "../components/weblet_layout.vue"; -import { useGrid, useProfileManager } from "../stores"; +import { useGrid } from "../stores"; import { type Flist, ProjectName, type Validators } from "../types"; import { deployVM } from "../utils/deploy_vm"; import { generateName } from "../utils/strings"; const layout = useLayout(); -const valid = ref(false); const lastRoundInput = ref(); -const profileManager = useProfileManager(); const flist: Flist = { value: "https://hub.grid.tf/tf-official-apps/algorand-latest.flist", entryPoint: "/sbin/zinit init", diff --git a/packages/playground/src/weblets/tf_casperlabs.vue b/packages/playground/src/weblets/tf_casperlabs.vue index 88dbfb659a..1fb732fa13 100644 --- a/packages/playground/src/weblets/tf_casperlabs.vue +++ b/packages/playground/src/weblets/tf_casperlabs.vue @@ -12,7 +12,7 @@ > - + - +