chore: delete dashboard svelte files
This commit is contained in:
parent
e0d1196bac
commit
06145abfa4
|
@ -1,57 +0,0 @@
|
|||
<script lang="ts">
|
||||
import "../../styles/global.scss";
|
||||
import Header from "./components/Header.svelte";
|
||||
import Art from "./components/Art.svelte";
|
||||
import { waitForConnected } from "../../../shared/util.ts";
|
||||
import { createClient } from "@lumeweb/kernel-network-registry-client";
|
||||
import Network from "./components/Network.svelte";
|
||||
import Footer from "./components/Footer.svelte";
|
||||
|
||||
const networkClient = createClient();
|
||||
|
||||
let connected = false;
|
||||
|
||||
async function getNetworks() {
|
||||
let types = {};
|
||||
|
||||
return new Promise((resolve) => {
|
||||
waitForConnected(async () => {
|
||||
connected = true;
|
||||
|
||||
const allTypes = await networkClient.getTypes();
|
||||
|
||||
for (const type of allTypes) {
|
||||
types[type] = await networkClient.getNetworksByType(type);
|
||||
}
|
||||
});
|
||||
|
||||
resolve(types);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<main>
|
||||
<Header />
|
||||
<Art />
|
||||
<div class="content connected">
|
||||
{#await getNetworks() then types}
|
||||
<div class="content-grid">
|
||||
{#each Object.entries(types) as [type, networks]}
|
||||
<div>
|
||||
<h4>{type} Networks</h4>
|
||||
<ul>
|
||||
{#each networks as network}
|
||||
<Network module={network} />
|
||||
{/each}
|
||||
</ul>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{/await}
|
||||
</div>
|
||||
<Footer />
|
||||
</main>
|
||||
|
||||
<style lang="scss">
|
||||
@import "App.scss";
|
||||
</style>
|
|
@ -1,25 +0,0 @@
|
|||
<script>
|
||||
import { waitForConnected } from "../../../../shared/util.ts";
|
||||
|
||||
let connected = false;
|
||||
let pulse = false;
|
||||
|
||||
waitForConnected(() => {
|
||||
connected = true;
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="art-wrapper" class:pulse class:connected>
|
||||
<div class="art-rotate">
|
||||
<div class="art">
|
||||
<div class="gradient-1" />
|
||||
<div class="gradient-2" />
|
||||
<div class="gradient-3" />
|
||||
<div class="gradient-4" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
@import "Art.scss";
|
||||
</style>
|
|
@ -1,28 +0,0 @@
|
|||
<script>
|
||||
import svgGithub from "../../../assets/icon/github.svg";
|
||||
import svgDiscord from "../../../assets/icon/discord.svg";
|
||||
import svgTwitter from "../../../assets/icon/twitter.svg";
|
||||
import svgFacebook from "../../../assets/icon/facebook.svg";
|
||||
import { waitForConnected } from "../../../../shared/util.ts";
|
||||
|
||||
let connected = false;
|
||||
|
||||
waitForConnected(() => {
|
||||
connected = true;
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="socials" class:connected>
|
||||
<a href="#" title="GitHub" class="github-logo">
|
||||
{@html svgGithub}
|
||||
</a>
|
||||
<a href="#" title="Discord" class="discord-logo">
|
||||
{@html svgDiscord}
|
||||
</a>
|
||||
<a href="#" title="Twitter" class="twitter-logo">
|
||||
{@html svgTwitter}
|
||||
</a>
|
||||
<a href="#" title="Facebook" class="facebook-logo">
|
||||
{@html svgFacebook}
|
||||
</a>
|
||||
</div>
|
|
@ -1,46 +0,0 @@
|
|||
<script>
|
||||
import lumeLogo from "../../../assets/lume-logo.png";
|
||||
import { waitForConnected } from "../../../../shared/util.ts";
|
||||
|
||||
let userCount;
|
||||
|
||||
let connected = false;
|
||||
|
||||
waitForConnected(() => {
|
||||
connected = true;
|
||||
});
|
||||
</script>
|
||||
|
||||
<header>
|
||||
<img src={lumeLogo} alt="Lume" />
|
||||
<div class="status">
|
||||
<div class="network" class:connected>
|
||||
<div class="connected" class:connected class:connecting={!connected}>
|
||||
<span
|
||||
class="icon"
|
||||
class:icon-success={connected}
|
||||
class:icon-wait={!connected}
|
||||
class:icon-wait-yellow={!connected} />
|
||||
Lume Network
|
||||
</div>
|
||||
</div>
|
||||
<div class="user-count" class:user-count-hidden={!userCount}>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor">
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" />
|
||||
</svg>
|
||||
{userCount}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<style lang="scss">
|
||||
@import "Header.scss";
|
||||
</style>
|
|
@ -1,35 +0,0 @@
|
|||
<script>
|
||||
import { onDestroy, onMount } from "svelte";
|
||||
import { getNetworkModuleStatus } from "@lumeweb/libkernel";
|
||||
|
||||
export let module;
|
||||
|
||||
let destroy;
|
||||
|
||||
let ready = false;
|
||||
let sync = null;
|
||||
let peers = 0;
|
||||
|
||||
onMount(() => {
|
||||
destroy = getNetworkModuleStatus((data) => {
|
||||
ready = data.ready;
|
||||
sync = data.sync;
|
||||
peers = data.peers;
|
||||
}, module);
|
||||
});
|
||||
onDestroy(() => {
|
||||
destroy?.();
|
||||
});
|
||||
</script>
|
||||
|
||||
<li class:success={ready}>
|
||||
<div class="network">
|
||||
<span class="icon" class:icon-success={ready} />
|
||||
Network
|
||||
</div>
|
||||
{#if ready}
|
||||
<div class="status">Synced</div>
|
||||
{:else}
|
||||
<div class="status">Syncing</div>
|
||||
{/if}
|
||||
</li>
|
Reference in New Issue