mirror of
https://github.com/fiatjaf/vnak.git
synced 2026-07-22 07:48:24 +00:00
use constant for the ARROW.
This commit is contained in:
2
event.go
2
event.go
@@ -91,7 +91,7 @@ func setupEventTab() *qt.QWidget {
|
||||
event.outputEdit = qt.NewQTextEdit(event.tab)
|
||||
event.outputEdit.SetReadOnly(true)
|
||||
outputHBox.AddWidget(event.outputEdit.QWidget)
|
||||
copyButton := qt.NewQPushButton5("➡️", event.tab)
|
||||
copyButton := qt.NewQPushButton5(ARROW, event.tab)
|
||||
outputHBox.AddWidget(copyButton.QWidget)
|
||||
copyButton.OnClicked(func() {
|
||||
tabWidget.SetCurrentIndex(tabs.paste)
|
||||
|
||||
@@ -16,6 +16,8 @@ import (
|
||||
"fiatjaf.com/nostr/nip46"
|
||||
)
|
||||
|
||||
const ARROW = "➡️"
|
||||
|
||||
var manualCancel = errors.New("canceled")
|
||||
|
||||
func handleSecretKeyOrBunker(sec string) (nostr.SecretKey, nostr.Keyer, error) {
|
||||
|
||||
12
paste.go
12
paste.go
@@ -237,7 +237,7 @@ func (p *pasteVars) displayEventPointer(ep nostr.EventPointer) {
|
||||
}
|
||||
p.displayRelays(ep.Relays)
|
||||
|
||||
button := qt.NewQPushButton5("filter ➡️", window.QWidget)
|
||||
button := qt.NewQPushButton5("filter "+ARROW, window.QWidget)
|
||||
button.OnClicked(func() {
|
||||
filter := nostr.Filter{
|
||||
IDs: []nostr.ID{ep.ID},
|
||||
@@ -255,7 +255,7 @@ func (p *pasteVars) displayProfilePointer(pp nostr.ProfilePointer) {
|
||||
p.displayPubKey(pp.PublicKey)
|
||||
p.displayRelays(pp.Relays)
|
||||
|
||||
button := qt.NewQPushButton5("filter ➡️", window.QWidget)
|
||||
button := qt.NewQPushButton5("filter "+ARROW, window.QWidget)
|
||||
button.OnClicked(func() {
|
||||
filter := nostr.Filter{
|
||||
Authors: []nostr.PubKey{pp.PublicKey},
|
||||
@@ -307,12 +307,12 @@ func (p *pasteVars) displayAddressPointer(ap nostr.EntityPointer) {
|
||||
|
||||
p.displayRelays(ap.Relays)
|
||||
|
||||
button := qt.NewQPushButton5("filter ➡️", window.QWidget)
|
||||
button := qt.NewQPushButton5("filter "+ARROW, window.QWidget)
|
||||
button.OnClicked(func() {
|
||||
filter := nostr.Filter{
|
||||
Kinds: []nostr.Kind{ap.Kind},
|
||||
Authors: []nostr.PubKey{ap.PublicKey},
|
||||
Tags: map[string][]string{"d": []string{ap.Identifier}},
|
||||
Tags: map[string][]string{"d": {ap.Identifier}},
|
||||
}
|
||||
req.populate(filter, ap.Relays)
|
||||
tabWidget.SetCurrentIndex(tabs.req)
|
||||
@@ -362,7 +362,7 @@ func (p *pasteVars) displayNip05(identifier string) {
|
||||
}
|
||||
|
||||
func (p *pasteVars) displayEventButton(evt nostr.Event) {
|
||||
button := qt.NewQPushButton5("event ➡️", window.QWidget)
|
||||
button := qt.NewQPushButton5("event "+ARROW, window.QWidget)
|
||||
button.OnClicked(func() {
|
||||
event.populate(evt)
|
||||
// switch to event tab
|
||||
@@ -372,7 +372,7 @@ func (p *pasteVars) displayEventButton(evt nostr.Event) {
|
||||
}
|
||||
|
||||
func (p *pasteVars) displayFilterButton(filter nostr.Filter) {
|
||||
button := qt.NewQPushButton5("filter ➡️", window.QWidget)
|
||||
button := qt.NewQPushButton5("filter "+ARROW, window.QWidget)
|
||||
button.OnClicked(func() {
|
||||
req.populate(filter, []string{})
|
||||
// switch to req tab
|
||||
|
||||
4
req.go
4
req.go
@@ -261,7 +261,7 @@ func setupReqTab() *qt.QWidget {
|
||||
buttonsHBox := qt.NewQHBoxLayout2()
|
||||
dlayout.AddLayout(buttonsHBox.QLayout)
|
||||
|
||||
editButton := qt.NewQPushButton5("➡️ paste", dialog.QWidget)
|
||||
editButton := qt.NewQPushButton5(ARROW+" paste", dialog.QWidget)
|
||||
editButton.OnClicked(func() {
|
||||
paste.inputEdit.SetPlainText(string(pretty))
|
||||
tabWidget.SetCurrentIndex(tabs.paste)
|
||||
@@ -269,7 +269,7 @@ func setupReqTab() *qt.QWidget {
|
||||
})
|
||||
buttonsHBox.AddWidget(editButton.QWidget)
|
||||
|
||||
publishButton := qt.NewQPushButton5("➡️ event", dialog.QWidget)
|
||||
publishButton := qt.NewQPushButton5(ARROW+" event", dialog.QWidget)
|
||||
publishButton.OnClicked(func() {
|
||||
event.populate(evt)
|
||||
tabWidget.SetCurrentIndex(tabs.event)
|
||||
|
||||
Reference in New Issue
Block a user