Skip to content

Commit

Permalink
Hide change users button as well and just show it if user is on devmode
Browse files Browse the repository at this point in the history
  • Loading branch information
lgmarchi committed Oct 3, 2024
1 parent 96cc474 commit 9f856aa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/lib/layouts/login/Entrypoint.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@

<div class="unlock-controls">
<Controls>
<Button tooltip={$_("pages.auth.changeUser")} hook="button-change-user" icon on:click={_ => (showAccounts = true)} appearance={Appearance.Alt}>
<Icon icon={Shape.Profile} />
</Button>
{#if get(SettingsStore.state).devmode}
<Button tooltip={$_("pages.auth.changeUser")} hook="button-change-user" icon on:click={_ => (showAccounts = true)} appearance={Appearance.Alt}>
<Icon icon={Shape.Profile} />
</Button>
{/if}
<Button tooltip={$_("pages.auth.relay")} hook="button-configure-relay" icon on:click={_ => (showConfigureRelay = true)} appearance={Appearance.Alt}>
<Icon icon={Shape.Relay} />
</Button>
Expand Down
9 changes: 6 additions & 3 deletions src/lib/layouts/login/Unlock.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import { Controls } from "$lib/layouts"
import { AuthStore } from "$lib/state/auth"
import { createEventDispatcher } from "svelte"
import { SettingsStore } from "$lib/state"
export let create: boolean = false
Expand Down Expand Up @@ -76,9 +77,11 @@

<div class="unlock-controls">
<Controls>
<Button tooltip={$_("pages.auth.changeUser")} hook="button-change-user" icon on:click={_ => (showAccounts = true)} appearance={Appearance.Alt}>
<Icon icon={Shape.Profile} />
</Button>
{#if get(SettingsStore.state).devmode}
<Button tooltip={$_("pages.auth.changeUser")} hook="button-change-user" icon on:click={_ => (showAccounts = true)} appearance={Appearance.Alt}>
<Icon icon={Shape.Profile} />
</Button>
{/if}
<Button tooltip={$_("pages.auth.relay")} hook="button-configure-relay" icon on:click={_ => (showConfigureRelay = true)} appearance={Appearance.Alt}>
<Icon icon={Shape.Relay} />
</Button>
Expand Down

0 comments on commit 9f856aa

Please sign in to comment.