immersive-home/app/lib/stores/settings.gd

26 lines
604 B
GDScript3
Raw Normal View History

2024-01-25 17:29:33 +02:00
extends StoreClass
2024-03-17 01:14:31 +02:00
## Stores general settings for the app
2024-01-25 17:29:33 +02:00
const StoreClass = preload ("./store.gd")
2024-01-25 17:29:33 +02:00
func _init():
_save_path = "user://settings.json"
2024-04-09 18:11:24 +03:00
self.state = R.store({
## The adapter to use for connecting with a backend
"type": "HASS_WS",
"url": "",
"token": "",
## If the voice assistant should be enabled
"voice_assistant": false,
## If the onboarding process has been completed
"onboarding_complete": false
})
2024-01-25 17:29:33 +02:00
func clear():
2024-04-09 18:11:24 +03:00
self.state.type = "HASS_WS"
self.state.url = ""
self.state.token = ""
self.state.voice_assistant = false
2024-04-09 18:46:59 +03:00
self.state.onboarding_complete = false