Add the option to only show items with particular capabilities

This commit is contained in:
Keegan
2016-05-30 20:30:17 -07:00
parent 7e2b75dd58
commit 5fe87a04de
6 changed files with 398 additions and 25 deletions
+16
View File
@@ -13,6 +13,17 @@ module.exports = [
"defaultValue": "Some arbitrary text explaining how this all works. " +
"It's cool if this wraps across multiple lines"
},
{
"type": "section",
"capabilities": ["RECT", "MICROPHONE"],
"items": [
{
"type": "text",
"defaultValue": "This section is only visible for rectangular devices that" +
" have a microphone"
}
]
},
{
"type": "section",
"items": [
@@ -20,6 +31,11 @@ module.exports = [
"type": "heading",
"defaultValue": "This is a section"
},
{
"type": "text",
"defaultValue": "This is only visible for aplite",
"capabilities": ["APLITE"]
},
{
"type": "input",
"appKey": "email",
+11
View File
@@ -6,6 +6,17 @@ window.claySettings = {};
window.customFn = require('./custom-fn.js');
window.clayComponents = require('../src/scripts/components');
window.clayMeta = require('../test/fixture').meta({
activeWatchInfo: {
platform: 'basalt',
model: 'qemu_platform_basalt',
language: 'en_US',
firmware: {
major: 3,
minor: 10,
patch: 2,
suffix: ''
}
},
userData: {
foo: 'bar',
config2: require('./config-2')