1
0
Fork 0
mirror of synced 2024-07-05 06:20:55 +12:00

Formatting codebase.

This commit is contained in:
mike12345567 2020-10-13 10:04:29 +01:00
parent ca9012d07d
commit 9a38294449
7 changed files with 11 additions and 15 deletions

View file

@ -73,7 +73,7 @@
<Label extraSmall grey>Current Users</Label> <Label extraSmall grey>Current Users</Label>
{#await fetchUsersPromise} {#await fetchUsersPromise}
Loading... Loading...
{:then users} {:then [object Object]}
<ul> <ul>
{#each users as user} {#each users as user}
<li> <li>
@ -83,7 +83,7 @@
<li>No Users found</li> <li>No Users found</li>
{/each} {/each}
</ul> </ul>
{:catch error} {:catch [object Object]}
Something went wrong when trying to fetch users. Please refresh (CMD + R / Something went wrong when trying to fetch users. Please refresh (CMD + R /
CTRL + R) the page and try again. CTRL + R) the page and try again.
{/await} {/await}

View file

@ -24,7 +24,7 @@
<div class="spinner-container"> <div class="spinner-container">
<Spinner size="30" /> <Spinner size="30" />
</div> </div>
{:then apps} {:then [object Object]}
<div class="inner"> <div class="inner">
<div> <div>
<div> <div>
@ -36,7 +36,7 @@
</div> </div>
</div> </div>
</div> </div>
{:catch err} {:catch [object Object]}
<h1 style="color:red">{err}</h1> <h1 style="color:red">{err}</h1>
{/await} {/await}
</div> </div>

View file

@ -20,7 +20,7 @@
<div class="spinner-container"> <div class="spinner-container">
<Spinner size="30" /> <Spinner size="30" />
</div> </div>
{:then templates} {:then [object Object]}
<div class="templates"> <div class="templates">
{#each templates as template} {#each templates as template}
<div class="templates-card"> <div class="templates-card">
@ -39,7 +39,7 @@
</div> </div>
{/each} {/each}
</div> </div>
{:catch err} {:catch [object Object]}
<h1 style="color:red">{err}</h1> <h1 style="color:red">{err}</h1>
{/await} {/await}
</div> </div>

View file

@ -77,9 +77,9 @@
{#await promise} {#await promise}
<!-- This should probably be some kind of loading state? --> <!-- This should probably be some kind of loading state? -->
<div /> <div />
{:then _} {:then [object Object]}
<slot /> <slot />
{:catch error} {:catch [object Object]}
<p>Something went wrong: {error.message}</p> <p>Something went wrong: {error.message}</p>
{/await} {/await}
</div> </div>

View file

@ -52,9 +52,7 @@
const tableObj = await fetchTable(row.tableId) const tableObj = await fetchTable(row.tableId)
for (let key of Object.keys(tableObj.schema)) { for (let key of Object.keys(tableObj.schema)) {
if (tableObj.schema[key].type === "link") { if (tableObj.schema[key].type === "link") {
row[`${key}_count`] = Array.isArray(row[key]) row[`${key}_count`] = Array.isArray(row[key]) ? row[key].length : 0
? row[key].length
: 0
} }
} }

View file

@ -35,7 +35,7 @@
{#await _appPromise} {#await _appPromise}
loading loading
{:then _bb} {:then [object Object]}
<div id="current_component" bind:this={currentComponent} /> <div id="current_component" bind:this={currentComponent} />
{/await} {/await}

View file

@ -20,9 +20,7 @@ export default async function fetchData(datasource, store) {
rows.forEach(row => { rows.forEach(row => {
for (let key of keys) { for (let key of keys) {
if (table.schema[key].type === "link") { if (table.schema[key].type === "link") {
row[`${key}_count`] = Array.isArray(row[key]) row[`${key}_count`] = Array.isArray(row[key]) ? row[key].length : 0
? row[key].length
: 0
} }
} }
}) })