Skip to content

Commit

Permalink
Merge pull request #85 from pocc/master
Browse files Browse the repository at this point in the history
Fixes #84
  • Loading branch information
gcla authored Feb 27, 2020
2 parents c8a9641 + e631890 commit 958fe26
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ui/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ $ termshark -r file.pcap -T psml -n | less{{end}}
{{.CopyCommandMessage}}{{end}}
{{define "UIBug"}}{{.BugURL}}
{{.CopyCommandMessage}}{{end}}
{{define "UIFeature"}}{{.FeatureURL}}
{{.CopyCommandMessage}}{{end}}
{{define "UIHelp"}}{{template "NameVer" .}}
A wireshark-inspired tui for tshark. Analyze network traffic interactively from your terminal.
Expand Down Expand Up @@ -87,6 +95,8 @@ func init() {
"Version": termshark.Version,
"FAQURL": termshark.FAQURL,
"UserGuideURL": termshark.UserGuideURL,
"BugURL": termshark.BugURL,
"FeatureURL": termshark.FeatureURL,
}
}

Expand Down
23 changes: 23 additions & 0 deletions ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -2380,6 +2380,29 @@ func Build() (*gowid.App, error) {
},
},
menuutil.MakeMenuDivider(),
menuutil.SimpleMenuItem{
Txt: "Found a Bug?",
Key: gowid.MakeKey('B'),
CB: func(app gowid.IApp, w gowid.IWidget) {
generalMenu.Close(app)
if !termshark.RunningRemotely() {
termshark.BrowseUrl(termshark.BugURL)
}
openResultsAfterCopy("UIBug", termshark.BugURL, app)
},
},
menuutil.SimpleMenuItem{
Txt: "Feature Request?",
Key: gowid.MakeKey('F'),
CB: func(app gowid.IApp, w gowid.IWidget) {
generalMenu.Close(app)
if !termshark.RunningRemotely() {
termshark.BrowseUrl(termshark.FeatureURL)
}
openResultsAfterCopy("UIFeature", termshark.FeatureURL, app)
},
},
menuutil.MakeMenuDivider(),
menuutil.SimpleMenuItem{
Txt: "Quit",
Key: gowid.MakeKey('q'),
Expand Down
2 changes: 2 additions & 0 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ var InternalErr = InternalError{}
var (
UserGuideURL string = "https://termshark.io/userguide"
FAQURL string = "https://termshark.io/faq"
BugURL string = "https://github.com/gcla/termshark/issues/new?assignees=&labels=&template=bug_report.md&title="
FeatureURL string = "https://github.com/gcla/termshark/issues/new?assignees=&labels=&template=feature_request.md&title="
)

//======================================================================
Expand Down

0 comments on commit 958fe26

Please sign in to comment.