fix: build

This commit is contained in:
Torsten Dittmann
2022-03-09 19:35:49 +01:00
parent 918be9a8a6
commit fd00cc11e0
7 changed files with 74 additions and 61 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
<script context="module">
import 'ui/src/_index.scss';
import 'aw-labs-ui/src/_index.scss';
</script>
<script lang="ts">
+1 -1
View File
@@ -11,7 +11,7 @@
"aw-labs-ui": "latest"
},
"devDependencies": {
"@sveltejs/adapter-static": "^1.0.0-next.29",
"@sveltejs/adapter-static": "1.0.0-next.29",
"@sveltejs/kit": "1.0.0-next.294",
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.39",
"@testing-library/dom": "^8.11.3",
+1 -1
View File
@@ -23,7 +23,7 @@
"aw-labs-ui": "latest"
},
"devDependencies": {
"@sveltejs/adapter-static": "^1.0.0-next.29",
"@sveltejs/adapter-static": "1.0.0-next.29",
"@sveltejs/kit": "1.0.0-next.294",
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.39",
"@testing-library/dom": "^8.11.3",
+1 -1
View File
@@ -2,9 +2,9 @@
import { browser } from '$app/env';
import { page } from '$app/stores';
import { sdkForConsole, setProject } from '$lib/stores/sdk';
import type { Models } from 'src/sdk';
import { collection } from './database/collection/[collection]/store';
import { project } from './store';
import type { Models } from 'src/sdk';
type Attributes =
| Models.AttributeBoolean
+54 -49
View File
@@ -6,6 +6,7 @@
import type { Models } from 'src/sdk';
import CreatePlatform from './_createPlatform.svelte';
import { addNotification } from '$lib/stores/notifications';
import { Card } from '$lib/components';
let range: '24h' | '30d' | '90d' = '30d';
let addPlatform = false;
@@ -32,65 +33,69 @@
};
</script>
<article>
{#await requestUsage}
<div aria-busy="true" />
{:then usage}
<div class="grid">
<div>
<h2>{getLast(usage.users)}</h2>
<small>Users</small>
</div>
<div>
<h2>{getLast(usage.documents)}</h2>
<small>Documents</small>
</div>
<div>
<h2>{getLast(usage.functions)}</h2>
<small>Executions</small>
</div>
<div>
<h2>{getLast(usage.storage)}</h2>
<small>Storage</small>
</div>
</div>
{/await}
</article>
{#if $project}
<h2>Platforms</h2>
<article>
{#each $project.platforms as platform}
<h1>{$project.name}</h1>
<Card>
<button on:click={() => (range = '30d')}>30d</button>
<button on:click={() => (range = '90d')}>90d</button>
{#await requestUsage}
<div aria-busy="true" />
{:then usage}
<div class="grid">
<div>
{platform.type}
<h2>{getLast(usage.users)}</h2>
<small>Users</small>
</div>
<div>
<p>
{platform.name}
<br />
<small>{platform.hostname}</small>
</p>
</div>
<div />
<div>
<Button secondary>Update</Button>
<h2>{getLast(usage.documents)}</h2>
<small>Documents</small>
</div>
<div>
<Button on:click={() => deletePlatform(platform.$id)}>Delete</Button>
<h2>{getLast(usage.functions)}</h2>
<small>Executions</small>
</div>
<div>
<h2>{getLast(usage.storage)}</h2>
<small>Storage</small>
</div>
</div>
{:else}
<div class="grid">
<div>
<h4>No Platforms Added to Your Project</h4>
<p>Add your first platform and build your new application.</p>
{/await}
</Card>
<Card>
<h2>Platforms</h2>
<article>
{#each $project.platforms as platform}
<div class="grid">
<div>
{platform.type}
</div>
<div>
<p>
{platform.name}
<br />
<small>{platform.hostname}</small>
</p>
</div>
<div />
<div>
<Button secondary>Update</Button>
</div>
<div>
<Button on:click={() => deletePlatform(platform.$id)}>Delete</Button>
</div>
</div>
</div>
{/each}
</article>
<Button on:click={() => (addPlatform = true)}>Add Platform</Button>
<CreatePlatform bind:show={addPlatform} />
{:else}
<div class="grid">
<div>
<h4>No Platforms Added to Your Project</h4>
<p>Add your first platform and build your new application.</p>
</div>
</div>
{/each}
</article>
<Button on:click={() => (addPlatform = true)}>Add Platform</Button>
<CreatePlatform bind:show={addPlatform} />
</Card>
{/if}
<style>
+10 -7
View File
@@ -1,4 +1,5 @@
<script lang="ts">
import { Card } from '$lib/components';
import { Button } from '$lib/elements/forms';
import { sdkForConsole } from '$lib/stores/sdk';
import type { Models } from 'src/sdk';
@@ -37,13 +38,15 @@
<div aria-busy="true" />
{:then organizations}
{#each organizations as organization}
<h2>{organization.name}</h2>
{#each organization.projects as project}
<a href={`/console/${project.$id}`}><article>{project.name}</article></a>
{/each}
<article class="new-project" on:click={() => createProject(organization.$id)}>
New Project
</article>
<h1>{organization.name}</h1>
<Card>
{#each organization.projects as project}
<a href={`/console/${project.$id}`}><article>{project.name}</article></a>
{/each}
<article class="new-project" on:click={() => createProject(organization.$id)}>
New Project
</article>
</Card>
{/each}
<Button on:click={() => (addOrganization = true)}>Add Organization</Button>
{/await}
+6 -1
View File
@@ -7,7 +7,12 @@ const config = {
// for more information about preprocessors
preprocess: preprocess(),
kit: {
adapter: adapter(),
adapter: adapter({
fallback: 'index.html'
}),
prerender: {
default: true
},
trailingSlash: 'always'
}
};