Add link to home

This commit is contained in:
Jon Staab
2024-10-21 15:19:55 -07:00
parent 9c57710554
commit 99f36cc7d3
3 changed files with 7 additions and 2 deletions

View File

@@ -151,7 +151,7 @@ export const addSpaceMembership = async (url: string) => {
export const removeSpaceMembership = async (url: string) => {
const list = get(userMembership) || makeList({kind: MEMBERSHIPS})
const pred = (t: string[]) => equals(["r", url], t) || t[2] !== url
const pred = (t: string[]) => t[t[0] === "r" ? 1 : 2] === url
const event = await removeFromListByPredicate(list, pred).reconcile(nip44EncryptToSelf)
return publishThunk({event, relays: ctx.app.router.WriteRelays().getUrls()}).result

View File

@@ -2,6 +2,7 @@
import {displayRelayUrl} from "@welshman/util"
import {userProfile} from "@welshman/app"
import Avatar from "@lib/components/Avatar.svelte"
import Divider from "@lib/components/Divider.svelte"
import PrimaryNavItem from "@lib/components/PrimaryNavItem.svelte"
import SpaceAdd from "@app/components/SpaceAdd.svelte"
import SpaceAvatar from "@app/components/SpaceAvatar.svelte"
@@ -21,6 +22,10 @@
<div class="relative hidden w-14 flex-shrink-0 bg-base-200 pt-4 md:block">
<div class="flex h-full flex-col justify-between">
<div>
<PrimaryNavItem title="Home" href="/home" class="tooltip-right">
<Avatar src="/flotilla.png" class="!h-10 !w-10" />
</PrimaryNavItem>
<Divider />
{#if import.meta.env.VITE_PLATFORM_RELAY}
<PrimaryNavItem
title={displayRelayUrl(import.meta.env.VITE_PLATFORM_RELAY)}

View File

@@ -3,7 +3,7 @@
</script>
<div class="btn btn-neutral flex h-[unset] w-full flex-nowrap py-4 text-left {$$props.class}">
<div class="flex flex-grow flex-row items-start gap-1">
<div class="flex flex-grow flex-row items-start gap-1 pl-2">
<div class="flex h-14 w-12 flex-shrink-0 items-center">
<slot name="icon" />
</div>