From b7151b668e1de5aebe79e0b1bd0db41024cc7cea Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Fri, 24 Apr 2026 17:33:15 +0200 Subject: [PATCH 1/2] feat(frontend): option to skip mission control in attach --- .../modules/attach-detach/AttachSegment.svelte | 17 +++++++++++++++-- src/frontend/src/lib/i18n/en.json | 3 ++- src/frontend/src/lib/i18n/zh-cn.json | 3 ++- src/frontend/src/lib/types/i18n.d.ts | 1 + 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/frontend/src/lib/components/modules/attach-detach/AttachSegment.svelte b/src/frontend/src/lib/components/modules/attach-detach/AttachSegment.svelte index 9cf7cf1cec..ac2f2dfc3b 100644 --- a/src/frontend/src/lib/components/modules/attach-detach/AttachSegment.svelte +++ b/src/frontend/src/lib/components/modules/attach-detach/AttachSegment.svelte @@ -12,6 +12,9 @@ import { i18n } from '$lib/stores/app/i18n.store'; import { toasts } from '$lib/stores/app/toasts.store'; import { i18nCapitalize, i18nFormat } from '$lib/utils/i18n.utils'; + import CheckboxInline from '$lib/components/ui/CheckboxInline.svelte'; + import { nonNullish } from '@dfinity/utils'; + import Html from '$lib/components/ui/Html.svelte'; let visible = $state(false); @@ -36,7 +39,8 @@ const { result } = await attachSegment({ segmentId: Principal.fromText(canisterId), segment, - missionControlId: $missionControlId, + missionControlId: + nonNullish($missionControlId) && attachToMissionControl ? $missionControlId : null, identity: $authIdentity }); @@ -59,6 +63,8 @@ ) }); }; + + let attachToMissionControl = $state(true); @@ -106,7 +118,8 @@ margin: var(--padding-1_5x) 0 0; } - p { + p, + span { font-size: var(--font-size-small); } diff --git a/src/frontend/src/lib/i18n/en.json b/src/frontend/src/lib/i18n/en.json index 90e5e3dd05..643c9d55d1 100644 --- a/src/frontend/src/lib/i18n/en.json +++ b/src/frontend/src/lib/i18n/en.json @@ -322,7 +322,8 @@ "getting_started_credits": "Welcome to Juno! Reach out on Discord and we'll get you started for free.", "attach_title": "Attach Module", "attach_description": "Connect an existing Satellite, Orbiter, or UFO to your Console.", - "attach_id": "Enter ID" + "attach_id": "Enter ID", + "attach_to_mission_control": "Attach to Mission Control as well" }, "satellites": { "title": "Satellites", diff --git a/src/frontend/src/lib/i18n/zh-cn.json b/src/frontend/src/lib/i18n/zh-cn.json index 2703d35d18..f952faef32 100644 --- a/src/frontend/src/lib/i18n/zh-cn.json +++ b/src/frontend/src/lib/i18n/zh-cn.json @@ -323,7 +323,8 @@ "getting_started_credits": "欢迎来到 Juno!在 Discord 上联系我们,免费开始您的旅程。", "attach_title": "附加模块", "attach_description": "将现有的卫星、轨道器或 UFO 连接到您的控制台。", - "attach_id": "输入 ID" + "attach_id": "输入 ID", + "attach_to_mission_control": "同时附加到任务控制" }, "satellites": { "title": "所有卫星", diff --git a/src/frontend/src/lib/types/i18n.d.ts b/src/frontend/src/lib/types/i18n.d.ts index a4acac41a4..b8928cddff 100644 --- a/src/frontend/src/lib/types/i18n.d.ts +++ b/src/frontend/src/lib/types/i18n.d.ts @@ -330,6 +330,7 @@ interface I18nLaunchpad { attach_title: string; attach_description: string; attach_id: string; + attach_to_mission_control: string; } interface I18nSatellites { From d96eb43c29c0c85620a233e313c00d6ed9868617 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Fri, 24 Apr 2026 17:35:52 +0200 Subject: [PATCH 2/2] chore: fmt --- .../components/modules/attach-detach/AttachSegment.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/lib/components/modules/attach-detach/AttachSegment.svelte b/src/frontend/src/lib/components/modules/attach-detach/AttachSegment.svelte index ac2f2dfc3b..5755645429 100644 --- a/src/frontend/src/lib/components/modules/attach-detach/AttachSegment.svelte +++ b/src/frontend/src/lib/components/modules/attach-detach/AttachSegment.svelte @@ -1,7 +1,10 @@