Tweak settings page, hide alerts

This commit is contained in:
Jon Staab
2025-03-04 10:58:14 -08:00
parent 479fed34f7
commit 901e56a625
3 changed files with 22 additions and 10 deletions

View File

@@ -11,7 +11,10 @@
<div class="card2 bg-alt flex flex-col gap-6 shadow-xl">
<div class="flex items-center justify-between">
<strong>Alerts</strong>
<strong class="flex items-center gap-3">
<Icon icon="inbox" />
Alerts
</strong>
<Button class="btn btn-primary btn-sm" onclick={startAlert}>
<Icon icon="add-circle" />
Add Alert

View File

@@ -17,7 +17,7 @@
import ModalFooter from "@lib/components/ModalFooter.svelte"
import {pushToast} from "@app/toast"
import {logout} from "@app/commands"
import {INDEXER_RELAYS, userMembership, getMembershipUrls} from "@app/state"
import {INDEXER_RELAYS, PLATFORM_NAME, userMembership, getMembershipUrls} from "@app/state"
let progress: number | undefined = $state(undefined)
let confirmText = $state("")
@@ -120,8 +120,10 @@
<progress class="progress progress-primary w-full" value={progress! * 100} max="100"></progress>
{:else}
<p>
Are you sure? To confirm, please type "{CONFIRM_TEXT}" into the text box below. This action
can't be undone.
This will delete your nostr account everywhere, not just on {PLATFORM_NAME}.
</p>
<p>
To confirm, please type "{CONFIRM_TEXT}" into the text box below. This action can't be undone.
</p>
<label class="input input-bordered flex w-full items-center gap-2">
<input bind:value={confirmText} class="grow" type="text" />

View File

@@ -12,7 +12,6 @@
import ProfileEdit from "@app/components/ProfileEdit.svelte"
import ProfileDelete from "@app/components/ProfileDelete.svelte"
import InfoKeys from "@app/components/InfoKeys.svelte"
import Alerts from "@app/components/Alerts.svelte"
import {PLATFORM_NAME} from "@app/state"
import {pushModal} from "@app/modal"
import {clip} from "@app/toast"
@@ -84,7 +83,10 @@
<div class="card2 bg-alt col-4 shadow-xl">
<FieldInline>
{#snippet label()}
<p>Public Key</p>
<p class="flex items-center gap-3">
<Icon icon="key" />
Public Key
</p>
{/snippet}
{#snippet input()}
<label class="input input-bordered flex w-full items-center justify-between gap-2">
@@ -107,7 +109,10 @@
{#if $session?.method === "nip01"}
<FieldInline>
{#snippet label()}
<p>Private Key</p>
<p class="flex items-center gap-3">
<Icon icon="key" />
Private Key
</p>
{/snippet}
{#snippet input()}
<label class="input input-bordered flex w-full items-center gap-2">
@@ -124,10 +129,12 @@
</FieldInline>
{/if}
</div>
<Alerts />
<div class="card2 bg-alt shadow-xl">
<div class="flex items-center justify-between">
<strong>Advanced</strong>
<strong class="flex items-center gap-3">
<Icon icon="settings" />
Advanced
</strong>
<Button onclick={() => (showAdvanced = !showAdvanced)}>
{#if showAdvanced}
<Icon icon="alt-arrow-down" />
@@ -137,7 +144,7 @@
</Button>
</div>
{#if showAdvanced}
<div transition:slideAndFade class="pt-4">
<div transition:slideAndFade class="flex flex-col gap-2 pt-4">
<Button class="btn btn-outline btn-error" onclick={startDelete}>
<Icon icon="trash-bin-2" />
Delete your profile