Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<script lang="ts">
import { nonNullish } from '@dfinity/utils';
import { Principal } from '@icp-sdk/core/principal';
import InputCanisterId from '$lib/components/app/core/InputCanisterId.svelte';
import IconLink from '$lib/components/icons/IconLink.svelte';
import CheckboxInline from '$lib/components/ui/CheckboxInline.svelte';
import Html from '$lib/components/ui/Html.svelte';

Check warning on line 7 in src/frontend/src/lib/components/modules/attach-detach/AttachSegment.svelte

View workflow job for this annotation

GitHub Actions / lint

'Html' is defined but never used. Allowed unused vars must match /^_/u
import Popover from '$lib/components/ui/Popover.svelte';
import Value from '$lib/components/ui/Value.svelte';
import { isBusy } from '$lib/derived/app/busy.derived';
Expand Down Expand Up @@ -36,7 +39,8 @@
const { result } = await attachSegment({
segmentId: Principal.fromText(canisterId),
segment,
missionControlId: $missionControlId,
missionControlId:
nonNullish($missionControlId) && attachToMissionControl ? $missionControlId : null,
identity: $authIdentity
});

Expand All @@ -59,6 +63,8 @@
)
});
};

let attachToMissionControl = $state(true);
</script>

<button class="primary" aria-label={$i18n.core.attach} onclick={() => (visible = true)}
Expand Down Expand Up @@ -91,6 +97,12 @@
{/snippet}
</InputCanisterId>

{#if nonNullish($missionControlId)}
<CheckboxInline bind:checked={attachToMissionControl}>
<span>{$i18n.launchpad.attach_to_mission_control}</span>
</CheckboxInline>
{/if}

<button class="submit" disabled={$isBusy || !validConfirm} type="submit">
{$i18n.core.submit}
</button>
Expand All @@ -106,7 +118,8 @@
margin: var(--padding-1_5x) 0 0;
}

p {
p,
span {
font-size: var(--font-size-small);
}
</style>
3 changes: 2 additions & 1 deletion src/frontend/src/lib/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,8 @@
"getting_started_credits": "Welcome to Juno! Reach out on <a href=\"https://discord.gg/wHZ57Z2RAG\" rel=\"external noopener noreferrer\" target=\"_blank\"><strong>Discord</strong></a> 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",
Expand Down
3 changes: 2 additions & 1 deletion src/frontend/src/lib/i18n/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@
"getting_started_credits": "欢迎来到 Juno!在 <a href=\"https://discord.gg/wHZ57Z2RAG\" rel=\"external noopener noreferrer\" target=\"_blank\"><strong>Discord</strong></a> 上联系我们,免费开始您的旅程。",
"attach_title": "附加模块",
"attach_description": "将现有的卫星、轨道器或 UFO 连接到您的控制台。",
"attach_id": "输入 ID"
"attach_id": "输入 ID",
"attach_to_mission_control": "同时附加到任务控制"
},
"satellites": {
"title": "所有卫星",
Expand Down
1 change: 1 addition & 0 deletions src/frontend/src/lib/types/i18n.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ interface I18nLaunchpad {
attach_title: string;
attach_description: string;
attach_id: string;
attach_to_mission_control: string;
}

interface I18nSatellites {
Expand Down
Loading