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
6 changes: 6 additions & 0 deletions src/frontend/src/lib/state/featureFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,16 @@ export const GUIDED_UPGRADE = createFeatureFlagStore(
},
);

export const MIN_GUIDED_UPGRADE = createFeatureFlagStore(
"MIN_GUIDED_UPGRADE",
false,
);

export default {
DOMAIN_COMPATIBILITY,
HARDWARE_KEY_TEST,
DISCOVERABLE_PASSKEY_FLOW,
ENABLE_ALL_LOCALES,
GUIDED_UPGRADE,
MIN_GUIDED_UPGRADE,
} as Record<string, FeatureFlagStore>;
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
import { MigrationWizard } from "$lib/components/wizards/migration";
import { handleError } from "$lib/components/utils/error";
import Dialog from "$lib/components/ui/Dialog.svelte";
import { GUIDED_UPGRADE } from "$lib/state/featureFlags";
import { GUIDED_UPGRADE, MIN_GUIDED_UPGRADE } from "$lib/state/featureFlags";
import { goto } from "$app/navigation";

const { children }: LayoutProps = $props();

let animationWrapperRef = $state<HTMLElement>();
let isUpgradeCollapsed = $state(
localStorage.getItem("ii-guided-upgrade-collapsed") === "true",
localStorage.getItem("ii-guided-upgrade-collapsed") === "true" ||
$MIN_GUIDED_UPGRADE,
);
let upgradePanelHeight = $state<number>(224);
let isUpgrading = $state(false);
Expand Down Expand Up @@ -147,7 +148,7 @@
onoutrostart={() =>
animationWrapperRef?.setAttribute("aria-hidden", "true")}
>
{#if $GUIDED_UPGRADE}
{#if $GUIDED_UPGRADE || $MIN_GUIDED_UPGRADE}
{@render upgradePanel()}
{/if}
<AuthPanel
Expand All @@ -162,13 +163,15 @@
{/key}
{:else}
<div class="relative col-start-1 row-start-1 flex flex-col gap-5">
{#if $GUIDED_UPGRADE}
{#if $GUIDED_UPGRADE || $MIN_GUIDED_UPGRADE}
{@render upgradePanel()}
{/if}
<AuthPanel
class={[
"z-1",
$GUIDED_UPGRADE && isUpgradeCollapsed && "rounded-t-none",
($GUIDED_UPGRADE || $MIN_GUIDED_UPGRADE) &&
isUpgradeCollapsed &&
"rounded-t-none",
]}
>
{@render children()}
Expand Down
Loading