diff --git a/app.json b/app.json index d24e37f..93822c2 100644 --- a/app.json +++ b/app.json @@ -6,7 +6,7 @@ "appType": "watchface", "version": { "code": 1, - "name": "1.0.0" + "name": "1.0.1" }, "icon": "icon.png", "vender": "zepp", @@ -31,7 +31,7 @@ "path": "watchface/index", "main": 1, "editable": 0, - "lockscreen": 0, + "lockscreen": 1, "hightCost": 0 } }, diff --git a/assets/390x450-amazfit-gts-4/icon.png b/assets/390x450-amazfit-gts-4/icon.png index 7f0f900..df914d3 100644 Binary files a/assets/390x450-amazfit-gts-4/icon.png and b/assets/390x450-amazfit-gts-4/icon.png differ diff --git a/assets/logo.png b/assets/logo.png new file mode 100644 index 0000000..df914d3 Binary files /dev/null and b/assets/logo.png differ diff --git a/watchface/modules/battery.js b/watchface/modules/battery.js index 31dfd67..239fe6d 100644 --- a/watchface/modules/battery.js +++ b/watchface/modules/battery.js @@ -3,15 +3,16 @@ import * as hmUI from '@zos/ui' import fontArray from '../fontData/secondaryFont' let batteryWg; - +const moduleX = 310 +const moduleY = 10 export default function(){ console.log("[modules]: battery module init") let battery = new hmSensor.Battery() updateBatteryWidget(battery.getCurrent()) battery.onChange(() => updateBatteryWidget(battery.getCurrent())) hmUI.createWidget(hmUI.widget.IMG, { - x: 355, - y: 10, + x: moduleX, + y: moduleY, src: 'date/perc.PNG' }) } @@ -20,8 +21,8 @@ function updateBatteryWidget(batteryPercentage){ hmUI.deleteWidget(batteryWg) } batteryWg = hmUI.createWidget(hmUI.widget.TEXT_IMG, { - x: 270, - y: 10, + x: moduleX - 85, + y: moduleY, type: hmUI.data_type.BATTERY, font_array: fontArray, h_space: 1, diff --git a/watchface/modules/date.js b/watchface/modules/date.js index 352dfe0..b0566a1 100644 --- a/watchface/modules/date.js +++ b/watchface/modules/date.js @@ -1,23 +1,26 @@ import * as hmUI from '@zos/ui' import fontArray from '../fontData/secondaryFont' +const moduleX = 50 +const moduleY = 10 + export default function () { console.log("[modules]: date module init") hmUI.createWidget(hmUI.widget.IMG_DATE, { - day_startX: 10, - day_startY: 10, + day_startX: moduleX, + day_startY: moduleY, day_align: hmUI.align.LEFT, day_space: 0, day_zero: 1, day_en_array: fontArray }) hmUI.createWidget(hmUI.widget.IMG, { - x: 54, - y: 14, + x: moduleX + 44, + y: moduleY + 4, src: 'date/point.PNG' }) hmUI.createWidget(hmUI.widget.IMG_DATE, { - month_startX: 70, - month_startY: 10, + month_startX: moduleX + 60, + month_startY: moduleY, month_align: hmUI.align.LEFT, month_space: 0, month_zero: 1, diff --git a/watchface/modules/distance.js b/watchface/modules/distance.js index cc02cf8..715be14 100644 --- a/watchface/modules/distance.js +++ b/watchface/modules/distance.js @@ -3,14 +3,16 @@ import * as hmUI from '@zos/ui'; import secondaryFont from '../fontData/secondaryFont'; let distWg; +const moduleX = 50 +const moduleY = 405 export default function(){ console.log("[modules]: distance module init") let distance = new hmSensor.Distance(); updateDistance(distance.getCurrent()) distance.onChange(() => updateDistance(distance.getCurrent())) hmUI.createWidget(hmUI.widget.IMG, { - x: 10, - y: 405, + x: moduleX, + y: moduleY, src: 'misc/dist.PNG' }) } @@ -24,8 +26,8 @@ function updateDistance(dist){ } dist = (dist * 1000).toFixed(0) distWg = hmUI.createWidget(hmUI.widget.TEXT_IMG, { - x: 160, - y: 405, + x: moduleX + 150, + y: moduleY, type: hmUI.data_type.DISTANCE, font_array: secondaryFont, h_space: 1,