Rename front layouts to templates
This commit is contained in:
parent
da6fda02a9
commit
c0918b17ed
@ -1,6 +1,6 @@
|
||||
<script>
|
||||
import {locals} from "../../../ts/stores";
|
||||
import BaseLayout from "../../layouts/BaseLayout.svelte";
|
||||
import BaseTemplate from "../../templates/BaseTemplate.svelte";
|
||||
import Message from "../../components/Message.svelte";
|
||||
import NamePanel from "./NamePanel.svelte";
|
||||
import PasswordPanel from "./PasswordPanel.svelte";
|
||||
@ -14,7 +14,7 @@
|
||||
const emails = $locals.emails || [];
|
||||
</script>
|
||||
|
||||
<BaseLayout 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">
|
||||
<h2><Icon name="user"/> Personal information</h2>
|
||||
@ -101,4 +101,4 @@
|
||||
{/if}
|
||||
</section>
|
||||
</div>
|
||||
</BaseLayout>
|
||||
</BaseTemplate>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import {locals} from "../../ts/stores.js";
|
||||
import BaseLayout from "../layouts/BaseLayout.svelte";
|
||||
import BaseTemplate from "../templates/BaseTemplate.svelte";
|
||||
import Form from "../utils/Form.svelte";
|
||||
import Field from "../utils/Field.svelte";
|
||||
import Icon from "../utils/Icon.svelte";
|
||||
@ -18,7 +18,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<BaseLayout title="Authentication / Registration"
|
||||
<BaseTemplate title="Authentication / Registration"
|
||||
description="Join {$locals.app.name} and share your files!"
|
||||
h1="Authentication and registration">
|
||||
|
||||
@ -74,4 +74,4 @@
|
||||
</section>
|
||||
{/if}
|
||||
</div>
|
||||
</BaseLayout>
|
||||
</BaseTemplate>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import {locals} from "../../ts/stores";
|
||||
import BaseLayout from "../layouts/BaseLayout.svelte";
|
||||
import BaseTemplate from "../templates/BaseTemplate.svelte";
|
||||
import Pagination from "../components/Pagination.svelte";
|
||||
import Form from "../utils/Form.svelte";
|
||||
import Field from "../utils/Field.svelte";
|
||||
@ -16,7 +16,7 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<BaseLayout title="{$locals.app.name} - Review accounts" h1={false}>
|
||||
<BaseTemplate title="{$locals.app.name} - Review accounts" h1={false}>
|
||||
{#if hasRoute('backend')}
|
||||
<Breadcrumb currentPageTitle="Accounts pending review" pages={[
|
||||
{link: route('backend'), title:'Backend'},
|
||||
@ -78,4 +78,4 @@
|
||||
</div>
|
||||
|
||||
<Pagination pagination={$locals.pagination} routeName="accounts-approval" contextSize="3" />
|
||||
</BaseLayout>
|
||||
</BaseTemplate>
|
||||
|
@ -1,13 +1,13 @@
|
||||
<script lang="ts">
|
||||
import {locals} from "../../ts/stores.js";
|
||||
import BaseLayout from "../layouts/BaseLayout.svelte";
|
||||
import BaseTemplate from "../templates/BaseTemplate.svelte";
|
||||
import Breadcrumb from "../components/Breadcrumb.svelte";
|
||||
import Icon from "../utils/Icon.svelte";
|
||||
|
||||
const menu = $locals.menu || [];
|
||||
</script>
|
||||
|
||||
<BaseLayout title="{$locals.app.name} backend" h1={false}>
|
||||
<BaseTemplate title="{$locals.app.name} backend" h1={false}>
|
||||
<div class="container">
|
||||
<Breadcrumb currentPageTitle="Backend"/>
|
||||
|
||||
@ -30,4 +30,4 @@
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</BaseLayout>
|
||||
</BaseTemplate>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import Error from "./Error.svelte";
|
||||
import ErrorTemplate from "../templates/ErrorTemplate.svelte";
|
||||
</script>
|
||||
|
||||
<Error code={400} message="Bad request." />
|
||||
<ErrorTemplate code={400} message="Bad request." />
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import Error from "./Error.svelte";
|
||||
import ErrorTemplate from "../templates/ErrorTemplate.svelte";
|
||||
</script>
|
||||
|
||||
<Error code={401} message="Unauthorized." />
|
||||
<ErrorTemplate code={401} message="Unauthorized." />
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import Error from "./Error.svelte";
|
||||
import ErrorTemplate from "../templates/ErrorTemplate.svelte";
|
||||
</script>
|
||||
|
||||
<Error code={403} message="Forbidden" />
|
||||
<ErrorTemplate code={403} message="Forbidden" />
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import Error from "./Error.svelte";
|
||||
import ErrorTemplate from "../templates/ErrorTemplate.svelte";
|
||||
</script>
|
||||
|
||||
<Error code={404} message="Page not found." />
|
||||
<ErrorTemplate code={404} message="Page not found." />
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import Error from "./Error.svelte";
|
||||
import ErrorTemplate from "../templates/ErrorTemplate.svelte";
|
||||
</script>
|
||||
|
||||
<Error code={429} message="Too many requests." />
|
||||
<ErrorTemplate code={429} message="Too many requests." />
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import Error from "./Error.svelte";
|
||||
import ErrorTemplate from "../templates/ErrorTemplate.svelte";
|
||||
</script>
|
||||
|
||||
<Error code={500} message="Internal server error." />
|
||||
<ErrorTemplate code={500} message="Internal server error." />
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import Error from "./Error.svelte";
|
||||
import ErrorTemplate from "../templates/ErrorTemplate.svelte";
|
||||
</script>
|
||||
|
||||
<Error code={503} message="Service unavailable." />
|
||||
<ErrorTemplate code={503} message="Service unavailable." />
|
||||
|
@ -1,10 +1,10 @@
|
||||
<script lang="ts">
|
||||
import {locals} from "../ts/stores";
|
||||
import {route, hasRoute, hasAnyRoute} from "../../common/Routing";
|
||||
import BaseLayout from "./layouts/BaseLayout.svelte";
|
||||
import BaseTemplate from "./templates/BaseTemplate.svelte";
|
||||
</script>
|
||||
|
||||
<BaseLayout title="{$locals.app.name}" h1={false}>
|
||||
<BaseTemplate title="{$locals.app.name}" h1={false}>
|
||||
<div class="panel">
|
||||
<h1>swaf - Svelte Web Application Framework</h1>
|
||||
<p>Welcome to {$locals.app.name}!</p>
|
||||
@ -22,4 +22,4 @@
|
||||
</nav>
|
||||
{/if}
|
||||
</div>
|
||||
</BaseLayout>
|
||||
</BaseTemplate>
|
||||
|
@ -1,13 +1,13 @@
|
||||
<script>
|
||||
import {locals} from "../ts/stores";
|
||||
import BaseLayout from "./layouts/BaseLayout.svelte";
|
||||
import BaseTemplate from "./templates/BaseTemplate.svelte";
|
||||
import Message from "./components/Message.svelte";
|
||||
|
||||
const actionType = $locals.magicLink?.action_type;
|
||||
const h1 = 'Magic Link' + (actionType ? (' - ' + actionType) : '');
|
||||
</script>
|
||||
|
||||
<BaseLayout title="{$locals.app.name} {h1}" {h1}>
|
||||
<BaseTemplate title="{$locals.app.name} {h1}" {h1}>
|
||||
<div class="container">
|
||||
<div class="panel">
|
||||
{#if $locals.err}
|
||||
@ -18,4 +18,4 @@
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</BaseLayout>
|
||||
</BaseTemplate>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import {locals} from "../ts/stores.js";
|
||||
import BaseLayout from "./layouts/BaseLayout.svelte";
|
||||
import BaseTemplate from "./templates/BaseTemplate.svelte";
|
||||
import Message from "./components/Message.svelte";
|
||||
import WebsocketClient from "../ts/WebsocketClient.js";
|
||||
import {Time} from "../../common/Time.js";
|
||||
@ -37,7 +37,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<BaseLayout 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">
|
||||
<Message type="success" sticky
|
||||
@ -48,4 +48,4 @@
|
||||
<p class="center">Waiting for you to open the link...</p>
|
||||
</div>
|
||||
</div>
|
||||
</BaseLayout>
|
||||
</BaseTemplate>
|
||||
|
@ -64,7 +64,7 @@ export default class SvelteViewEngine extends ViewEngine {
|
||||
const view = await this.fileCache.get(actualFile, !config.get<boolean>('view.cache'));
|
||||
|
||||
// Root template
|
||||
const templateFile = await this.resolveFileFromCanonicalNameOrFail('layouts/svelte_layout.html');
|
||||
const templateFile = await this.resolveFileFromCanonicalNameOrFail('templates/svelte_template.html');
|
||||
const rawOutput = await this.fileCache.get(templateFile, !config.get<boolean>('view.cache'));
|
||||
|
||||
// Pre-compiled parts
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script>
|
||||
import {route} from "../../common/Routing";
|
||||
import BaseLayout from "./layouts/BaseLayout.svelte";
|
||||
import BaseTemplate from "./templates/BaseTemplate.svelte";
|
||||
import Message from "./components/Message.svelte";
|
||||
import Form from "./utils/Form.svelte";
|
||||
import Field from "./utils/Field.svelte";
|
||||
@ -13,7 +13,7 @@
|
||||
const paginationData = new PaginationData(20, 20, 1000).serialize();
|
||||
</script>
|
||||
|
||||
<BaseLayout title="Design test">
|
||||
<BaseTemplate title="Design test">
|
||||
<DesignButtons/>
|
||||
|
||||
<div class="panel">
|
||||
@ -114,6 +114,6 @@
|
||||
{link: route('design'), title: 'self'},
|
||||
]}/>
|
||||
</div>
|
||||
</BaseLayout>
|
||||
</BaseTemplate>
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import AllTests from "./AllTests.svelte";
|
||||
import BaseLayout from "./layouts/BaseLayout.svelte";
|
||||
import BaseLayout from "./templates/BaseTemplate.svelte";
|
||||
</script>
|
||||
|
||||
<BaseLayout title="Frontend tests">
|
||||
|
Loading…
Reference in New Issue
Block a user