chore(front): remove unnecessary containers and reformat

This commit is contained in:
Alice Gaudon 2022-03-06 16:57:31 +01:00
parent 41a083ba52
commit 81c65344a9
6 changed files with 150 additions and 133 deletions

View File

@ -15,9 +15,11 @@
</script> </script>
<BaseTemplate title="Account" description="Manage your account settings and data."> <BaseTemplate title="Account" description="Manage your account settings and data.">
<div class="container">
<div class="panel"> <div class="panel">
<h2><Icon name="user"/> Personal information</h2> <h2>
<Icon name="user"/>
Personal information
</h2>
{#if $locals.display_email_warning && $locals.emails.length <= 0} {#if $locals.display_email_warning && $locals.emails.length <= 0}
<Message type="warning" content="To avoid losing access to your account, please add an email address."/> <Message type="warning" content="To avoid losing access to your account, please add an email address."/>
@ -41,7 +43,10 @@
{/if} {/if}
<section class="panel"> <section class="panel">
<h2 id="emails"><Icon name="shield"/> Email addresses</h2> <h2 id="emails">
<Icon name="shield"/>
Email addresses
</h2>
<div class="data-table-container"> <div class="data-table-container">
<table class="data-table"> <table class="data-table">
@ -71,7 +76,8 @@
<td>{email.email}</td> <td>{email.email}</td>
<td class="actions"> <td class="actions">
<Form action={route('set-main-email')} button <Form action={route('set-main-email')} button
submitIcon="refresh-ccw" submitText="Set as main address" submitClass="warning" submitIcon="refresh-ccw" submitText="Set as main address"
submitClass="warning"
confirm="Are you sure you want to set {email.email} as your main address?"> confirm="Are you sure you want to set {email.email} as your main address?">
<Field type="hidden" name="id" value={email.id}/> <Field type="hidden" name="id" value={email.id}/>
</Form> </Form>
@ -100,5 +106,4 @@
</Form> </Form>
{/if} {/if}
</section> </section>
</div>
</BaseTemplate> </BaseTemplate>

View File

@ -22,10 +22,12 @@
description="Join {$locals.app.name} and share your files!" description="Join {$locals.app.name} and share your files!"
h1="Authentication and registration"> h1="Authentication and registration">
<div class="container">
{#if hasRoute('login')} {#if hasRoute('login')}
<section class="panel"> <section class="panel">
<h2><Icon name="log-in"/> Log in</h2> <h2>
<Icon name="log-in"/>
Log in
</h2>
<Form action={route('login') + queryStr} submitText="Authenticate" submitIcon="log-in"> <Form action={route('login') + queryStr} submitText="Authenticate" submitIcon="log-in">
<Field type="text" name="identifier" value={$locals.query?.identifier} icon="at-sign" <Field type="text" name="identifier" value={$locals.query?.identifier} icon="at-sign"
@ -34,18 +36,28 @@
{#if !loginUsingMagicLink} {#if !loginUsingMagicLink}
<Field type="password" name="password" placeholder="Your password" icon="key" required/> <Field type="password" name="password" placeholder="Your password" icon="key" required/>
<button on:click={() => loginUsingMagicLink=true} type="button"><Icon name="mail"/> Use magic link</button> <button on:click={() => loginUsingMagicLink=true} type="button">
<Icon name="mail"/>
Use magic link
</button>
{:else} {:else}
<button on:click={() => loginUsingMagicLink=false} type="button"><Icon name="key"/> Use password</button> <button on:click={() => loginUsingMagicLink=false} type="button">
<Icon name="key"/>
Use password
</button>
{/if} {/if}
<Field type="checkbox" name="persist_session" icon="clock" placeholder="Stay logged in on this computer."/> <Field type="checkbox" name="persist_session" icon="clock"
placeholder="Stay logged in on this computer."/>
</Form> </Form>
</section> </section>
{/if} {/if}
{#if hasRoute('register')} {#if hasRoute('register')}
<section class="panel"> <section class="panel">
<h2><Icon name="user-plus"/> Register</h2> <h2>
<Icon name="user-plus"/>
Register
</h2>
<Form action={route('register') + queryStr} submitText="Register" submitIcon="check"> <Form action={route('register') + queryStr} submitText="Register" submitIcon="check">
<Field type="hidden" name="auth_method" value={registerUsingMagicLink ? 'magic_link': 'password'}/> <Field type="hidden" name="auth_method" value={registerUsingMagicLink ? 'magic_link': 'password'}/>
@ -60,11 +72,18 @@
<Field type="email" name="identifier" icon="at-sign" placeholder="Your email address" <Field type="email" name="identifier" icon="at-sign" placeholder="Your email address"
hint="You will receive a magic link in your mailbox. Click on the link from any device to register here." hint="You will receive a magic link in your mailbox. Click on the link from any device to register here."
required/> required/>
<button on:click={() => registerUsingMagicLink=false} type="button"><Icon name="key"/>Use password</button> <button on:click={() => registerUsingMagicLink=false} type="button">
<Icon name="key"/>
Use password
</button>
{:else} {:else}
<Field type="password" name="password" icon="key" placeholder="Choose a password" required/> <Field type="password" name="password" icon="key" placeholder="Choose a password" required/>
<Field type="password" name="password_confirmation" icon="key" placeholder="Confirm your password" required/> <Field type="password" name="password_confirmation" icon="key" placeholder="Confirm your password"
<button on:click={() => registerUsingMagicLink=true} type="button"><Icon name="at-sign"/>Use email address instead</button> required/>
<button on:click={() => registerUsingMagicLink=true} type="button">
<Icon name="at-sign"/>
Use email address instead
</button>
{/if} {/if}
<Field type="checkbox" name="terms" icon="file-text" required> <Field type="checkbox" name="terms" icon="file-text" required>
@ -73,5 +92,4 @@
</Form> </Form>
</section> </section>
{/if} {/if}
</div>
</BaseTemplate> </BaseTemplate>

View File

@ -8,7 +8,6 @@
</script> </script>
<BaseTemplate title="{$locals.app.name} backend" h1={false}> <BaseTemplate title="{$locals.app.name} backend" h1={false}>
<div class="container">
<Breadcrumb currentPageTitle="Backend"/> <Breadcrumb currentPageTitle="Backend"/>
<h1>App administration</h1> <h1>App administration</h1>
@ -29,5 +28,4 @@
</ul> </ul>
</nav> </nav>
</div> </div>
</div>
</BaseTemplate> </BaseTemplate>

View File

@ -8,7 +8,6 @@
</script> </script>
<BaseTemplate title="{$locals.app.name} {h1}" {h1}> <BaseTemplate title="{$locals.app.name} {h1}" {h1}>
<div class="container">
<div class="panel"> <div class="panel">
{#if $locals.err} {#if $locals.err}
<Message type="error" content={$locals.err}/> <Message type="error" content={$locals.err}/>
@ -17,5 +16,4 @@
<p>You can now close this page.</p> <p>You can now close this page.</p>
{/if} {/if}
</div> </div>
</div>
</BaseTemplate> </BaseTemplate>

View File

@ -38,7 +38,6 @@
</script> </script>
<BaseTemplate h1="Authentication lobby" title="{$locals.app.name} authentication lobby"> <BaseTemplate h1="Authentication lobby" title="{$locals.app.name} authentication lobby">
<div class="container">
<div class="panel"> <div class="panel">
<Message type="success" sticky <Message type="success" sticky
content={`We sent a link to ${$locals.email}. To authenticate, open it from any device.`}/> content={`We sent a link to ${$locals.email}. To authenticate, open it from any device.`}/>
@ -47,5 +46,4 @@
<p class="center">Waiting for you to open the link...</p> <p class="center">Waiting for you to open the link...</p>
</div> </div>
</div>
</BaseTemplate> </BaseTemplate>