Skip to content

Commit

Permalink
Merge pull request #379 from sevonj/fix-locked-guests
Browse files Browse the repository at this point in the history
fix: hide guest actions in locked instance mode
  • Loading branch information
Xyphyn authored Jul 25, 2024
2 parents c2094fa + 4f52aa6 commit 998dcb7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions src/routes/accounts/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,12 @@
{$t('common.debug')}
</MenuButton>
{/if}
<MenuButton on:click={() => action(profile)} color="danger-subtle">
<Icon slot="prefix" src={ArrowRightOnRectangle} size="16" mini />
{$t('account.logout')}
</MenuButton>
{#if !LINKED_INSTANCE_URL || profile.user}
<MenuButton on:click={() => action(profile)} color="danger-subtle">
<Icon slot="prefix" src={ArrowRightOnRectangle} size="16" mini />
{$t('account.logout')}
</MenuButton>
{/if}
</Menu>
</div>
{/each}
Expand Down
10 changes: 6 additions & 4 deletions src/routes/login/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,12 @@
<Icon src={QuestionMarkCircle} mini size="16" />
{$t('form.forgotpassword')}
</Button>
<Button color="tertiary" href="/login/guest">
<Icon src={UserCircle} mini size="16" />
{$t('account.guest')}
</Button>
{#if !LINKED_INSTANCE_URL}
<Button color="tertiary" href="/login/guest">
<Icon src={UserCircle} mini size="16" />
{$t('account.guest')}
</Button>
{/if}
</div>
</form>
</div>

0 comments on commit 998dcb7

Please sign in to comment.