-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from idkncc/feat/settings
feat: settings page
- Loading branch information
Showing
42 changed files
with
912 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.settings-navbar { | ||
@apply grid grid-cols-[5fr_3fr_2fr] gap-2 items-center; | ||
@apply bg-secondary text-secondary-foreground rounded-xl border; | ||
@apply p-2; | ||
|
||
.shortcuts { | ||
@apply flex gap-1; | ||
@apply p-2; | ||
@apply bg-background text-foreground border border-dashed rounded-lg; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<script> | ||
import "./ShortcutsDialog.scss"; | ||
import * as Section from "@ui/section"; | ||
import { Input } from "@ui/input"; | ||
import { Root } from "@ui/dialog"; | ||
</script> | ||
|
||
<div class="settings-navbar"> | ||
<div class="shortcuts"> | ||
<p>Home</p> | ||
<p>Friends</p> | ||
<p>Discovery</p> | ||
</div> | ||
|
||
<div class="navbar-search"> | ||
<div class="input-container"> | ||
<Input | ||
class="control-input" | ||
type="search" | ||
placeholder="Search..." | ||
/> | ||
<button class="search-button"> | ||
<svg | ||
class="search-icon" | ||
aria-hidden="true" | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="24" | ||
height="24" | ||
fill="none" | ||
viewBox="0 0 24 24" | ||
> | ||
<path | ||
stroke="currentColor" | ||
stroke-linecap="round" | ||
stroke-width="2" | ||
d="m21 21-3.5-3.5M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z" | ||
/> | ||
</svg> | ||
</button> | ||
</div> | ||
</div> | ||
|
||
<p>John Doe</p> | ||
</div> | ||
|
||
<br /> | ||
|
||
<Section.Root> | ||
<Section.Title>Available elements</Section.Title> | ||
<Section.Content> | ||
<p class="cursor-default">Home</p> | ||
<p class="cursor-default">Friends</p> | ||
<p class="cursor-default">Discovery</p> | ||
</Section.Content> | ||
</Section.Root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<script lang="ts"> | ||
import { page } from "$app/stores"; | ||
import { Badge } from "@ui/badge"; | ||
import { Button } from "@ui/button"; | ||
export let href: string; | ||
export let title: string; | ||
export let badge: "wip" | "beta" | "new" | undefined = undefined; | ||
</script> | ||
|
||
<a class:settings-page-active={$page.route.id === href} {href}> | ||
<Button variant="ghost" class="w-full flex"> | ||
{title} | ||
|
||
<span class="flex-grow" /> | ||
|
||
{#if badge !== undefined} | ||
{#if badge === "wip"} | ||
<Badge class="ml-2" variant="warning">WIP</Badge> | ||
{:else if badge === "beta"} | ||
<Badge class="ml-2" variant="destructive">BETA</Badge> | ||
{:else if badge === "new"} | ||
<Badge class="ml-2" variant="info">NEW</Badge> | ||
{/if} | ||
{/if} | ||
</Button> | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#navbar-profile-tooltip { | ||
@apply border border-secondary; | ||
@apply overflow-hidden backdrop-blur-xl; | ||
@apply w-full rounded-lg; | ||
@apply z-50; | ||
|
||
.tooltip-header { | ||
@apply bg-secondary/80 text-secondary-foreground; | ||
@apply w-full p-2; | ||
} | ||
|
||
.tooltip-body { | ||
@apply p-1.5; | ||
@apply flex flex-col; | ||
|
||
&>* { | ||
@apply w-full; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<script lang="ts"> | ||
import { type Variant, badgeVariants } from "./index.js"; | ||
import { cn } from "$lib/utils.js"; | ||
let className: string | undefined | null = undefined; | ||
export let href: string | undefined = undefined; | ||
export let variant: Variant = "default"; | ||
export { className as class }; | ||
</script> | ||
|
||
<svelte:element | ||
this={href ? "a" : "span"} | ||
{href} | ||
class={cn(badgeVariants({ variant, className }))} | ||
{...$$restProps} | ||
> | ||
<slot /> | ||
</svelte:element> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { type VariantProps, tv } from "tailwind-variants"; | ||
|
||
export { default as Badge } from "./badge.svelte"; | ||
export const badgeVariants = tv({ | ||
base: "focus:ring-ring inline-flex select-none items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2", | ||
variants: { | ||
variant: { | ||
default: | ||
"bg-primary text-primary-foreground hover:bg-primary/80 border-transparent shadow", | ||
secondary: | ||
"bg-secondary text-secondary-foreground hover:bg-secondary/80 border-transparent", | ||
warning: | ||
"bg-yellow-500 text-white dark:bg-yellow-600 dark:text-white hover:bg-yellow-500/80 dark:hover:bg-yellow-600/80 border-transparent", | ||
destructive: | ||
"bg-destructive text-destructive-foreground hover:bg-destructive/80 border-transparent shadow", | ||
info: | ||
"bg-green-600 dark:bg-green-700 text-white hover:bg-green-600/80 dark:hover:bg-green-700/80 border-transparent shadow", | ||
outline: "text-foreground", | ||
|
||
}, | ||
}, | ||
defaultVariants: { | ||
variant: "default", | ||
}, | ||
}); | ||
|
||
export type Variant = VariantProps<typeof badgeVariants>["variant"]; |
Oops, something went wrong.