1
0
Fork 0

Compare commits

...

4 commits

Author SHA1 Message Date
Leon Grünewald
f9408d5d53 Add tab 2024-03-29 13:32:38 +01:00
Leon Grünewald
e844b67e45 Fix inital page load search 2024-03-29 13:32:31 +01:00
Leon Grünewald
42a300de0a Yeet .vscode 2024-03-29 13:32:22 +01:00
Leon Grünewald
a16d2de0b8 Clean up code 2024-03-29 13:32:13 +01:00
6 changed files with 21 additions and 17 deletions

2
.gitignore vendored
View file

@ -15,7 +15,6 @@ dist-ssr
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
@ -23,4 +22,3 @@ dist-ssr
*.njsproj
*.sln
*.sw?

View file

@ -12,6 +12,7 @@
<Tab class="text-dark-token" bind:group={tabPos} name="tab1" value={0}>Display</Tab>
<Tab class="text-dark-token" bind:group={tabPos} name="tab2" value={1}>API</Tab>
<Tab class="text-dark-token" bind:group={tabPos} name="tab3" value={2}>User</Tab>
<Tab class="text-dark-token" bind:group={tabPos} name="tab4" value={3}>Chats</Tab>
<svelte:fragment slot="panel">
{#if tabPos === 0}
@ -73,6 +74,15 @@
</div>
</div>
{/if}
{#if tabPos === 3}
<div class="flex flex-col gap-3">
<div class="">
<p class="text-dark-token font-bold">Chats</p>
<InputChip name="blacklist" label="Blacklist" bind:value={$blacklist} />
</div>
</div>
{/if}
</svelte:fragment>
</TabGroup>
</div>

View file

@ -1,8 +1,8 @@
<script>
import '../app.pcss';
import {Drawer, initializeStores, Modal, ProgressRadial, Toast} from '@skeletonlabs/skeleton';
import {loading} from '$lib/stores';
import {AppSettings} from '$lib/components';
import { Drawer, initializeStores, Modal, ProgressRadial, Toast } from '@skeletonlabs/skeleton';
import { loading } from '$lib/stores';
import { AppSettings } from '$lib/components';
initializeStores();
</script>

View file

@ -15,7 +15,7 @@
import PostList from '$lib/PostList';
const drawerStore = getDrawerStore();
const toastStore = getToastStore();
let initalSearch = true;
function onSearch() {
$loading = true;
@ -25,11 +25,14 @@
});
}
if ($postSearchResults === null) {
onSearch();
}
lastSearch.subscribe(() => {
if (initalSearch) {
initalSearch = false;
if ($postSearchResults === null) onSearch();
return
}
onSearch();
})
</script>

View file

@ -1,12 +1,6 @@
import { invoke } from "@tauri-apps/api/tauri";
export const ssr = false;
/** @type {import('./$types').PageLoad} */
export async function load({ params }) {
// const post = await invoke('get_post', {post_id: params.post_id});
return {
postId: params.post_id
};
return { postId: params.post_id };
}

View file

@ -13,7 +13,6 @@
import { BackAppRailAnchor, GlobalSearch, PostMedia, SearchAppRailAnchor } from '$lib/components';
import { onMount } from 'svelte';
import { loading, showSearch } from '$lib/stores';
import { limitImageHeight } from '$lib/settings.js';
import { TAG_TYPES } from '$lib/Tags';
import { invoke } from '@tauri-apps/api/tauri';