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,28 +1,18 @@
<script lang="ts">
import { nonNullish } from '@dfinity/utils';
import LaunchpadGuard from '$lib/components/modules/launchpad/LaunchpadGuard.svelte';
import LaunchpadHeader from '$lib/components/modules/launchpad/LaunchpadHeader.svelte';
import LaunchpadSegments from '$lib/components/modules/launchpad/LaunchpadSegments.svelte';
import LaunchpadToolbar from '$lib/components/modules/launchpad/LaunchpadToolbar.svelte';
import { account } from '$lib/derived/console/account.derived';
import { satellites } from '$lib/derived/satellites.derived';

let filter = $state('');

// If the user was never updated, they never received credits.
// We do this check to e.g. not display the getting started banner on Skylab.
let userNoFirstCredits = $derived(
nonNullish($account) &&
$account.created_at === $account.updated_at &&
$account.credits.e8s === 0n
);

let withoutGreetingsReturningLabel = $derived(($satellites?.length ?? 0n) === 0n);
</script>

<LaunchpadGuard>
<section>
<LaunchpadHeader userGettingStarted={userNoFirstCredits} {withoutGreetingsReturningLabel}>
<LaunchpadHeader {withoutGreetingsReturningLabel}>
<LaunchpadToolbar bind:filter />
</LaunchpadHeader>

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script lang="ts">
import type { Snippet } from 'svelte';
import LaunchpadGettingStarted from '$lib/components/modules/launchpad/LaunchpadGettingStarted.svelte';
import LaunchpadGreetings from '$lib/components/modules/launchpad/LaunchpadGreetings.svelte';
import { providerDataUi } from '$lib/derived/console/account.provider.derived';
import { onIntersection } from '$lib/directives/intersection.directives';
Expand All @@ -9,16 +8,10 @@
interface Props {
children?: Snippet;
filter?: string;
userGettingStarted?: boolean;
withoutGreetingsReturningLabel?: boolean;
}

let {
filter = $bindable(''),
children,
userGettingStarted,
withoutGreetingsReturningLabel
}: Props = $props();
let { filter = $bindable(''), children, withoutGreetingsReturningLabel }: Props = $props();

const customOnIntersection = (element: HTMLElement) =>
onIntersection(element, {
Expand All @@ -28,14 +21,10 @@
</script>

<div class="header" onjunoIntersecting={onLayoutTitleIntersection} use:customOnIntersection>
{#if userGettingStarted}
<LaunchpadGettingStarted />
{:else}
<LaunchpadGreetings
providerData={$providerDataUi}
withoutReturningLabel={withoutGreetingsReturningLabel}
/>
{/if}
<LaunchpadGreetings
providerData={$providerDataUi}
withoutReturningLabel={withoutGreetingsReturningLabel}
/>

{@render children?.()}
</div>
Expand Down
1 change: 0 additions & 1 deletion src/frontend/src/lib/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@
"commander": "Commander",
"spacebuilder": "Spacebuilder",
"captain": "Captain",
"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",
Expand Down
1 change: 0 additions & 1 deletion src/frontend/src/lib/i18n/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@
"commander": "指挥官",
"spacebuilder": "太空建造者",
"captain": "船长",
"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",
Expand Down
1 change: 0 additions & 1 deletion src/frontend/src/lib/types/i18n.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ interface I18nLaunchpad {
commander: string;
spacebuilder: string;
captain: string;
getting_started_credits: string;
attach_title: string;
attach_description: string;
attach_id: string;
Expand Down
Loading