mirror of
https://github.com/antos-rde/antosdk-apps.git
synced 2025-07-13 14:14:27 +02:00
SystemControl: use new AntoS local setting APIo
All checks were successful
gitea-sync/antosdk-apps/pipeline/head This commit looks good
All checks were successful
gitea-sync/antosdk-apps/pipeline/head This commit looks good
This commit is contained in:
@ -24,9 +24,9 @@ class SysmondService extends OS.application.BaseService
|
||||
@error e.toString(), e
|
||||
@quit()
|
||||
else
|
||||
return unless @setting().topic
|
||||
return unless @setting.topic
|
||||
@tunnel = Antunnel.tunnel
|
||||
@sub = new Antunnel.Subscriber(@setting().topic)
|
||||
@sub = new Antunnel.Subscriber(@setting.topic)
|
||||
@sub.onopen = () =>
|
||||
#@sub.send Antunnel.Msg.DATA, new TextEncoder("utf-8").encode("Hello")
|
||||
console.log("Subscribed to notification channel")
|
||||
@ -48,14 +48,14 @@ class SysmondService extends OS.application.BaseService
|
||||
@quit()
|
||||
Antunnel.tunnel.subscribe @sub
|
||||
|
||||
if not @setting().topic
|
||||
if not @setting.topic
|
||||
console.log "Open dialog"
|
||||
@app.openDialog("PromptDialog", {
|
||||
title: __("Enter topic name"),
|
||||
label: __("Please enter topic name")
|
||||
})
|
||||
.then (v) =>
|
||||
@setting().topic = v
|
||||
@setting.topic = v
|
||||
checklib()
|
||||
else
|
||||
checklib()
|
||||
|
Reference in New Issue
Block a user