Merge "Add missing targets option"

This commit is contained in:
jenkins-bot 2023-03-20 09:23:29 +00:00 committed by Gerrit Code Review
commit f352243a0a
3 changed files with 10 additions and 0 deletions

View file

@ -67,6 +67,7 @@ class GadgetDefinitionContentHandler extends JsonContentHandler {
'requiresES6' => false,
'hidden' => false,
'skins' => [],
'targets' => [ 'desktop' ],
'actions' => [],
'category' => '',
'supportsUrlLoad' => false,

View file

@ -30,6 +30,14 @@
"type": "boolean",
"default": false
},
"targets": {
"description": "List of ResourceLoader targets the module can run on",
"type": "array",
"items": {
"type": "string"
},
"default": [ "desktop" ]
},
"skins": {
"description": "Skins supported by this gadget; empty or true if all skins are supported",
"type": [ "array", "boolean" ],

View file

@ -124,6 +124,7 @@ class Gadget {
'onByDefault' => $data['settings']['default'],
'package' => $data['settings']['package'],
'hidden' => $data['settings']['hidden'],
'targets' => $data['settings']['targets'],
'requiredActions' => $data['settings']['actions'],
'requiredSkins' => $data['settings']['skins'],
'category' => $data['settings']['category'],