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

View file

@ -41,10 +41,10 @@
<form class="column gap-4" on:submit|preventDefault={submit}> <form class="column gap-4" on:submit|preventDefault={submit}>
<ModalHeader> <ModalHeader>
<div slot="title">Enable Messages</div> <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> </ModalHeader>
<p> <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. {PLATFORM_NAME} to download and decrypt a lot of data.
</p> </p>
<p> <p>

View file

@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import {onMount, onDestroy} from "svelte" import {onMount, onDestroy} from "svelte"
import {Nip46Broker, makeSecret} from "@welshman/signer" import {Nip46Broker, getPubkey, makeSecret} from "@welshman/signer"
import {addSession} from "@welshman/app" import {addSession} from "@welshman/app"
import {slideAndFade} from "@lib/transition" import {slideAndFade} from "@lib/transition"
import Spinner from "@lib/components/Spinner.svelte" import Spinner from "@lib/components/Spinner.svelte"
@ -63,6 +63,15 @@
let input = "" let input = ""
let loading = false 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 () => { onMount(async () => {
url = await broker.makeNostrconnectUrl({ url = await broker.makeNostrconnectUrl({
perms: NIP46_PERMS, perms: NIP46_PERMS,

View file

@ -21,8 +21,6 @@
const showSettingsMenu = () => pushModal(MenuSettings) const showSettingsMenu = () => pushModal(MenuSettings)
const openNotes = () => ($canDecrypt ? goto("/notes") : pushModal(ChatEnable, {next: "/notes"}))
const openChat = () => ($canDecrypt ? goto("/chat") : pushModal(ChatEnable, {next: "/chat"})) const openChat = () => ($canDecrypt ? goto("/chat") : pushModal(ChatEnable, {next: "/chat"}))
$: spaceUrls = Array.from($userRoomsByUrl.keys()) $: spaceUrls = Array.from($userRoomsByUrl.keys())
@ -58,9 +56,6 @@
class="tooltip-right"> class="tooltip-right">
<Avatar src={$userProfile?.picture} class="!h-10 !w-10" /> <Avatar src={$userProfile?.picture} class="!h-10 !w-10" />
</PrimaryNavItem> </PrimaryNavItem>
<PrimaryNavItem title="Notes" on:click={openNotes} class="tooltip-right">
<Avatar icon="notes-minimalistic" class="!h-10 !w-10" />
</PrimaryNavItem>
<PrimaryNavItem <PrimaryNavItem
title="Messages" title="Messages"
on:click={openChat} on:click={openChat}
@ -84,12 +79,6 @@
<PrimaryNavItem title="Home" href="/home"> <PrimaryNavItem title="Home" href="/home">
<Avatar icon="home-smile" class="!h-10 !w-10" /> <Avatar icon="home-smile" class="!h-10 !w-10" />
</PrimaryNavItem> </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 <PrimaryNavItem
title="Messages" title="Messages"
on:click={openChat} on:click={openChat}

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>

View file

@ -158,9 +158,9 @@
</div> </div>
</Link> </Link>
{/each} {/each}
<Button on:click={addRoom} class="btn btn-neutral"> <Button on:click={addRoom} class="btn btn-neutral whitespace-nowrap">
<Icon icon="add-circle" /> <Icon icon="add-circle" />
Create Room Create
</Button> </Button>
</div> </div>
{#if pubkey} {#if pubkey}

View file

@ -42,6 +42,8 @@
<p>Our Service may contain links and embedded content to third-party web sites, users, or services that are not owned or controlled by the Company.</p> <p>Our Service may contain links and embedded content to third-party web sites, users, or services that are not owned or controlled by the Company.</p>
<p>The Company has no control over, and assumes no responsibility for, the content, privacy policies, or practices of any third party web sites, users, or services. You further acknowledge and agree that the Company shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with the use of or reliance on any such content, goods or services available on or through any such web sites, users, or services.</p> <p>The Company has no control over, and assumes no responsibility for, the content, privacy policies, or practices of any third party web sites, users, or services. You further acknowledge and agree that the Company shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with the use of or reliance on any such content, goods or services available on or through any such web sites, users, or services.</p>
<p>We strongly advise You to read the terms and conditions and privacy policies of any third-party web sites or services that You visit.</p> <p>We strongly advise You to read the terms and conditions and privacy policies of any third-party web sites or services that You visit.</p>
<h1>User-Generated Content</h1>
<p>Content you produce may be shared with other users. Pornography, graphic violence, and other illegal content is prohibited. You also agree to abide by the terms imposed by third-party administrators whose servers you access through Flotilla.</p>
<h1>Termination</h1> <h1>Termination</h1>
<p>We may terminate or suspend Your access immediately, without prior notice or liability, for any reason whatsoever, including without limitation if You breach these Terms and Conditions.</p> <p>We may terminate or suspend Your access immediately, without prior notice or liability, for any reason whatsoever, including without limitation if You breach these Terms and Conditions.</p>
<p>Upon termination, Your right to use the Service will cease immediately.</p> <p>Upon termination, Your right to use the Service will cease immediately.</p>
@ -76,5 +78,5 @@
<h1>Contact Us</h1> <h1>Contact Us</h1>
<p>If you have any questions about these Terms and Conditions, You can contact us:</p> <p>If you have any questions about these Terms and Conditions, You can contact us:</p>
<ul> <ul>
<li>By email: hodlbod@coracle.social</li> <li>By email: hello@coracle.social</li>
</ul> </ul>