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
40 changes: 40 additions & 0 deletions src/frontend/src/lib/components/app/core/Banner.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<script lang="ts">
import IconSpaceStation from '$lib/components/icons/IconSpaceStation.svelte';
import IconWarning from '$lib/components/icons/IconWarning.svelte';
import Html from '$lib/components/ui/Html.svelte';
import { i18n } from '$lib/stores/app/i18n.store';

interface Props {
display: 'dev' | 'maintenance';
}

let { display }: Props = $props();
</script>

<aside class="banner" class:warn={display === 'maintenance'}>
{#if display === 'dev'}
<IconSpaceStation /> <strong>Dev Console</strong>
{:else}
<IconWarning size="18" /> <Html text={$i18n.core.maintenance}></Html>
{/if}
</aside>

<style lang="scss">
.banner {
height: var(--banner-height);

background: var(--color-tertiary);
color: var(--color-tertiary-contrast);

display: flex;
justify-content: center;
align-items: center;

gap: var(--padding);

&.warn {
background: var(--color-warning);
color: var(--color-warning-contrast);
}
}
</style>
22 changes: 0 additions & 22 deletions src/frontend/src/lib/components/app/core/BannerSkylab.svelte

This file was deleted.

6 changes: 3 additions & 3 deletions src/frontend/src/lib/components/app/core/Navbar.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { debounce, nonNullish } from '@dfinity/utils';
import { fade } from 'svelte/transition';
import BannerSkylab from '$lib/components/app/core/BannerSkylab.svelte';
import Banner from '$lib/components/app/core/Banner.svelte';
import Logo from '$lib/components/app/core/Logo.svelte';
import NavbarSpotlight from '$lib/components/app/core/NavbarSpotlight.svelte';
import NavbarTitle from '$lib/components/app/core/NavbarTitle.svelte';
Expand Down Expand Up @@ -37,10 +37,10 @@
</script>

{#snippet banner()}
<BannerSkylab />
<Banner display={isSkylab() ? 'dev' : 'maintenance'} />
{/snippet}

<Header banner={isSkylab() ? banner : undefined} {hide}>
<Header {banner} {hide}>
<div class="start">
{#if start === 'menu'}
<ButtonMenu />
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 @@ -126,7 +126,8 @@
"environment": "Environment",
"tags": "Tags",
"edit_details": "Edit details",
"tags_placeholder": "Comma-separated or one per line. Leave empty for no tags."
"tags_placeholder": "Comma-separated or one per line. Leave empty for no tags.",
"maintenance": "Juno is in <strong>maintenance</strong> and not actively developed anymore."
},
"canisters": {
"top_up": "Top-up",
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 @@ -127,7 +127,8 @@
"environment": "运行环境",
"tags": "标签",
"edit_details": "编辑详情",
"tags_placeholder": "逗号分隔或每行一个,留空则不添加标签。"
"tags_placeholder": "逗号分隔或每行一个,留空则不添加标签。",
"maintenance": "Juno 目前处于<strong>维护模式</strong>,不再积极开发。"
},
"canisters": {
"top_up": "充值",
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 @@ -130,6 +130,7 @@ interface I18nCore {
tags: string;
edit_details: string;
tags_placeholder: string;
maintenance: string;
}

interface I18nCanisters {
Expand Down
Loading