Open bitcoinuser opened 1 year ago
I would like to work on this issue. Could you assign me?
I guess we need to add nostrAuth
to check if we are connected using nostr, as done in lnurlauth
awesome if you want to look into it.
we have recently introduced the permissions. Those permissions are similar to the lnurlAuth
flag. If a website has a permission it can execute certain calls.
So I think it would be best to list the permission names as badges - and then maybe later also move lnurlAuth
from a flag into a permission.
I am not super sure how that would look like but I think this is the direction we should investigate here.
(note: permissions are website AND account specific now)
Okay @bumi let me look there.
I could check if the website has any permissions in the permission array, but how would I know if it is logged in using nostr?
we would just list the permissions as badges - and don't focus on the "login".
Okay, what if there are more than one permissions? A horizontal list of badges?
I think so, at least currently - though the list could get long. maybe we can include @jakubszwedo here, do you have ideas?
@bumi with Nostr there could be max 3 badges now? Active, Login and Nostr? I think it's fine to have them in a horizontal list now. Sooner or later I see this section redesigned, but for now we have plenty of space for badges
We could use bitcoin-purple #BB6BD9 for nostr badge. I assume in the future there may be more nostr badges, like delegation, so we could color code them like this
Okayy. Let me see how to implement this.
@bumi How do I add labels in translation for different permissions?
Currently this is happening.
I am thinking something like this would do the job.
@reneaaron @reneaaron what do we do here best? I guess those should be new translations, correct?
@manavdesai27 it looks good, but you need to do:
label: {
"nostr/getPublicKey": "your translation",
}
see your first screenshot where it loads badge.label.nostr/getPublicKey
(not badge.label.nostr.getPublicKey
)
see your first screenshot where it loads
badge.label.nostr/getPublicKey
(notbadge.label.nostr.getPublicKey
)
Yes I know, it loads it that way. But I have changed the code such that nostr/getPublicKey
is converted to nostr.getPublicKey
before being sent for translation rendering. I have done so for the cleanliness of the translation file. What do you think about that @bumi .
I will soon create a Pull Request.
Not sure if we want to maintain translated titles right now.
What is the translation content of nostr.getPublicKey
or webln.addholdinvoice
for instance?
Another thing to consider here: Those badges would only show up if you give permanent permissions to those websites. You wouldn't see where you are using nostr if you don't do that.
I would like to see Nostr badge for websites I connected using Alby Nostr.
@bitcoinuser Why would you want to see that info on this list? What job does this badge help you to get done?
@reneaaron What do you suggest instead then? Because I don't see a way to know where we are using nostr except the "permissions" way. One way could be adding a boolean flag, the same as lnurlAuth
@manavdesai27 Not sure, that's why I tagged @bitcoinuser to get a clear understanding about which problem we are actually trying to solve here.
Feature description
I would like to see Nostr badge for websites I connected using Alby Nostr.
Describe the solution
Same thing like this https://github.com/getAlby/lightning-browser-extension/pull/1779 but for Nostr