Fix follow buttons

This commit is contained in:
Jonathan Staab 2023-03-08 15:32:47 -06:00
parent 244552b16b
commit e892c45598
3 changed files with 10 additions and 5 deletions

View File

@ -1,6 +1,5 @@
# Current
- [ ] Log in as user button
- [ ] Gray out messages tab when using pubkey login
- [ ] Collapse relaycard and relaycardsimple?
- [ ] Create my own version of nostr.how and extension explanation
@ -48,6 +47,7 @@
# More
- [ ] Log in as user button
- [ ] Abort all context subs when navigating
- [ ] Separate mentions from other notifications
- [ ] Performance

View File

@ -1,11 +1,12 @@
<script lang="ts">
import cx from "classnames"
import {displayPerson} from "src/util/nostr"
import user from "src/agent/user"
import {menuIsOpen, installPrompt, routes} from "src/app/ui"
import {newAlerts, newDirectMessages, newChatMessages} from "src/app/alerts"
import {slowConnections} from "src/app/connection"
const {profile} = user
const {profile, canPublish} = user
const install = () => {
$installPrompt.prompt()
@ -60,7 +61,11 @@
</a>
</li>
{#if $profile}
<li class="relative cursor-pointer">
<li
class={cx("relative", {
"cursor-pointer": $canPublish,
"pointer-events-none opacity-75": !$canPublish,
})}>
<a class="block px-4 py-2 transition-all hover:bg-accent" href="/messages">
<i class="fa fa-envelope mr-2" /> Messages
{#if $newDirectMessages}

View File

@ -21,5 +21,5 @@
<PersonInfo
{person}
addPetname={$petnamePubkeys.includes(person.pubkey) ? addPetname : null}
removePetname={$petnamePubkeys.includes(person.pubkey) ? null : removePetname} />
addPetname={$petnamePubkeys.includes(person.pubkey) ? null : addPetname}
removePetname={$petnamePubkeys.includes(person.pubkey) ? removePetname : null} />