Remove themes page
This commit is contained in:
@@ -11,7 +11,8 @@
|
||||
|
||||
const next = () => {
|
||||
window.open("https://relay.tools/signup")
|
||||
pushModal(SpaceInviteAccept)
|
||||
|
||||
setTimeout(() => pushModal(SpaceInviteAccept), 300)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
<script lang="ts">
|
||||
import {fly} from "@lib/transition"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Page from "@lib/components/Page.svelte"
|
||||
import SecondaryNav from "@lib/components/SecondaryNav.svelte"
|
||||
import SecondaryNavItem from "@lib/components/SecondaryNavItem.svelte"
|
||||
import SecondaryNavSection from "@lib/components/SecondaryNavSection.svelte"
|
||||
</script>
|
||||
|
||||
<SecondaryNav>
|
||||
<SecondaryNavSection>
|
||||
<div in:fly>
|
||||
<SecondaryNavItem href="/discover">
|
||||
<Icon icon="widget" /> Spaces
|
||||
</SecondaryNavItem>
|
||||
</div>
|
||||
<div in:fly={{delay: 50}}>
|
||||
<SecondaryNavItem href="/discover/themes">
|
||||
<Icon icon="pallete-2" /> Themes
|
||||
</SecondaryNavItem>
|
||||
</div>
|
||||
</SecondaryNavSection>
|
||||
</SecondaryNav>
|
||||
|
||||
<Page>
|
||||
<slot />
|
||||
</Page>
|
||||
@@ -6,6 +6,7 @@
|
||||
import {relays, createSearch, relaySelections} from "@welshman/app"
|
||||
import {createScroller} from "@lib/html"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import Page from "@lib/components/Page.svelte"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import PageHeader from "@lib/components/PageHeader.svelte"
|
||||
import RelayName from "@app/components/RelayName.svelte"
|
||||
@@ -72,55 +73,57 @@
|
||||
})
|
||||
</script>
|
||||
|
||||
<div class="content column gap-4" bind:this={element}>
|
||||
<PageHeader>
|
||||
<div slot="title">Discover Spaces</div>
|
||||
<div slot="info">Find communities all across the nostr network</div>
|
||||
</PageHeader>
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon="magnifer" />
|
||||
<input bind:value={term} class="grow" type="text" placeholder="Search for spaces..." />
|
||||
</label>
|
||||
{#each relaySearch.searchOptions(term).slice(0, limit) as relay (relay.url)}
|
||||
<Button
|
||||
class="card2 bg-alt col-4 text-left shadow-xl transition-all hover:shadow-2xl hover:brightness-[1.1]"
|
||||
on:click={() => openSpace(relay.url)}>
|
||||
<div class="col-2">
|
||||
<div class="relative flex gap-4">
|
||||
<div class="relative">
|
||||
<div class="avatar relative">
|
||||
<div
|
||||
class="center !flex h-12 w-12 min-w-12 rounded-full border-2 border-solid border-base-300 bg-base-300">
|
||||
{#if relay.profile?.icon}
|
||||
<img alt="" src={relay.profile.icon} />
|
||||
{:else}
|
||||
<Icon icon="ghost" size={5} />
|
||||
{/if}
|
||||
<Page>
|
||||
<div class="content column gap-4" bind:this={element}>
|
||||
<PageHeader>
|
||||
<div slot="title">Discover Spaces</div>
|
||||
<div slot="info">Find communities all across the nostr network</div>
|
||||
</PageHeader>
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon="magnifer" />
|
||||
<input bind:value={term} class="grow" type="text" placeholder="Search for spaces..." />
|
||||
</label>
|
||||
{#each relaySearch.searchOptions(term).slice(0, limit) as relay (relay.url)}
|
||||
<Button
|
||||
class="card2 bg-alt col-4 text-left shadow-xl transition-all hover:shadow-2xl hover:brightness-[1.1]"
|
||||
on:click={() => openSpace(relay.url)}>
|
||||
<div class="col-2">
|
||||
<div class="relative flex gap-4">
|
||||
<div class="relative">
|
||||
<div class="avatar relative">
|
||||
<div
|
||||
class="center !flex h-12 w-12 min-w-12 rounded-full border-2 border-solid border-base-300 bg-base-300">
|
||||
{#if relay.profile?.icon}
|
||||
<img alt="" src={relay.profile.icon} />
|
||||
{:else}
|
||||
<Icon icon="ghost" size={5} />
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{#if getMembershipUrls($userMembership).includes(relay.url)}
|
||||
<div
|
||||
class="tooltip absolute -right-1 -top-1 h-5 w-5 rounded-full bg-primary"
|
||||
data-tip="You are already a member of this space.">
|
||||
<Icon icon="check-circle" class="scale-110" />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div>
|
||||
<h2 class="ellipsize whitespace-nowrap text-xl">
|
||||
<RelayName url={relay.url} />
|
||||
</h2>
|
||||
<p class="text-sm opacity-75">{relay.url}</p>
|
||||
</div>
|
||||
{#if getMembershipUrls($userMembership).includes(relay.url)}
|
||||
<div
|
||||
class="tooltip absolute -right-1 -top-1 h-5 w-5 rounded-full bg-primary"
|
||||
data-tip="You are already a member of this space.">
|
||||
<Icon icon="check-circle" class="scale-110" />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div>
|
||||
<h2 class="ellipsize whitespace-nowrap text-xl">
|
||||
<RelayName url={relay.url} />
|
||||
</h2>
|
||||
<p class="text-sm opacity-75">{relay.url}</p>
|
||||
<RelayDescription url={relay.url} />
|
||||
</div>
|
||||
{#if gt($wotGraph.get(relay.url)?.size, 0)}
|
||||
<div class="row-2 card2 card2-sm bg-alt">
|
||||
Members:
|
||||
<ProfileCircles pubkeys={Array.from($wotGraph.get(relay.url) || [])} />
|
||||
</div>
|
||||
</div>
|
||||
<RelayDescription url={relay.url} />
|
||||
</div>
|
||||
{#if gt($wotGraph.get(relay.url)?.size, 0)}
|
||||
<div class="row-2 card2 card2-sm bg-alt">
|
||||
Members:
|
||||
<ProfileCircles pubkeys={Array.from($wotGraph.get(relay.url) || [])} />
|
||||
</div>
|
||||
{/if}
|
||||
</Button>
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
</Button>
|
||||
{/each}
|
||||
</div>
|
||||
</Page>
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
<script lang="ts">
|
||||
import themes from "daisyui/src/theming/themes"
|
||||
import {identity} from "@welshman/lib"
|
||||
import {createSearch} from "@welshman/app"
|
||||
import Icon from "@lib/components/Icon.svelte"
|
||||
import PageHeader from "@lib/components/PageHeader.svelte"
|
||||
import {theme} from "@app/theme"
|
||||
|
||||
let term = ""
|
||||
|
||||
const searchThemes = createSearch(Object.keys(themes), {getValue: identity})
|
||||
</script>
|
||||
|
||||
<div class="content column gap-4">
|
||||
<PageHeader>
|
||||
<div slot="title">Discover Themes</div>
|
||||
<div slot="info">Make your community feel like home</div>
|
||||
</PageHeader>
|
||||
<label class="input input-bordered flex w-full items-center gap-2">
|
||||
<Icon icon="magnifer" />
|
||||
<input bind:value={term} class="grow" type="text" placeholder="Search for themes..." />
|
||||
</label>
|
||||
<div class="grid grid-cols-2 gap-4 md:grid-cols-2">
|
||||
{#each searchThemes.searchValues(term) as name}
|
||||
<div class="card2 bg-alt flex flex-col justify-center gap-4 shadow-xl" data-theme={name}>
|
||||
<h2 class="card2 bg-alt text-center capitalize">{name}</h2>
|
||||
<button class="btn btn-primary w-full" on:click={() => theme.set(name)}>Use Theme</button>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user