-
Notifications
You must be signed in to change notification settings - Fork 15
/
abouttab.go
37 lines (29 loc) · 1.57 KB
/
abouttab.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package main
import(
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/widget"
"net/url"
"github.com/amo13/anarchy-droid/logger"
)
func abouttab() fyne.CanvasObject {
info1 := widget.NewLabel("\nThis application is only possible thanks to all the people behind the roms, TWRP, MicroG, F-Droid, Aurora, Magisk, Nanodroid and Heimdall. Additionally, we should also be thankful to all the individuals who contributed essential code here and there!")
info1.Wrapping = fyne.TextWrapWord
info1.Alignment = fyne.TextAlignCenter
chk_reports := widget.NewCheck("Help improve this application by reporting device name and installation success", func(b bool) {logger.Consent = b})
chk_reports.SetChecked(true)
info2 := widget.NewLabel("The collected data is publicly available: ")
info2.Alignment = fyne.TextAlignTrailing
href := "https://stats.anarchy-droid.com/index.php?module=Widgetize&action=iframe&secondaryDimension=eventAction&disableLink=0&widget=1&moduleToWidgetize=Events&actionToWidgetize=getCategory&idSite=3&period=range&date=2019-07-01,today&disableLink=1&widget=1"
u, err := url.Parse(href)
if err != nil {
logger.LogError("unable to parse " + href + " as URL:", err)
}
reports_hyperlink := widget.NewHyperlink("click here to take a look.", u)
info3 := widget.NewLabel("Author: Amaury Bodet - Version: " + AppVersion + " - Build: " + BuildDate + " - License: GPL-3.0")
info3.Alignment = fyne.TextAlignCenter
return container.NewVBox(info1,
container.NewCenter(chk_reports),
container.NewCenter(container.NewHBox(info2, reports_hyperlink)),
info3)
}