Skip to content

Commit

Permalink
Fix #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Xpl0itU committed Mar 26, 2024
1 parent 1055d66 commit 0439f5f
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 23 deletions.
40 changes: 29 additions & 11 deletions earnapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import (
)

const (
EARNAPP_IMAGE_NAME = "fazalfarhan01/earnapp:lite"
EARNAPP_IMAGE_NAME = "fazalfarhan01/earnapp:lite"
EARNAPP_REFERRAL_LINK = "https://earnapp.com/i/J9XF4PXJ"
)

type EarnAppConfig struct {
Expand All @@ -31,17 +32,25 @@ func (i *EarnAppConfig) ConfigureForm(form *tview.Form, frame *tview.Frame, app
uuid = generateEarnAppUUID()
form.GetFormItemByLabel("UUID").(*tview.InputField).SetText(uuid)
})
form.AddButton("Copy Claim URL to Clipboard", func() {
if stringIsEmpty(uuid) {
form.AddTextView("Error", "UUID is required", 0, 1, true, true)
isError = true
} else {
if err := clipboard.WriteAll("https://earnapp.com/r/" + uuid); err != nil {
form.AddTextView("Error", "Failed to copy to clipboard", 0, 1, true, true)
} else {
form.AddTextView("Success", "Copied to clipboard", 0, 1, true, true)
form.AddButton("Claim URL", func() {
isError = stringIsEmpty(uuid)
if isError {
if !showingError {
form.AddTextView("Error", "UUID is required", 0, 1, true, true)
showingError = true
}
return
}
modal := tview.NewModal().
SetText("Claim URL:\nhttps://earnapp.com/r/" + uuid).
AddButtons([]string{"Copy", "Close"}).
SetDoneFunc(func(buttonIndex int, buttonLabel string) {
if buttonLabel == "Copy" {
clipboard.WriteAll("https://earnapp.com/r/" + uuid)
}
app.SetRoot(form, true)
})
app.SetRoot(modal, true)
})
form.AddButton("Save", func() {
isError = stringIsEmpty(uuid)
Expand All @@ -60,7 +69,16 @@ func (i *EarnAppConfig) ConfigureForm(form *tview.Form, frame *tview.Frame, app
returnToMenu(frame, app)
})
form.AddButton("Register", func() {
webbrowser.Open("https://earnapp.com/i/J9XF4PXJ")
modal := tview.NewModal().
SetText("Register on EarnApp\n" + EARNAPP_REFERRAL_LINK).
AddButtons([]string{"Open", "Cancel"}).
SetDoneFunc(func(buttonIndex int, buttonLabel string) {
if buttonLabel == "Open" {
webbrowser.Open(EARNAPP_REFERRAL_LINK)
}
app.SetRoot(form, true)
})
app.SetRoot(modal, true)
})
}

Expand Down
14 changes: 12 additions & 2 deletions grass.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import (
)

const (
GRASS_IMAGE_NAME = "mrcolorrain/grass:latest"
GRASS_IMAGE_NAME = "mrcolorrain/grass:latest"
GRASS_REFERRAL_LINK = "https://app.getgrass.io/register/?referralCode=u154dPm508iVxXy"
)

type GrassConfig struct {
Expand Down Expand Up @@ -47,7 +48,16 @@ func (i *GrassConfig) ConfigureForm(form *tview.Form, frame *tview.Frame, app *t
returnToMenu(frame, app)
})
form.AddButton("Register", func() {
webbrowser.Open("https://app.getgrass.io/register/?referralCode=u154dPm508iVxXy")
modal := tview.NewModal().
SetText("Register on Grass\n" + GRASS_REFERRAL_LINK).
AddButtons([]string{"Open", "Cancel"}).
SetDoneFunc(func(buttonIndex int, buttonLabel string) {
if buttonLabel == "Open" {
webbrowser.Open(GRASS_REFERRAL_LINK)
}
app.SetRoot(form, true)
})
app.SetRoot(modal, true)
})
}

Expand Down
14 changes: 12 additions & 2 deletions honeygain.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import (
)

const (
HONEYGAIN_IMAGE_NAME = "honeygain/honeygain:latest"
HONEYGAIN_IMAGE_NAME = "honeygain/honeygain:latest"
HONEYGAIN_REFERRAL_LINK = "https://r.honeygain.me/SAMUEC73"
)

type HoneygainConfig struct {
Expand Down Expand Up @@ -53,7 +54,16 @@ func (i *HoneygainConfig) ConfigureForm(form *tview.Form, frame *tview.Frame, ap
returnToMenu(frame, app)
})
form.AddButton("Register", func() {
webbrowser.Open("https://r.honeygain.me/SAMUEC73")
modal := tview.NewModal().
SetText("Register on Honeygain\n" + HONEYGAIN_REFERRAL_LINK).
AddButtons([]string{"Open", "Cancel"}).
SetDoneFunc(func(buttonIndex int, buttonLabel string) {
if buttonLabel == "Open" {
webbrowser.Open(HONEYGAIN_REFERRAL_LINK)
}
app.SetRoot(form, true)
})
app.SetRoot(modal, true)
})
}

Expand Down
14 changes: 12 additions & 2 deletions mystnode.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import (
)

const (
MYST_IMAGE_NAME = "mysteriumnetwork/myst:latest"
MYST_IMAGE_NAME = "mysteriumnetwork/myst:latest"
MYST_REFERRAL_LINK = "https://mystnodes.co/?referral_code=ijIy8nJv8xqVoshRmJjKATvoZZYKZ3jhzOY3FWy6"
)

type MystConfig struct {
Expand All @@ -30,7 +31,16 @@ func (i *MystConfig) ConfigureForm(form *tview.Form, frame *tview.Frame, app *tv
returnToMenu(frame, app)
})
form.AddButton("Register", func() {
webbrowser.Open("https://mystnodes.co/?referral_code=ijIy8nJv8xqVoshRmJjKATvoZZYKZ3jhzOY3FWy6")
modal := tview.NewModal().
SetText("Register on Mysterium Nodes\n" + MYST_REFERRAL_LINK).
AddButtons([]string{"Open", "Cancel"}).
SetDoneFunc(func(buttonIndex int, buttonLabel string) {
if buttonLabel == "Open" {
webbrowser.Open(MYST_REFERRAL_LINK)
}
app.SetRoot(form, true)
})
app.SetRoot(modal, true)
})
}

Expand Down
14 changes: 12 additions & 2 deletions packetstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import (
)

const (
PACKETSTREAM_IMAGE_NAME = "packetstream/psclient:latest"
PACKETSTREAM_IMAGE_NAME = "packetstream/psclient:latest"
PACKETSTREAM_REFERRAL_LINK = "https://packetstream.io/?psr=4cRE"
)

type PacketStreamConfig struct {
Expand Down Expand Up @@ -41,7 +42,16 @@ func (i *PacketStreamConfig) ConfigureForm(form *tview.Form, frame *tview.Frame,
returnToMenu(frame, app)
})
form.AddButton("Register", func() {
webbrowser.Open("https://packetstream.io/?psr=4cRE")
modal := tview.NewModal().
SetText("Register on PacketStream\n" + PACKETSTREAM_REFERRAL_LINK).
AddButtons([]string{"Open", "Cancel"}).
SetDoneFunc(func(buttonIndex int, buttonLabel string) {
if buttonLabel == "Open" {
webbrowser.Open(PACKETSTREAM_REFERRAL_LINK)
}
app.SetRoot(form, true)
})
app.SetRoot(modal, true)
})
}

Expand Down
14 changes: 12 additions & 2 deletions pawnsapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import (
)

const (
PAWNSAPP_IMAGE_NAME = "iproyal/pawns-cli:latest"
PAWNSAPP_IMAGE_NAME = "iproyal/pawns-cli:latest"
PAWNSAPP_REFERRAL_LINK = "https://pawns.app/?r=1112060"
)

type PawnsAppConfig struct {
Expand Down Expand Up @@ -53,7 +54,16 @@ func (i *PawnsAppConfig) ConfigureForm(form *tview.Form, frame *tview.Frame, app
returnToMenu(frame, app)
})
form.AddButton("Register", func() {
webbrowser.Open("https://pawns.app/?r=1112060")
modal := tview.NewModal().
SetText("Register on PawnsApp\n" + PAWNSAPP_REFERRAL_LINK).
AddButtons([]string{"Open", "Cancel"}).
SetDoneFunc(func(buttonIndex int, buttonLabel string) {
if buttonLabel == "Open" {
webbrowser.Open(PAWNSAPP_REFERRAL_LINK)
}
app.SetRoot(form, true)
})
app.SetRoot(modal, true)
})
}

Expand Down
14 changes: 12 additions & 2 deletions peer2profit.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import (
)

const (
PEER2PROFIT_IMAGE_NAME = "enwaiax/peer2profit:latest"
PEER2PROFIT_IMAGE_NAME = "enwaiax/peer2profit:latest"
PEER2PROFIT_REFERRAL_LINK = "https://t.me/peer2profit_app_bot?start=1671204644639c8f24d663c"
)

type Peer2ProfitConfig struct {
Expand Down Expand Up @@ -42,7 +43,16 @@ func (i *Peer2ProfitConfig) ConfigureForm(form *tview.Form, frame *tview.Frame,
returnToMenu(frame, app)
})
form.AddButton("Register", func() {
webbrowser.Open("https://t.me/peer2profit_app_bot?start=1671204644639c8f24d663c")
modal := tview.NewModal().
SetText("Register on Peer2Profit\n" + PEER2PROFIT_REFERRAL_LINK).
AddButtons([]string{"Open", "Cancel"}).
SetDoneFunc(func(buttonIndex int, buttonLabel string) {
if buttonLabel == "Open" {
webbrowser.Open(PEER2PROFIT_REFERRAL_LINK)
}
app.SetRoot(form, true)
})
app.SetRoot(modal, true)
})
}

Expand Down

0 comments on commit 0439f5f

Please sign in to comment.