Skip to content

Commit b683b5f

Browse files
committed
Info end user about beacon feature
1 parent 6453d69 commit b683b5f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

aat-gtk/src/main/kotlin/ch/bailu/aat_gtk/view/preferences/NetworkPreferencesPage.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package ch.bailu.aat_gtk.view.preferences
22

3+
import ch.bailu.aat_gtk.view.LabelTextView
34
import ch.bailu.aat_lib.app.AppContext
45
import ch.bailu.aat_lib.preferences.beacon.*
56
import ch.bailu.gtk.adw.PreferencesGroup
@@ -10,6 +11,7 @@ class NetworkPreferencesPage(appContext: AppContext) : PreferencesPageParent("Ne
1011
page.add(PreferencesGroup().apply {
1112
setTitle("Beacon")
1213
add(SolidBooleanSwitchView(SolidBeaconEnabled(appContext.storage)).layout)
14+
add(LabelTextView(SolidBeaconEnabled.toolTip).layout)
1315
add(SolidEntryView(SolidBeaconServer(appContext.storage)).layout)
1416
add(SolidEntryView(SolidBeaconKey(appContext.storage)).layout)
1517
})

aat-lib/src/main/java/ch/bailu/aat_lib/preferences/beacon/SolidBeaconEnabled.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@ package ch.bailu.aat_lib.preferences.beacon
22

33
import ch.bailu.aat_lib.preferences.SolidBoolean
44
import ch.bailu.aat_lib.preferences.StorageInterface
5+
import ch.bailu.aat_lib.resources.ToDo
56

67
class SolidBeaconEnabled(storage: StorageInterface) : SolidBoolean(storage, KEY) {
78
override fun getLabel(): String {
89
return "Enabled"
910
}
1011

12+
override fun getToolTip(): String? {
13+
return toolTip
14+
}
15+
1116
companion object {
1217
const val KEY = "BEACON_ENABLED"
18+
val toolTip = ToDo.translate("Experimental: Service for sharing live GPS locations. See https://github.com/MaxKellermann/beacon")
1319
}
1420
}

0 commit comments

Comments
 (0)