@@ -26,7 +26,7 @@ const (
26
26
UpdateButtonCss = "bg-green-600 hover:bg-green-800 text-xl p-2 rounded bottom-4 right-4 fixed"
27
27
InstallButtonCss = "bg-green-600 hover:bg-green-800 p-2 rounded m-2"
28
28
BurgerMenuButtonCss = "text-xl fixed top-4 right-4"
29
- RootButtonsCss = "flex flex-col absolute top-12 right-4"
29
+ RootButtonsCss = "flex flex-col fixed top-12 right-4"
30
30
LoadFlushesButtonCss = YellowButtonCss + " hover:bg-amber-800 align-middle mt-8"
31
31
)
32
32
@@ -159,9 +159,9 @@ func (b *RootContainer) Render() app.UI {
159
159
Location : "new" ,
160
160
AdditionalCss : "hover:bg-amber-800 m-1" ,
161
161
},
162
+ & GithubButton {},
162
163
& InstallButton {},
163
164
).ID ("root-buttons-container" ).Class (InviCss ),
164
- app .P ().Text ("Tracked flushes:" ).Class ("py-2" ),
165
165
& LoadingWidget {id : "flushes-loading" },
166
166
b .Stats ,
167
167
b .GetList (),
@@ -531,8 +531,8 @@ func (a *AboutContainer) Render() app.UI {
531
531
app .Img ().Src ("/web/paper.png" ).Class ("inline" ).Width (100 ).Height (100 ),
532
532
),
533
533
app .Br (),
534
- app .P ().Text ("Application for tracking toilet flushes ." ),
535
- app .P ().Text ("You can use it to save them , rate them , check your toilet stats." ),
534
+ app .P ().Text ("Application for tracking time on toilet ." ),
535
+ app .P ().Text ("You can use it to save it , rate it , check your toilet stats." ),
536
536
app .P ().
537
537
Text ("The app will show you statistics like total time spent, average time spent, % times with phone used etc." ),
538
538
app .Br (),
@@ -552,7 +552,7 @@ func (a *AboutContainer) Render() app.UI {
552
552
553
553
func FlushTable (flushes []Flush ) app.UI {
554
554
if len (flushes ) == 0 {
555
- return app .Div ().Body (app .P ().Text ("No flushes yet." ))
555
+ return app .Div ().Body (app .P ().Text ("No entries yet." ))
556
556
}
557
557
divs := []app.UI {}
558
558
for _ , flush := range flushes {
@@ -572,7 +572,7 @@ func FlushTable(flushes []Flush) app.UI {
572
572
& ConfirmRemoveFlushButton {ID : flush .ID },
573
573
& CancelRemoveFlushButton {ID : flush .ID },
574
574
).Class ("max-w-1/6 remove-flush-buttonz-div" ),
575
- ).Class ("flex flex-col p-4 border-1 shadow-lg rounded-lg shadow-amber-800 " ).ID ("div-" + flush .ID ),
575
+ ).Class ("flex flex-col p-4 border-1 shadow rounded-lg shadow-white/10 " ).ID ("div-" + flush .ID ),
576
576
)
577
577
}
578
578
return app .Div ().Body (divs ... )
@@ -1030,11 +1030,11 @@ func StatsDiv(ctx app.Context) (app.UI, error) {
1030
1030
app .P ().Text ("Total 🧻 -> " + strconv .Itoa (stats .FlushCount )),
1031
1031
app .P ().
1032
1032
Text ("Total ⏱️ -> " + strconv .Itoa (stats .TotalTime )+ " min (" + strconv .Itoa (stats .MeanTime )+ " min average)" ),
1033
- app .P ().Text ("Average ⭐ -> " + strconv .Itoa (stats .MeanRating )),
1033
+ app .P ().Text ("Average ⭐ -> " + strconv .Itoa (stats .MeanRating )+ "/10" ),
1034
1034
app .P ().
1035
1035
Text ("Times with 📱 -> " + strconv .Itoa (stats .PhoneUsedCount )+ " (" + strconv .Itoa (stats .PercentPhoneUsed )+ "%)" ),
1036
1036
).
1037
- Class ("flex flex-col p-4 border-1 shadow-lg rounded-lg font-bold shadow-amber-800 " ),
1037
+ Class ("flex flex-col p-4 border-1 shadow-lg rounded-lg font-bold shadow-white/20 " ),
1038
1038
nil
1039
1039
}
1040
1040
@@ -1304,3 +1304,19 @@ func (b *SubmitEditedFlushButton) onClick(ctx app.Context, e app.Event) {
1304
1304
})
1305
1305
})
1306
1306
}
1307
+
1308
+ type GithubButton struct {
1309
+ app.Compo
1310
+ }
1311
+
1312
+ func (b * GithubButton ) Render () app.UI {
1313
+ return app .Div ().
1314
+ OnClick (b .onClick ).Body (
1315
+ app .P ().Text ("GitHub" ),
1316
+ app .Img ().Src ("/web/github-mark-white.png" ).Class ("w-6 h-6 ml-2" ),
1317
+ ).
1318
+ Class (YellowButtonCss + " hover:bg-amber-800 flex justify-center" )
1319
+ }
1320
+ func (b * GithubButton ) onClick (ctx app.Context , e app.Event ) {
1321
+ app .Window ().Call ("open" , "https://github.com/pgulb/flush-log" )
1322
+ }
0 commit comments