From febde935e3cca85225cf49d8460fe05e8e05dff0 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Sat, 20 Nov 2021 19:17:02 +0100 Subject: [PATCH] Make more route usage optional --- src/assets/views/auth/account/account.svelte | 4 +++- src/assets/views/backend/accounts_approval.svelte | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/assets/views/auth/account/account.svelte b/src/assets/views/auth/account/account.svelte index ad0035d..7d0a985 100644 --- a/src/assets/views/auth/account/account.svelte +++ b/src/assets/views/auth/account/account.svelte @@ -6,7 +6,7 @@ import PasswordPanel from "./PasswordPanel.svelte"; import Form from "../../utils/Form.svelte"; import Field from "../../utils/Field.svelte"; - import {route} from "../../../../common/Routing"; + import {hasRoute, route} from "../../../../common/Routing"; const mainEmail = $locals.main_email?.email; const personalInfoFields = $locals.user_personal_info_fields || []; @@ -88,6 +88,7 @@ + {#if hasRoute('add-email')}

Add an email address:

@@ -96,6 +97,7 @@ hint="An email address we can use to identify you in case you lose access to your account" required/>
+ {/if} diff --git a/src/assets/views/backend/accounts_approval.svelte b/src/assets/views/backend/accounts_approval.svelte index 9594dc9..dd9cbc2 100644 --- a/src/assets/views/backend/accounts_approval.svelte +++ b/src/assets/views/backend/accounts_approval.svelte @@ -17,9 +17,11 @@ + {#if hasRoute('backend')} + {/if}

Accounts pending review