mirror of
https://github.com/pebble-dev/clay.git
synced 2026-08-28 04:46:57 -04:00
#108 Fix colorpicker for Diorite
This commit is contained in:
committed by
Keegan Lillo
parent
ae31f9737f
commit
5d6e070e01
@@ -116,12 +116,13 @@ module.exports = {
|
|||||||
function autoLayout() {
|
function autoLayout() {
|
||||||
if (!clay.meta.activeWatchInfo ||
|
if (!clay.meta.activeWatchInfo ||
|
||||||
clay.meta.activeWatchInfo.firmware.major === 2 ||
|
clay.meta.activeWatchInfo.firmware.major === 2 ||
|
||||||
clay.meta.activeWatchInfo.platform === 'aplite' &&
|
['aplite', 'diorite'].indexOf(clay.meta.activeWatchInfo.platform) > -1 &&
|
||||||
!self.config.allowGray) {
|
!self.config.allowGray) {
|
||||||
return standardLayouts.BLACK_WHITE;
|
return standardLayouts.BLACK_WHITE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clay.meta.activeWatchInfo.platform === 'aplite' && self.config.allowGray) {
|
if (['aplite', 'diorite'].indexOf(clay.meta.activeWatchInfo.platform) > -1 &&
|
||||||
|
self.config.allowGray) {
|
||||||
return standardLayouts.GRAY;
|
return standardLayouts.GRAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -434,6 +434,28 @@ describe('component - color', function() {
|
|||||||
suffix: ''
|
suffix: ''
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
testAutoLayout('diorite', standardLayouts.BLACK_WHITE, false, '', {
|
||||||
|
platform: 'diorite',
|
||||||
|
model: 'qemu_platform_diorite',
|
||||||
|
language: 'en_US',
|
||||||
|
firmware: {
|
||||||
|
major: 4,
|
||||||
|
minor: 0,
|
||||||
|
patch: 0,
|
||||||
|
suffix: ''
|
||||||
|
}
|
||||||
|
});
|
||||||
|
testAutoLayout('diorite', standardLayouts.GRAY, true, '', {
|
||||||
|
platform: 'diorite',
|
||||||
|
model: 'qemu_platform_diorite',
|
||||||
|
language: 'en_US',
|
||||||
|
firmware: {
|
||||||
|
major: 4,
|
||||||
|
minor: 0,
|
||||||
|
patch: 0,
|
||||||
|
suffix: ''
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
testCustomLayout();
|
testCustomLayout();
|
||||||
testCustomLayout('COLOR');
|
testCustomLayout('COLOR');
|
||||||
|
|||||||
Reference in New Issue
Block a user