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
Expand Up @@ -16,7 +16,7 @@
};
</script>

<LaunchpadHeader withoutGreetingsReturningLabel />
<LaunchpadHeader newUser />

<LaunchpadButton onclick={createSatellite} testId={testIds.launchpad.launch}>
<div class="new">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<script lang="ts">
import Html from '$lib/components/ui/Html.svelte';
import Info from '$lib/components/ui/Info.svelte';
import { i18n } from '$lib/stores/app/i18n.store';
</script>

<Info>
{#snippet icon()}
<span>👋</span>
{/snippet}

<Html text={$i18n.launchpad.getting_started_credits} />
</Info>

<style lang="scss">
span {
font-size: 32px;
}
</style>
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<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 @@ -8,10 +9,10 @@
interface Props {
children?: Snippet;
filter?: string;
withoutGreetingsReturningLabel?: boolean;
newUser?: boolean;
}

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

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

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

{@render children?.()}
</div>
Expand Down
10 changes: 8 additions & 2 deletions src/frontend/src/lib/components/ui/Info.svelte
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
<script lang="ts">
import { nonNullish } from '@dfinity/utils';
import type { Snippet } from 'svelte';
import IconInfo from '$lib/components/icons/IconInfo.svelte';

interface Props {
children: Snippet;
icon?: Snippet;
}

let { children }: Props = $props();
let { children, icon }: Props = $props();
</script>

<p><span class="icon"><IconInfo size="32px" /></span> <span>{@render children()}</span></p>
<p>
<span class="icon"
>{#if nonNullish(icon)}{@render icon()}{:else}<IconInfo size="32px" />{/if}</span
> <span>{@render children()}</span>
</p>

<style lang="scss">
@use '../../styles/mixins/info';
Expand Down
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 @@ -311,7 +311,8 @@
"greetings": "Greetings",
"commander": "Commander",
"spacebuilder": "Spacebuilder",
"captain": "Captain"
"captain": "Captain",
"getting_started_credits": "Welcome to Juno! Getting started is free — reach out on <a href=\"https://discord.gg/wHZ57Z2RAG\" rel=\"external noopener noreferrer\" target=\"_blank\"><strong>Discord</strong></a> and we'll set you up with your first credits."
},
"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 @@ -312,7 +312,8 @@
"greetings": "您好",
"commander": "指挥官",
"spacebuilder": "太空建造者",
"captain": "船长"
"captain": "船长",
"getting_started_credits": "欢迎来到 Juno!入门免费 — 在 <a href=\"https://discord.gg/wHZ57Z2RAG\" rel=\"external noopener noreferrer\" target=\"_blank\"><strong>Discord</strong></a> 上联系我们,我们将为您提供初始积分。"
},
"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 @@ -319,6 +319,7 @@ interface I18nLaunchpad {
commander: string;
spacebuilder: string;
captain: string;
getting_started_credits: string;
}

interface I18nSatellites {
Expand Down
Loading