mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-05-06 23:52:37 +00:00
Tap menu items without a service tag will be ignored.
The JSON schema checker is relied on to highlight this error.
This commit is contained in:
@ -138,7 +138,7 @@ class HomeAssistantApp extends Application.AppBase {
|
|||||||
|
|
||||||
function fetchMenuConfig() as Void {
|
function fetchMenuConfig() as Void {
|
||||||
var options = {
|
var options = {
|
||||||
:method => Communications.HTTP_REQUEST_METHOD_GET,
|
:method => Communications.HTTP_REQUEST_METHOD_GET,
|
||||||
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
|
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
|
||||||
};
|
};
|
||||||
Communications.makeWebRequest(
|
Communications.makeWebRequest(
|
||||||
|
@ -32,11 +32,11 @@ class HomeAssistantMenuItem extends WatchUi.MenuItem {
|
|||||||
hidden var mService as Lang.String;
|
hidden var mService as Lang.String;
|
||||||
|
|
||||||
function initialize(
|
function initialize(
|
||||||
label as Lang.String or Lang.Symbol,
|
label as Lang.String or Lang.Symbol,
|
||||||
subLabel as Lang.String or Lang.Symbol or Null,
|
subLabel as Lang.String or Lang.Symbol or Null,
|
||||||
identifier as Lang.Object or Null,
|
identifier as Lang.Object or Null,
|
||||||
service as Lang.String or Null,
|
service as Lang.String or Null,
|
||||||
options as {
|
options as {
|
||||||
:alignment as WatchUi.MenuItem.Alignment,
|
:alignment as WatchUi.MenuItem.Alignment,
|
||||||
:icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol
|
:icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol
|
||||||
} or Null
|
} or Null
|
||||||
|
@ -31,16 +31,16 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
|
|||||||
hidden var strUnhandledHttpErr as Lang.String;
|
hidden var strUnhandledHttpErr as Lang.String;
|
||||||
|
|
||||||
function initialize(
|
function initialize(
|
||||||
label as Lang.String or Lang.Symbol,
|
label as Lang.String or Lang.Symbol,
|
||||||
subLabel as Lang.String or Lang.Symbol or {
|
subLabel as Lang.String or Lang.Symbol or {
|
||||||
:enabled as Lang.String or Lang.Symbol or Null,
|
:enabled as Lang.String or Lang.Symbol or Null,
|
||||||
:disabled as Lang.String or Lang.Symbol or Null
|
:disabled as Lang.String or Lang.Symbol or Null
|
||||||
} or Null,
|
} or Null,
|
||||||
identifier,
|
identifier,
|
||||||
enabled as Lang.Boolean,
|
enabled as Lang.Boolean,
|
||||||
options as {
|
options as {
|
||||||
:alignment as WatchUi.MenuItem.Alignment,
|
:alignment as WatchUi.MenuItem.Alignment,
|
||||||
:icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol
|
:icon as Graphics.BitmapType or WatchUi.Drawable or Lang.Symbol
|
||||||
} or Null
|
} or Null
|
||||||
) {
|
) {
|
||||||
strNoInternet = WatchUi.loadResource($.Rez.Strings.NoInternet);
|
strNoInternet = WatchUi.loadResource($.Rez.Strings.NoInternet);
|
||||||
|
@ -68,7 +68,7 @@ class HomeAssistantView extends WatchUi.Menu2 {
|
|||||||
);
|
);
|
||||||
addItem(item);
|
addItem(item);
|
||||||
mListToggleItems.add(item);
|
mListToggleItems.add(item);
|
||||||
} else if (type.equals("tap")) {
|
} else if (type.equals("tap") && service != null) {
|
||||||
addItem(
|
addItem(
|
||||||
new HomeAssistantMenuItem(
|
new HomeAssistantMenuItem(
|
||||||
name,
|
name,
|
||||||
|
Reference in New Issue
Block a user