mirror of
https://github.com/styppo/hamstr.git
synced 2024-10-18 05:23:28 +00:00
Add basic lightning tip button
This commit is contained in:
parent
02f0a13f2b
commit
1bea3ab24b
@ -13,6 +13,8 @@ export default class Profile {
|
|||||||
url: metadata.nip05,
|
url: metadata.nip05,
|
||||||
verified: null,
|
verified: null,
|
||||||
}
|
}
|
||||||
|
this.lud06 = metadata.lud06
|
||||||
|
this.lud16 = metadata.lud16
|
||||||
}
|
}
|
||||||
|
|
||||||
static from(event) {
|
static from(event) {
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<BaseIcon icon="messages" />
|
<BaseIcon icon="messages" />
|
||||||
<q-tooltip>Send private message</q-tooltip>
|
<q-tooltip>Send private message</q-tooltip>
|
||||||
</a>
|
</a>
|
||||||
<a>
|
<a :href="lightningLink" :class="{disabled: !lightningLink}">
|
||||||
<q-icon name="bolt" size="sm" />
|
<q-icon name="bolt" size="sm" />
|
||||||
<q-tooltip>Tip with Bitcoin Lightning</q-tooltip>
|
<q-tooltip>Tip with Bitcoin Lightning</q-tooltip>
|
||||||
</a>
|
</a>
|
||||||
@ -165,6 +165,12 @@ export default defineComponent({
|
|||||||
followers() {
|
followers() {
|
||||||
return this.nostr.getFollowers(this.pubkey)
|
return this.nostr.getFollowers(this.pubkey)
|
||||||
},
|
},
|
||||||
|
lightningLink() {
|
||||||
|
// TODO encode lud16 as lud06?
|
||||||
|
// TODO more protocols
|
||||||
|
const ln = this.profile?.lud06 || this.profile?.lud16
|
||||||
|
return ln ? `lightning:${ln}` : null
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadMorePosts() {
|
loadMorePosts() {
|
||||||
@ -270,18 +276,25 @@ export default defineComponent({
|
|||||||
.actions {
|
.actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
a {
|
a {
|
||||||
|
text-decoration: none;
|
||||||
svg, i {
|
svg, i {
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
color: $color-light-gray;
|
color: $color-light-gray;
|
||||||
fill: $color-light-gray;
|
fill: $color-light-gray;
|
||||||
//fill: $color-fg;
|
|
||||||
transition: 120ms ease;
|
transition: 120ms ease;
|
||||||
}
|
}
|
||||||
&:hover svg, &:hover i {
|
&.disabled {
|
||||||
|
svg, i {
|
||||||
|
color: $color-dark-gray !important;
|
||||||
|
fill: $color-dark-gray !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
svg, i {
|
||||||
fill: $color-fg;
|
fill: $color-fg;
|
||||||
color: $color-fg;
|
color: $color-fg;
|
||||||
//fill: $color-primary;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
a + a {
|
a + a {
|
||||||
|
Loading…
Reference in New Issue
Block a user