Make more route usage optional

This commit is contained in:
Alice Gaudon 2021-11-20 19:17:02 +01:00
parent 3c28bd9fbe
commit febde935e3
2 changed files with 5 additions and 1 deletions

View File

@ -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 @@
</table>
</div>
{#if hasRoute('add-email')}
<Form action={route('add-email')} class="sub-panel"
submitIcon="plus" submitText="Add email address">
<h3>Add an email address:</h3>
@ -96,6 +97,7 @@
hint="An email address we can use to identify you in case you lose access to your account"
required/>
</Form>
{/if}
</section>
</div>
</BaseLayout>

View File

@ -17,9 +17,11 @@
</style>
<BaseLayout title="{$locals.app.name} - Review accounts" h1={false}>
{#if hasRoute('backend')}
<Breadcrumb currentPageTitle="Accounts pending review" pages={[
{link: route('backend'), title:'Backend'},
]}/>
{/if}
<h1>Accounts pending review</h1>