Remove duplicate routes which are never used
This commit is contained in:
parent
0a9fd26d86
commit
da9c04abef
|
@ -1,13 +0,0 @@
|
|||
<script>
|
||||
import { params } from "@roxi/routify"
|
||||
import { tables } from "stores/backend"
|
||||
|
||||
if ($params.selectedTable) {
|
||||
const table = $tables.list.find(m => m._id === $params.selectedTable)
|
||||
if (table) {
|
||||
tables.select(table)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<slot />
|
|
@ -1,16 +0,0 @@
|
|||
<script>
|
||||
import TableDataTable from "components/backend/DataTable/DataTable.svelte"
|
||||
import { tables, database } from "stores/backend"
|
||||
</script>
|
||||
|
||||
{#if $database?._id && $tables?.selected?.name}
|
||||
<TableDataTable />
|
||||
{:else}<i>Create your first table to start building</i>{/if}
|
||||
|
||||
<style>
|
||||
i {
|
||||
font-size: var(--font-size-m);
|
||||
color: var(--grey-5);
|
||||
margin-top: 2px;
|
||||
}
|
||||
</style>
|
|
@ -1,10 +0,0 @@
|
|||
<script>
|
||||
import { params } from "@roxi/routify"
|
||||
import RelationshipDataTable from "components/backend/DataTable/RelationshipDataTable.svelte"
|
||||
</script>
|
||||
|
||||
<RelationshipDataTable
|
||||
tableId={$params.selectedTable}
|
||||
rowId={$params.selectedRow}
|
||||
fieldName={decodeURI($params.selectedField)}
|
||||
/>
|
|
@ -1,6 +0,0 @@
|
|||
<script>
|
||||
import { goto } from "@roxi/routify"
|
||||
$goto("../../")
|
||||
</script>
|
||||
|
||||
<!-- routify:options index=false -->
|
|
@ -1,6 +0,0 @@
|
|||
<script>
|
||||
import { goto } from "@roxi/routify"
|
||||
$goto("../")
|
||||
</script>
|
||||
|
||||
<!-- routify:options index=false -->
|
|
@ -1,19 +0,0 @@
|
|||
<script>
|
||||
import { tables } from "stores/backend"
|
||||
import { goto, leftover } from "@roxi/routify"
|
||||
import { onMount } from "svelte"
|
||||
|
||||
onMount(async () => {
|
||||
// navigate to first table in list, if not already selected
|
||||
// and this is the final url (i.e. no selectedTable)
|
||||
if (
|
||||
!$leftover &&
|
||||
$tables.list.length > 0
|
||||
// (!$tables.selected || !$tables.selected._id)
|
||||
) {
|
||||
$goto(`./${$tables.list[0]._id}`)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<slot />
|
|
@ -1,21 +0,0 @@
|
|||
<script>
|
||||
import { goto } from "@roxi/routify"
|
||||
import { onMount } from "svelte"
|
||||
import { tables } from "stores/backend"
|
||||
|
||||
onMount(async () => {
|
||||
$tables.list.length > 0 && $goto(`./${$tables.list[0]._id}`)
|
||||
})
|
||||
</script>
|
||||
|
||||
{#if $tables.list.length === 0}
|
||||
<i>Create your first table to start building</i>
|
||||
{:else}<i>Select a table to edit</i>{/if}
|
||||
|
||||
<style>
|
||||
i {
|
||||
font-size: var(--font-size-m);
|
||||
color: var(--grey-5);
|
||||
margin-top: 2px;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue