feat: added week day support for english and russian language
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { getScene, SCENE_AOD } from '@zos/app'
|
||||
import * as hmUI from '@zos/ui';
|
||||
import secondaryFont from '../fontData/secondaryFont';
|
||||
import * as hmUI from '@zos/ui'
|
||||
import secondaryFont from '../fontData/secondaryFont'
|
||||
|
||||
const moduleX = 50
|
||||
const moduleY = 405
|
||||
@@ -24,7 +24,7 @@ export default function () {
|
||||
hmUI.createWidget(hmUI.widget.IMG, {
|
||||
x: moduleX + 243,
|
||||
y: moduleY,
|
||||
src: "misc/km.png"
|
||||
src: "misc/km.PNG"
|
||||
})
|
||||
}
|
||||
}
|
||||
34
watchface/modules/week.js
Normal file
34
watchface/modules/week.js
Normal file
@@ -0,0 +1,34 @@
|
||||
import { getScene, SCENE_AOD } from '@zos/app'
|
||||
import * as hmSetting from '@zos/settings'
|
||||
import * as hmUI from '@zos/ui'
|
||||
import { ru, en } from '../fontData/weekData'
|
||||
|
||||
const moduleX = 225
|
||||
const moduleY = 90
|
||||
|
||||
export default function () {
|
||||
console.log("[modules]: week module init")
|
||||
const language = hmSetting.getLanguage()
|
||||
if (getScene() != SCENE_AOD) {
|
||||
switch (language) {
|
||||
case 4: //ru-RU
|
||||
hmUI.createWidget(hmUI.widget.IMG_WEEK, {
|
||||
x: moduleX,
|
||||
y: moduleY,
|
||||
week_en: ru,
|
||||
week_tc: ru,
|
||||
week_sc: ru
|
||||
})
|
||||
break;
|
||||
default:
|
||||
hmUI.createWidget(hmUI.widget.IMG_WEEK, {
|
||||
x: moduleX,
|
||||
y: moduleY,
|
||||
week_en: en,
|
||||
week_tc: en,
|
||||
week_sc: en
|
||||
})
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user