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

View File

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

View File

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