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="card2 bg-alt flex flex-col gap-6 shadow-xl">
<div class="flex items-center justify-between"> <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}> <Button class="btn btn-primary btn-sm" onclick={startAlert}>
<Icon icon="add-circle" /> <Icon icon="add-circle" />
Add Alert Add Alert

View File

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

View File

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