Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI improvements #140

Merged
merged 6 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
182 changes: 0 additions & 182 deletions App.svelte

This file was deleted.

Binary file added src/assets/Logo2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions src/lib/components/ButtonWithLoader/ButtonWithLoader.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<script lang="ts">
import { Button } from "$lib/components/ui/button";
import { Loader } from "lucide-svelte";
import { fly } from "svelte/transition";
import { twMerge } from "tailwind-merge";
export let disabled: boolean = false;
export let loader = false;
</script>

<Button
class={twMerge(
"disabled:cursor-not-allowed disabled:opacity-100 disabled:text-muted-foreground disabled:bg-secondary",
$$props.class,
)}
{disabled}
on:click
>
{#if loader}
<div
in:fly={{ delay: 300, duration: 300, x: -50, opacity: 0 }}
out:fly={{ duration: 200, x: -50, opacity: 0 }}
>
<Loader
class={twMerge("h-7 w-7 animate-spin", $$props.loaderClass)}
/>
</div>
{:else}
<div
in:fly={{ delay: 200, duration: 300, x: 50, opacity: 0 }}
out:fly={{ duration: 200, x: 50, opacity: 0 }}
>
<slot />
</div>
{/if}
</Button>
1 change: 1 addition & 0 deletions src/lib/components/Messages/MessagesPage.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div></div>
34 changes: 25 additions & 9 deletions src/lib/components/UserList/UserList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,45 @@
import { currentUser } from "$lib/stores/profile.store";
let userelays: Array<UserInfo> = [];
let title = "You might like"
let title = "You might like";
users.subscribe((value) => (userelays = value.filter(relay => relay.Process != $currentUser.Process)));
users.subscribe(
(value) =>
(userelays = value.filter(
(relay) => relay.Process != $currentUser.Process,
)),
);
onMount(async () => {
console.log("********Mounted*******");
await relays("1", "100");
});
</script>

<div>
<div class="w-full h-full">
<Card.Root
data-x-chunk-name="UserList"
data-x-chunk-description="A card showing a list of users."
class="border-border rounded"
class="border-border rounded p-0 max-w-[380px] min-w-[280px]"
>
<Card.Header>
<Card.Title>{title}</Card.Title>
</Card.Header>
<Card.Content class="grid gap-8">
{#each userelays as userelay}
<ProfileCard data={userelay} />
{/each}
<Card.Content class="w-full">
<div
class="grid gap-8 max-h-[80vh] overflow-y-auto scrollable-element pr-3 w-full max-w-full"
>
{#each userelays as userelay}
<ProfileCard data={userelay} />
{/each}
</div>
</Card.Content>
</Card.Root>
</div>
</div>

<style>
.scrollable-element {
scrollbar-color: hsl(0, 0%, 45%) hsl(0 0% 14.9%);
scrollbar-width: thin;
}
</style>
Loading
Loading