Prettier Linting
This commit is contained in:
parent
3734b89970
commit
a4806e13ea
11 changed files with 243 additions and 201 deletions
src/routes
|
@ -3,18 +3,20 @@
|
|||
<script>
|
||||
import '../app.pcss';
|
||||
import Header from './Header.svelte';
|
||||
import { socketStore } from "$lib/stores/socketStore";
|
||||
import {beforeNavigate} from "$app/navigation";
|
||||
import { socketStore } from '$lib/stores/socketStore';
|
||||
import { beforeNavigate } from '$app/navigation';
|
||||
|
||||
$effect(() => {
|
||||
beforeNavigate((navigation) => {
|
||||
const servers = navigation.to.url.pathname === "/servers" || navigation.from.url.pathname === "/servers"
|
||||
const services = navigation.to.url.pathname === "/services" || navigation.from.url.pathname === "/services"
|
||||
if ( ! (servers && services) ) {
|
||||
$socketStore.close()
|
||||
const servers =
|
||||
navigation.to.url.pathname === '/servers' || navigation.from.url.pathname === '/servers';
|
||||
const services =
|
||||
navigation.to.url.pathname === '/services' || navigation.from.url.pathname === '/services';
|
||||
if (!(servers && services)) {
|
||||
$socketStore.close();
|
||||
}
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<Header />
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts">
|
||||
import {Separator} from "$lib/components/ui/separator";
|
||||
import {OpenInNewWindow} from "radix-icons-svelte";
|
||||
import Emfed from "$lib/components/Emfed.svelte";
|
||||
import { Separator } from '$lib/components/ui/separator';
|
||||
import { OpenInNewWindow } from 'radix-icons-svelte';
|
||||
import Emfed from '$lib/components/Emfed.svelte';
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
|
@ -9,32 +9,55 @@
|
|||
<meta name="description" content="Landing Page for neshweb.net" />
|
||||
</svelte:head>
|
||||
|
||||
<div class="grid max-h-full grid-cols-3 gap-4 justify-center overflow-auto p-8">
|
||||
<div class="flex flex-col items-center col-span-2">
|
||||
<div class="flex flex-col border rounded-md p-4 bg-black/55 backdrop-blur-sm gap-y-2">
|
||||
<h1 class="text-2xl text-center" >Home Page</h1>
|
||||
<p>I'm not sure what to put here quite yet, maybe I'll think of something eventually. In the meantime I've linked some of my accounts in the sidebar to the right</p>
|
||||
<div class="grid max-h-full grid-cols-3 justify-center gap-4 overflow-auto p-8">
|
||||
<div class="col-span-2 flex flex-col items-center">
|
||||
<div class="flex flex-col gap-y-2 rounded-md border bg-black/55 p-4 backdrop-blur-sm">
|
||||
<h1 class="text-center text-2xl">Home Page</h1>
|
||||
<p>
|
||||
I'm not sure what to put here quite yet, maybe I'll think of something eventually. In the
|
||||
meantime I've linked some of my accounts in the sidebar to the right
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="flex flex-col gap-y-1 items-center border rounded-md bg-black/55 backdrop-blur-sm py-1">
|
||||
<div
|
||||
class="flex flex-col items-center gap-y-1 rounded-md border bg-black/55 py-1 backdrop-blur-sm"
|
||||
>
|
||||
<p class="font-bold">Fediverse Accounts</p>
|
||||
<Separator class="max-w-80" />
|
||||
<a rel="me" href="https://mastodon.neshweb.net/@neshura" target="_blank" class="flex flex-row gap-1 items-center hover:text-secondary">
|
||||
<a
|
||||
rel="me"
|
||||
href="https://mastodon.neshweb.net/@neshura"
|
||||
target="_blank"
|
||||
class="flex flex-row items-center gap-1 hover:text-secondary"
|
||||
>
|
||||
Mastodon
|
||||
<OpenInNewWindow />
|
||||
</a>
|
||||
<a rel="noopener noreferrer" href="https://bookwormstory.social/u/Neshura" target="_blank" class="flex flex-row gap-1 items-center hover:text-secondary">
|
||||
<a
|
||||
rel="noopener noreferrer"
|
||||
href="https://bookwormstory.social/u/Neshura"
|
||||
target="_blank"
|
||||
class="flex flex-row items-center gap-1 hover:text-secondary"
|
||||
>
|
||||
Lemmy
|
||||
<OpenInNewWindow />
|
||||
</a>
|
||||
<a rel="noopener noreferrer" href="https://neshweb.tv/c/neshura_ch/videos" target="_blank" class="flex flex-row gap-1 items-center hover:text-secondary">
|
||||
<a
|
||||
rel="noopener noreferrer"
|
||||
href="https://neshweb.tv/c/neshura_ch/videos"
|
||||
target="_blank"
|
||||
class="flex flex-row items-center gap-1 hover:text-secondary"
|
||||
>
|
||||
PeerTube
|
||||
<OpenInNewWindow />
|
||||
</a>
|
||||
<Separator class="max-w-80" />
|
||||
<p class="font-bold">Mastodon Feed</p>
|
||||
<Separator class="max-w-80" />
|
||||
<Emfed account="https://mastodon.neshweb.net/@neshura" maxToots={4} accountId="109199738141333007"/>
|
||||
<Emfed
|
||||
account="https://mastodon.neshweb.net/@neshura"
|
||||
maxToots={4}
|
||||
accountId="109199738141333007"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -16,4 +16,3 @@
|
|||
{version}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<svelte:head>
|
||||
<title>CSS Test</title>
|
||||
<meta name="description" content="CSS playground" />
|
||||
<title>CSS Test</title>
|
||||
<meta name="description" content="CSS playground" />
|
||||
</svelte:head>
|
||||
|
||||
<p class="text-background">Background</p>
|
||||
|
@ -26,4 +26,4 @@
|
|||
<p class="text-offline">offline</p>
|
||||
<p class="text-online">online</p>
|
||||
<p class="text-pending">pending</p>
|
||||
<p class="text-maintenance">maintenance</p>
|
||||
<p class="text-maintenance">maintenance</p>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import type { Heartbeat } from '$lib/types/uptime-kuma-types';
|
||||
import ServerCard from '$lib/components/ServerCard.svelte';
|
||||
import { socketStore } from '$lib/stores/socketStore';
|
||||
import {uptimeStore} from "$lib/stores/uptimeStore";
|
||||
import { uptimeStore } from '$lib/stores/uptimeStore';
|
||||
|
||||
let { data }: { data: { promise: Promise<string> } } = $props();
|
||||
|
||||
|
@ -30,12 +30,11 @@
|
|||
if (token) {
|
||||
if (!socket.connected) {
|
||||
socket.connect();
|
||||
}
|
||||
else {
|
||||
console.log("already connected");
|
||||
} else {
|
||||
console.log('already connected');
|
||||
}
|
||||
socket.on('connect', () => {
|
||||
console.log("logging in")
|
||||
console.log('logging in');
|
||||
socket.emit('loginByToken', token, () => {});
|
||||
});
|
||||
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
import type { Service } from '$lib/types/data-types';
|
||||
import { io } from 'socket.io-client';
|
||||
import type { Heartbeat } from '$lib/types/uptime-kuma-types';
|
||||
import {socketStore} from "$lib/stores/socketStore";
|
||||
import {onDestroy} from "svelte";
|
||||
import {uptimeStore} from "$lib/stores/uptimeStore";
|
||||
import { socketStore } from '$lib/stores/socketStore';
|
||||
import { onDestroy } from 'svelte';
|
||||
import { uptimeStore } from '$lib/stores/uptimeStore';
|
||||
|
||||
let { data }: { data: { promise: Promise<string> } } = $props();
|
||||
|
||||
|
@ -29,12 +29,11 @@
|
|||
if (token) {
|
||||
if (!socket.connected) {
|
||||
socket.connect();
|
||||
}
|
||||
else {
|
||||
console.log("connected")
|
||||
} else {
|
||||
console.log('connected');
|
||||
}
|
||||
socket.on('connect', () => {
|
||||
console.log("login")
|
||||
console.log('login');
|
||||
socket.emit('loginByToken', token, () => {});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue