Add reviewkey auth bypass, remove note to self

This commit is contained in:
Jon Staab
2025-01-15 15:48:39 -08:00
parent 9ca4440038
commit 01c4219922
6 changed files with 17 additions and 33 deletions
+2 -2
View File
@@ -41,10 +41,10 @@
<form class="column gap-4" on:submit|preventDefault={submit}>
<ModalHeader>
<div slot="title">Enable Messages</div>
<div slot="info">Do you want to enable notes and direct messages?</div>
<div slot="info">Do you want to enable direct messages?</div>
</ModalHeader>
<p>
By default, notes and direct messages are disabled, since loading them requires
By default, direct messages are disabled, since loading them requires
{PLATFORM_NAME} to download and decrypt a lot of data.
</p>
<p>
+10 -1
View File
@@ -1,6 +1,6 @@
<script lang="ts">
import {onMount, onDestroy} from "svelte"
import {Nip46Broker, makeSecret} from "@welshman/signer"
import {Nip46Broker, getPubkey, makeSecret} from "@welshman/signer"
import {addSession} from "@welshman/app"
import {slideAndFade} from "@lib/transition"
import Spinner from "@lib/components/Spinner.svelte"
@@ -63,6 +63,15 @@
let input = ""
let loading = false
$: {
// For testing and for play store reviewers
if (input === "reviewkey") {
const secret = makeSecret()
addSession({method: "nip01", secret, pubkey: getPubkey(secret)})
}
}
onMount(async () => {
url = await broker.makeNostrconnectUrl({
perms: NIP46_PERMS,
-11
View File
@@ -21,8 +21,6 @@
const showSettingsMenu = () => pushModal(MenuSettings)
const openNotes = () => ($canDecrypt ? goto("/notes") : pushModal(ChatEnable, {next: "/notes"}))
const openChat = () => ($canDecrypt ? goto("/chat") : pushModal(ChatEnable, {next: "/chat"}))
$: spaceUrls = Array.from($userRoomsByUrl.keys())
@@ -58,9 +56,6 @@
class="tooltip-right">
<Avatar src={$userProfile?.picture} class="!h-10 !w-10" />
</PrimaryNavItem>
<PrimaryNavItem title="Notes" on:click={openNotes} class="tooltip-right">
<Avatar icon="notes-minimalistic" class="!h-10 !w-10" />
</PrimaryNavItem>
<PrimaryNavItem
title="Messages"
on:click={openChat}
@@ -84,12 +79,6 @@
<PrimaryNavItem title="Home" href="/home">
<Avatar icon="home-smile" class="!h-10 !w-10" />
</PrimaryNavItem>
<PrimaryNavItem title="Search" href="/people">
<Avatar icon="magnifer" class="!h-10 !w-10" />
</PrimaryNavItem>
<PrimaryNavItem title="Notes" on:click={openNotes}>
<Avatar icon="notes-minimalistic" class="!h-10 !w-10" />
</PrimaryNavItem>
<PrimaryNavItem
title="Messages"
on:click={openChat}
-16
View File
@@ -1,16 +0,0 @@
<script lang="ts">
import {pubkey} from "@welshman/app"
import Page from "@lib/components/Page.svelte"
import Chat from "@app/components/Chat.svelte"
$: id = $pubkey!
</script>
<Page>
<Chat {id}>
<p slot="info" class="px-4">
This is a place for your notes. Everything you write here is encrypted and stored on the nostr
network.
</p>
</Chat>
</Page>
+2 -2
View File
@@ -158,9 +158,9 @@
</div>
</Link>
{/each}
<Button on:click={addRoom} class="btn btn-neutral">
<Button on:click={addRoom} class="btn btn-neutral whitespace-nowrap">
<Icon icon="add-circle" />
Create Room
Create
</Button>
</div>
{#if pubkey}