mirror of
https://github.com/Xevion/glance.git
synced 2025-12-09 12:07:22 -06:00
Allow setting widget title URL
This commit is contained in:
@@ -24,6 +24,12 @@ type Lobsters struct {
|
||||
func (widget *Lobsters) Initialize() error {
|
||||
widget.withTitle("Lobsters").withCacheDuration(time.Hour)
|
||||
|
||||
if widget.InstanceURL == "" {
|
||||
widget.withTitleURL("https://lobste.rs")
|
||||
} else {
|
||||
widget.withTitleURL(widget.InstanceURL)
|
||||
}
|
||||
|
||||
if widget.SortBy == "" || (widget.SortBy != "hot" && widget.SortBy != "new") {
|
||||
widget.SortBy = "hot"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user