Skip to content

Commit 82cc07c

Browse files
committed
add (*) to title as indication of new event
1 parent c446e4b commit 82cc07c

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
#
44

55
APP_NAME=littr
6-
APP_VERSION=0.40.5
6+
APP_VERSION=0.40.6
77
GOLANG_VERSION=1.23

api/swagger.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"name": "MIT",
1414
"url": "https://github.com/krustowski/littr/blob/master/LICENSE"
1515
},
16-
"version": "0.40.5"
16+
"version": "0.40.6"
1717
},
1818
"host": "www.littr.eu",
1919
"basePath": "/api/v1",

pkg/backend/router.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// @title littr
2-
// @version 0.40.5
2+
// @version 0.40.6
33
// @description a simple nanoblogging platform as PWA built on go-app framework
44
// @termsOfService https://littr.eu/tos
55

pkg/frontend/navbars.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,13 @@ func (h *header) onMessage(ctx app.Context, e app.Event) {
218218
snack.Set("innerHTML", "<i>info</i>"+text)
219219
}
220220

221+
// change title to indicate a new event
222+
title := app.Window().Get("document")
223+
if !title.IsNull() && !strings.Contains(title.Get("title").String(), "(*)") {
224+
prevTitle := title.Get("title").String()
225+
title.Set("title", "(*) "+prevTitle)
226+
}
227+
221228
/*ctx.Dispatch(func(ctx app.Context) {
222229
// won't trigger the render for some reason...
223230
//h.toastText = "new post added above"

0 commit comments

Comments
 (0)