reorganize ui components
This commit is contained in:
parent
b6bcd37c89
commit
253752000f
14 changed files with 13 additions and 34 deletions
|
@ -1,8 +1,8 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Router, Route, createHistory } from "svelte-navigator";
|
import { Router, Route, createHistory } from "svelte-navigator";
|
||||||
import createHashSource from "./util/history";
|
import createHashSource from "./util/history";
|
||||||
import Header from "./layout/Header.svelte";
|
import Header from "./components/layout/Header.svelte";
|
||||||
import Footer from "./components/Footer.svelte";
|
import Footer from "./components/layout/Footer.svelte";
|
||||||
import { setBasePath } from "@shoelace-style/shoelace/dist/utilities/base-path.js";
|
import { setBasePath } from "@shoelace-style/shoelace/dist/utilities/base-path.js";
|
||||||
import "@shoelace-style/shoelace/dist/components/input/input.js";
|
import "@shoelace-style/shoelace/dist/components/input/input.js";
|
||||||
import "@shoelace-style/shoelace/dist/components/icon-button/icon-button.js";
|
import "@shoelace-style/shoelace/dist/components/icon-button/icon-button.js";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { createEventDispatcher } from "svelte";
|
import { createEventDispatcher } from "svelte";
|
||||||
import UpLink from "./UpLink.svelte";
|
import UpLink from "./display/UpLink.svelte";
|
||||||
import { Component, UNTYPED, UpType, Widget } from "../lib/types";
|
import { Component, UNTYPED, UpType, Widget } from "../lib/types";
|
||||||
import Table from "./widgets/Table.svelte";
|
import Table from "./widgets/Table.svelte";
|
||||||
import TableComponent from "./widgets/Table.svelte"; // silence false svelte(reactive-component) warnings
|
import TableComponent from "./widgets/Table.svelte"; // silence false svelte(reactive-component) warnings
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import AttributeView from "./AttributeView.svelte";
|
import AttributeView from "./AttributeView.svelte";
|
||||||
import { query, useEntity } from "../lib/entity";
|
import { query, useEntity } from "../lib/entity";
|
||||||
import UpObject from "./UpObject.svelte";
|
import UpObject from "./display/UpObject.svelte";
|
||||||
import { UpType } from "../lib/types";
|
import { UpType } from "../lib/types";
|
||||||
import BlobPreview from "./BlobPreview.svelte";
|
import BlobPreview from "./display/BlobPreview.svelte";
|
||||||
import { setContext } from "svelte";
|
import { setContext } from "svelte";
|
||||||
import { writable } from "svelte/store";
|
import { writable } from "svelte/store";
|
||||||
import type { UpEntry } from "upend";
|
import type { UpEntry } from "upend";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { useEntity } from "../lib/entity";
|
import { useEntity } from "../../lib/entity";
|
||||||
export let address: string;
|
export let address: string;
|
||||||
|
|
||||||
$: ({ entity } = useEntity(address));
|
$: ({ entity } = useEntity(address));
|
|
@ -2,12 +2,11 @@
|
||||||
import { createEventDispatcher } from "svelte";
|
import { createEventDispatcher } from "svelte";
|
||||||
import { BLOB_TYPE_ADDR } from "upend/constants";
|
import { BLOB_TYPE_ADDR } from "upend/constants";
|
||||||
import HashBadge from "./HashBadge.svelte";
|
import HashBadge from "./HashBadge.svelte";
|
||||||
import Ellipsis from "./Ellipsis.svelte";
|
import Ellipsis from "../utils/Ellipsis.svelte";
|
||||||
import UpLink from "./UpLink.svelte";
|
import UpLink from "./UpLink.svelte";
|
||||||
import { useEntity } from "../lib/entity";
|
import { useEntity } from "../../lib/entity";
|
||||||
import type { UpObject } from "upend";
|
|
||||||
import { readable } from "svelte/store";
|
import { readable } from "svelte/store";
|
||||||
import { notify, UpNotification } from "../notifications";
|
import { notify, UpNotification } from "../../notifications";
|
||||||
const dispatch = createEventDispatcher();
|
const dispatch = createEventDispatcher();
|
||||||
|
|
||||||
export let address: string;
|
export let address: string;
|
|
@ -1,7 +1,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { notify } from "../notifications";
|
import { notify } from "../../notifications";
|
||||||
import { fade } from "svelte/transition";
|
import { fade } from "svelte/transition";
|
||||||
import type { UpNotification } from "../notifications";
|
import type { UpNotification } from "../../notifications";
|
||||||
|
|
||||||
let notifications: UpNotification[] = [];
|
let notifications: UpNotification[] = [];
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
<script lang="ts">
|
|
||||||
import type { UpEntry } from "upend";
|
|
||||||
|
|
||||||
import Table from "./Table.svelte";
|
|
||||||
|
|
||||||
export let attributes: UpEntry[];
|
|
||||||
export let attribute: string;
|
|
||||||
export let editable = false;
|
|
||||||
|
|
||||||
$: filteredAttributes = attributes.filter(
|
|
||||||
(entry) => entry.attribute === attribute
|
|
||||||
);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<Table
|
|
||||||
columns="value"
|
|
||||||
header={false}
|
|
||||||
attributes={filteredAttributes}
|
|
||||||
{editable}
|
|
||||||
/>
|
|
|
@ -1,8 +1,8 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import filesize from "filesize";
|
import filesize from "filesize";
|
||||||
import { format, fromUnixTime } from "date-fns";
|
import { format, fromUnixTime } from "date-fns";
|
||||||
import Ellipsis from "../Ellipsis.svelte";
|
import Ellipsis from "../utils/Ellipsis.svelte";
|
||||||
import UpObject from "../UpObject.svelte";
|
import UpObject from "../display/UpObject.svelte";
|
||||||
import { createEventDispatcher, getContext } from "svelte";
|
import { createEventDispatcher, getContext } from "svelte";
|
||||||
import type { AttributeChange } from "../../types/base";
|
import type { AttributeChange } from "../../types/base";
|
||||||
import { useParams } from "svelte-navigator";
|
import { useParams } from "svelte-navigator";
|
||||||
|
|
Loading…
Reference in a new issue