diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 44bed4704..20132e0c2 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -36,6 +36,7 @@ module.exports = { caughtErrorsIgnorePattern: '^_' } ], - 'no-underscore-dangle': 'off' + 'no-underscore-dangle': 'off', + 'svelte/no-at-html-tags': 'off' } }; diff --git a/src/frontend/src/lib/components/core/Busy.svelte b/src/frontend/src/lib/components/core/Busy.svelte index 295cb951c..be509f8d3 100644 --- a/src/frontend/src/lib/components/core/Busy.svelte +++ b/src/frontend/src/lib/components/core/Busy.svelte @@ -4,6 +4,7 @@ import { busy } from '$lib/stores/busy.store'; import Spinner from '$lib/components/ui/Spinner.svelte'; import { isNullish, nonNullish } from '$lib/utils/utils'; + import { handleKeyPress } from '$lib/utils/keyboard.utils'; const close = () => { if (isNullish($busy) || !$busy.close) { @@ -15,7 +16,15 @@ {#if nonNullish($busy)} -
+
handleKeyPress({ $event, callback: close })} + >
{#if $busy.spinner}
diff --git a/src/frontend/src/lib/components/docs/DocForm.svelte b/src/frontend/src/lib/components/docs/DocForm.svelte index de929a5ef..68af8f8a8 100644 --- a/src/frontend/src/lib/components/docs/DocForm.svelte +++ b/src/frontend/src/lib/components/docs/DocForm.svelte @@ -5,7 +5,6 @@ import { busy } from '$lib/stores/busy.store'; import { toasts } from '$lib/stores/toasts.store'; import { RULES_CONTEXT_KEY, type RulesContext } from '$lib/types/rules.context'; - import type { Principal } from '@dfinity/principal'; import { createEventDispatcher, getContext } from 'svelte'; import { isNullish } from '$lib/utils/utils'; import { i18n } from '$lib/stores/i18n.store'; @@ -22,12 +21,10 @@ let action: DataStoreAction | undefined; $: action = $docsStore?.action; + let collection: string | undefined; $: collection = $store.rule?.[0]; - let satelliteId: Principal; - $: satelliteId = $store.satelliteId; - let key: string | undefined; $: key = $docsStore?.key; @@ -109,7 +106,7 @@
- +
- +
- + - import { missionControlStore } from '$lib/stores/mission-control.store'; import { nonNullish } from '$lib/utils/utils'; import CanisterTopUpModal from '$lib/components/modals/CanisterTopUpModal.svelte'; import { i18nFormat } from '$lib/utils/i18n.utils'; diff --git a/src/frontend/src/lib/components/ui/Json.svelte b/src/frontend/src/lib/components/ui/Json.svelte index 7e9f80dcb..7e62d1e78 100644 --- a/src/frontend/src/lib/components/ui/Json.svelte +++ b/src/frontend/src/lib/components/ui/Json.svelte @@ -1,6 +1,7 @@
@@ -8,7 +11,10 @@ class="inner" data-tid="menu-inner" class:open={$layoutMenuOpen} - on:click={() => layoutMenuOpen.set(false)} + on:keypress={($event) => handleKeyPress({ $event, callback: close })} + on:click={close} + role="button" + tabindex="-1" >