@zeppos/zeus-cli 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/main.js +1 -1
- package/modules/bridge.js +1 -1
- package/modules/build.js +152 -32
- package/modules/create.js +7 -6
- package/modules/help.js +1 -1
- package/modules/run.js +14 -12
- package/package.json +2 -2
- package/private-modules/zeppos-app-utils/dist/api/index.js +1 -1
- package/private-modules/zeppos-app-utils/dist/config/device-server.js +113 -0
- package/private-modules/zeppos-app-utils/dist/config/device.js +403 -152
- package/private-modules/zeppos-app-utils/dist/modules/build.js +101 -29
- package/private-modules/zeppos-app-utils/dist/modules/config.js +1 -1
- package/private-modules/zeppos-app-utils/dist/modules/create/index.js +13 -11
- package/private-modules/zeppos-app-utils/dist/modules/create/local-app.js +10 -10
- package/private-modules/zeppos-app-utils/dist/modules/create/yeoman-app.js +1 -1
- package/private-modules/zeppos-app-utils/dist/modules/login.js +1 -1
- package/private-modules/zeppos-app-utils/dist/modules/status.js +1 -1
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/_package.json +14 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/app-side/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/app-side/index.js +13 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/app.js +10 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/app.json +59 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/assets/default/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/page/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/page/index.js +7 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/setting/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/setting/index.js +7 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/empty/watchface/index.js +13 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/app-side/index.js +11 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/app.js +10 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/app.json +66 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/assets/gtr3/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/assets/gtr3/image/logo.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/assets/gtr3-pro/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/assets/gtr3-pro/image/logo.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/assets/gts3/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/assets/gts3/image/logo.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/gtr3/home/index.page.js +18 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/gtr3/home/index.page.json +1 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/gtr3/home/index.style.js +15 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/gtr3-pro/home/index.page.js +18 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/gtr3-pro/home/index.page.json +1 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/gtr3-pro/home/index.style.js +15 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/gts3/home/index.page.js +19 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/gts3/home/index.page.json +1 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/gts3/home/index.style.js +15 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/page/i18n/en-US.po +3 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/setting/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/setting/index.js +5 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/hello-world/utils/index.js +3 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/jsconfig.json +14 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/app.js +7 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/app.json +51 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bg/bg.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/0.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/1.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/2.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/3.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/4.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/5.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/6.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/7.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/8.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/9.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/bigNum/sp.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/btn/back.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/btn/lv.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/btn/red.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/point/bg.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/point/bottom.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/point/center.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/point/h.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/point/left.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/point/m.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/point/right.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/point/s.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/preview.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/second/second.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/0.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/1.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/2.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/3.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/4.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/5.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/6.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/7.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/8.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/9.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/d.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/smallNum/n.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_ch/1.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_ch/2.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_ch/3.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_ch/4.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_ch/5.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_ch/6.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_ch/7.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_en/1.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_en/2.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_en/3.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_en/4.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_en/5.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_en/6.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/assets/gtr-3-pro/images/week_en/7.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/shared/buffer.js +11 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/shared/device-polyfill.js +3 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/shared/global.js +17 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/shared/js-module.js +27 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/shared/logger.js +21 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/shared/setTimeout.js +59 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/watchface/gtr-3-pro/index.js +1 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v1/timer/watchface/round/index.js +438 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/_package.json +14 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/app.js +28 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/app.json +51 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/consume.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/beer.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/cake.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/chocolate.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/coffee.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/cookies.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/ham.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/hamburger.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/ice cream.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/pizza.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/food/sausage.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/multiply.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/selected.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/assets/gt.s/unselected.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/page/gt/food-list.js +113 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/page/gt/index.js +126 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/page/i18n/en-US.po +42 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/page/i18n/zh-CN.po +42 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/utils/constants.js +54 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/utils/storage.js +42 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/utils/styles-gts-3.js +141 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/calories/utils/styles.js +142 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/app-side/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/app-side/index.js +13 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/app.js +10 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/app.json +59 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/assets/default/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/page/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/page/index.js +7 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/setting/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/setting/index.js +7 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/watchface/index.js +13 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/app-side/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/app-side/index.js +72 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/app.js +23 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/app.json +55 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/assets/common.r/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/assets/common.s/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/page/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/page/index.js +55 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/shared/data.js +67 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/shared/defer.js +35 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/shared/device-polyfill.js +6 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/shared/es6-promise.js +1149 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/shared/event.js +42 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/shared/message-side.js +1145 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/shared/message.js +1151 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/utils/config/constants.js +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/fetch-api/utils/config/device.js +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/app-side/index.js +11 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/app.js +10 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/app.json +66 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/assets/gt.r/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/assets/gt.r/image/logo.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/assets/gt.s/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/assets/gt.s/image/logo.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/page/gt/home/index.page.js +17 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/page/gt/home/index.page.json +1 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/page/gt/home/index.page.r.layout.js +28 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/page/gt/home/index.page.s.layout.js +28 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/page/gt/home/index.style.js +18 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/page/i18n/en-US.po +3 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/setting/i18n/en-US.po +2 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/setting/index.js +5 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/hello-world/utils/index.js +3 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/jsconfig.json +14 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/.prettierrc.js +6 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/app-side/index.js +48 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/app.js +25 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/app.json +70 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/assets/gt.s/icon.png +0 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/page/home/index.page.js +155 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/page/home/index.page.json +1 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/page/home/index.style.js +93 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/page/i18n/en-US.po +9 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/setting/i18n/en-US.po +5 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/setting/index.js +145 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/shared/data.js +67 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/shared/defer.js +35 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/shared/device-polyfill.js +6 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/shared/es6-promise.js +1149 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/shared/event.js +42 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/shared/message-side.js +1145 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/shared/message.js +1151 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/utils/constants.js +3 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/utils/fs.js +38 -0
- package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/todo-list/utils/index.js +38 -0
- package/private-modules/zeppos-app-utils/dist/public/template/v2/empty/page/index.js +2 -2
- package/private-modules/zeppos-app-utils/dist/tools/index.js +1 -1
- package/private-modules/zeppos-app-utils/dist/tools/tools.js +14 -0
- package/private-modules/zeppos-app-utils/package.json +1 -1
- package/utils/pre-check.js +11 -22
- package/utils/tools.js +14 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import * as hmUI from '@zos/ui'
|
|
2
|
+
import { push } from '@zos/router'
|
|
3
|
+
import { getText } from '@zos/i18n'
|
|
4
|
+
import { Calorie } from '@zos/sensor'
|
|
5
|
+
import { log as Logger, px } from '@zos/utils'
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
CALORIE_TEXT,
|
|
9
|
+
CALORIE_TEXT_SIZE,
|
|
10
|
+
UNIT_TEXT,
|
|
11
|
+
UNIT_TEXT_SIZE,
|
|
12
|
+
TOTAL_CONSUME_TEXT,
|
|
13
|
+
CONSUME_ICON,
|
|
14
|
+
CONSUME_ICON_WIDTH,
|
|
15
|
+
ALIGN_DESC_GROUP,
|
|
16
|
+
IMGAE_CALORIES_MARIN,
|
|
17
|
+
CALORIES_UNIT_MARIN,
|
|
18
|
+
EQUIVALENT_TO_BUTTON,
|
|
19
|
+
EQUIVALENT_TO_FOOD_ICON,
|
|
20
|
+
DEVICE_WIDTH,
|
|
21
|
+
EQUIVALENT_MORE_X,
|
|
22
|
+
EQUIVALENT_MARGIN,
|
|
23
|
+
EQUIVALENT_TO_FOOD_ICON_WIDTH,
|
|
24
|
+
EQUIVALENT_MORE_FOOD_ICON,
|
|
25
|
+
EQUIVALENT_MORE_FOOD_NUM,
|
|
26
|
+
} from '../../utils/styles-gts-3'
|
|
27
|
+
import { FOOD_CALORIES } from '../../utils/constants'
|
|
28
|
+
const logger = Logger.getLogger('calories')
|
|
29
|
+
const globalData = getApp()._options.globalData
|
|
30
|
+
|
|
31
|
+
Page({
|
|
32
|
+
buildTopContent(calories) {
|
|
33
|
+
const { width: w1 } = hmUI.getTextLayout('' + calories, {
|
|
34
|
+
text_size: CALORIE_TEXT_SIZE,
|
|
35
|
+
text_width: 0,
|
|
36
|
+
wrapped: 0
|
|
37
|
+
})
|
|
38
|
+
const { width: w2 } = hmUI.getTextLayout(getText('unit'), {
|
|
39
|
+
text_size: UNIT_TEXT_SIZE,
|
|
40
|
+
text_width: 0,
|
|
41
|
+
wrapped: 0
|
|
42
|
+
})
|
|
43
|
+
|
|
44
|
+
const w =
|
|
45
|
+
w1 + w2 + CONSUME_ICON_WIDTH + IMGAE_CALORIES_MARIN + CALORIES_UNIT_MARIN
|
|
46
|
+
const x = Math.round((DEVICE_WIDTH - w) / 2)
|
|
47
|
+
|
|
48
|
+
const group = hmUI.createWidget(hmUI.widget.GROUP, {
|
|
49
|
+
...ALIGN_DESC_GROUP,
|
|
50
|
+
x,
|
|
51
|
+
w,
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
group.createWidget(hmUI.widget.TEXT, {
|
|
55
|
+
...CALORIE_TEXT,
|
|
56
|
+
text: `${calories}`,
|
|
57
|
+
x: CONSUME_ICON_WIDTH + IMGAE_CALORIES_MARIN,
|
|
58
|
+
w: w1,
|
|
59
|
+
})
|
|
60
|
+
group.createWidget(hmUI.widget.TEXT, {
|
|
61
|
+
...UNIT_TEXT,
|
|
62
|
+
x: w - w2,
|
|
63
|
+
w: w2,
|
|
64
|
+
})
|
|
65
|
+
group.createWidget(hmUI.widget.IMG, CONSUME_ICON)
|
|
66
|
+
},
|
|
67
|
+
build() {
|
|
68
|
+
let calories = new Calorie().getCurrent() // Math.floor(Math.random() * 1000)
|
|
69
|
+
let currentFood = globalData.foodType
|
|
70
|
+
|
|
71
|
+
hmUI.createWidget(hmUI.widget.TEXT, TOTAL_CONSUME_TEXT)
|
|
72
|
+
|
|
73
|
+
this.buildTopContent(calories)
|
|
74
|
+
|
|
75
|
+
let activeIndex = FOOD_CALORIES.findIndex(
|
|
76
|
+
(item) => item.type === currentFood,
|
|
77
|
+
)
|
|
78
|
+
this.calculate(calories, FOOD_CALORIES[activeIndex])
|
|
79
|
+
hmUI.createWidget(hmUI.widget.BUTTON, {
|
|
80
|
+
...EQUIVALENT_TO_BUTTON,
|
|
81
|
+
click_func: () => {
|
|
82
|
+
push({
|
|
83
|
+
url: 'page/gts/food-list',
|
|
84
|
+
})
|
|
85
|
+
},
|
|
86
|
+
})
|
|
87
|
+
},
|
|
88
|
+
calculate(currentCalories, foodData) {
|
|
89
|
+
let { value, type } = foodData
|
|
90
|
+
let count = Math.floor(currentCalories / value)
|
|
91
|
+
if (count === 1 || count === 2 || count === 3) {
|
|
92
|
+
let x =
|
|
93
|
+
(DEVICE_WIDTH -
|
|
94
|
+
EQUIVALENT_TO_FOOD_ICON_WIDTH * count -
|
|
95
|
+
EQUIVALENT_MARGIN * (count - 1)) /
|
|
96
|
+
2
|
|
97
|
+
for (let index = 0; index < count; index++) {
|
|
98
|
+
this.drawFood(
|
|
99
|
+
x + (EQUIVALENT_MARGIN + EQUIVALENT_TO_FOOD_ICON_WIDTH) * index,
|
|
100
|
+
type,
|
|
101
|
+
) // icon
|
|
102
|
+
}
|
|
103
|
+
} else {
|
|
104
|
+
this.drawFood(EQUIVALENT_MORE_X, type) // icon
|
|
105
|
+
hmUI.createWidget(hmUI.widget.IMG, EQUIVALENT_MORE_FOOD_ICON)
|
|
106
|
+
hmUI.createWidget(hmUI.widget.TEXT, {
|
|
107
|
+
...EQUIVALENT_MORE_FOOD_NUM,
|
|
108
|
+
text: `${count}`,
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
drawFood(x, type) {
|
|
113
|
+
hmUI.createWidget(hmUI.widget.IMG, {
|
|
114
|
+
...EQUIVALENT_TO_FOOD_ICON,
|
|
115
|
+
x: px(x),
|
|
116
|
+
src: `food/${type}.png`,
|
|
117
|
+
})
|
|
118
|
+
},
|
|
119
|
+
onReady() {},
|
|
120
|
+
|
|
121
|
+
onShow() {},
|
|
122
|
+
|
|
123
|
+
onHide() {},
|
|
124
|
+
|
|
125
|
+
onDestroy() {},
|
|
126
|
+
})
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
msgid "unit"
|
|
3
|
+
msgstr "KCAL"
|
|
4
|
+
|
|
5
|
+
msgid "cake"
|
|
6
|
+
msgstr "Cake"
|
|
7
|
+
|
|
8
|
+
msgid "coffee"
|
|
9
|
+
msgstr "Coffee"
|
|
10
|
+
|
|
11
|
+
msgid "calories"
|
|
12
|
+
msgstr "Calories"
|
|
13
|
+
|
|
14
|
+
msgid "beer"
|
|
15
|
+
msgstr "Beer"
|
|
16
|
+
|
|
17
|
+
msgid "iceCream"
|
|
18
|
+
msgstr "Ice cream"
|
|
19
|
+
|
|
20
|
+
msgid "equivalent"
|
|
21
|
+
msgstr "Equivalent to"
|
|
22
|
+
|
|
23
|
+
msgid "hamburger"
|
|
24
|
+
msgstr "Hamburger"
|
|
25
|
+
|
|
26
|
+
msgid "pizza"
|
|
27
|
+
msgstr "Pizza"
|
|
28
|
+
|
|
29
|
+
msgid "chocolate"
|
|
30
|
+
msgstr "Chocolate"
|
|
31
|
+
|
|
32
|
+
msgid "consumption"
|
|
33
|
+
msgstr "Consumption Today"
|
|
34
|
+
|
|
35
|
+
msgid "sausage"
|
|
36
|
+
msgstr "Sausage"
|
|
37
|
+
|
|
38
|
+
msgid "ham"
|
|
39
|
+
msgstr "Ham"
|
|
40
|
+
|
|
41
|
+
msgid "cookie"
|
|
42
|
+
msgstr "Cookie"
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
msgid "unit"
|
|
3
|
+
msgstr "KCAL"
|
|
4
|
+
|
|
5
|
+
msgid "cake"
|
|
6
|
+
msgstr "蛋糕"
|
|
7
|
+
|
|
8
|
+
msgid "coffee"
|
|
9
|
+
msgstr "咖啡"
|
|
10
|
+
|
|
11
|
+
msgid "calories"
|
|
12
|
+
msgstr "卡路里"
|
|
13
|
+
|
|
14
|
+
msgid "beer"
|
|
15
|
+
msgstr "啤酒"
|
|
16
|
+
|
|
17
|
+
msgid "iceCream"
|
|
18
|
+
msgstr "冰淇淋"
|
|
19
|
+
|
|
20
|
+
msgid "equivalent"
|
|
21
|
+
msgstr "相当于"
|
|
22
|
+
|
|
23
|
+
msgid "hamburger"
|
|
24
|
+
msgstr "汉堡包"
|
|
25
|
+
|
|
26
|
+
msgid "pizza"
|
|
27
|
+
msgstr "披萨"
|
|
28
|
+
|
|
29
|
+
msgid "chocolate"
|
|
30
|
+
msgstr "巧克力"
|
|
31
|
+
|
|
32
|
+
msgid "consumption"
|
|
33
|
+
msgstr "今日消耗"
|
|
34
|
+
|
|
35
|
+
msgid "sausage"
|
|
36
|
+
msgstr "香肠"
|
|
37
|
+
|
|
38
|
+
msgid "ham"
|
|
39
|
+
msgstr "火腿"
|
|
40
|
+
|
|
41
|
+
msgid "cookie"
|
|
42
|
+
msgstr "曲奇饼"
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { getText } from '@zos/i18n'
|
|
2
|
+
|
|
3
|
+
export const FOOD_CALORIES = [
|
|
4
|
+
{
|
|
5
|
+
name: getText('hamburger'),
|
|
6
|
+
type: 'hamburger',
|
|
7
|
+
value: 512,
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
name: getText('chocolate'),
|
|
11
|
+
type: 'chocolate',
|
|
12
|
+
value: 71,
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: getText('cookie'),
|
|
16
|
+
type: 'cookies',
|
|
17
|
+
value: 44,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: getText('cake'),
|
|
21
|
+
type: 'cake',
|
|
22
|
+
value: 379,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: getText('pizza'),
|
|
26
|
+
type: 'pizza',
|
|
27
|
+
value: 470,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: getText('sausage'),
|
|
31
|
+
type: 'sausage',
|
|
32
|
+
value: 381,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: getText('ham'),
|
|
36
|
+
type: 'ham',
|
|
37
|
+
value: 99,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: getText('iceCream'),
|
|
41
|
+
type: 'ice cream',
|
|
42
|
+
value: 64,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: getText('coffee'),
|
|
46
|
+
type: 'coffee',
|
|
47
|
+
value: 64,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: getText('beer'),
|
|
51
|
+
type: 'beer',
|
|
52
|
+
value: 64,
|
|
53
|
+
},
|
|
54
|
+
]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
statSync,
|
|
3
|
+
writeFileSync,
|
|
4
|
+
readFileSync
|
|
5
|
+
} from '@zos/fs'
|
|
6
|
+
|
|
7
|
+
export default class LocalStorage {
|
|
8
|
+
constructor(fileName = "") {
|
|
9
|
+
this.fileName = fileName
|
|
10
|
+
this.contentObj = {}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
set(obj) {
|
|
14
|
+
writeFileSync({
|
|
15
|
+
path: this.fileName,
|
|
16
|
+
data: JSON.stringify(obj),
|
|
17
|
+
options: {
|
|
18
|
+
encoding: 'utf8'
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
get() {
|
|
24
|
+
const fStat = statSync({
|
|
25
|
+
path: this.fileName
|
|
26
|
+
})
|
|
27
|
+
if (fStat) {
|
|
28
|
+
try {
|
|
29
|
+
this.contentObj = JSON.parse(readFileSync({
|
|
30
|
+
path: this.fileName,
|
|
31
|
+
options: {
|
|
32
|
+
encoding: 'utf8'
|
|
33
|
+
}
|
|
34
|
+
}))
|
|
35
|
+
} catch (error) {
|
|
36
|
+
this.contentObj = {}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return this.contentObj
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import * as hmUI from '@zos/ui'
|
|
2
|
+
import { getText } from '@zos/i18n'
|
|
3
|
+
import { getDeviceInfo } from '@zos/device'
|
|
4
|
+
import { px } from '@zos/utils'
|
|
5
|
+
|
|
6
|
+
export const { width: DEVICE_WIDTH, height: DEVICE_HEIGHT } = getDeviceInfo()
|
|
7
|
+
|
|
8
|
+
export const COMMON_TITLE_TEXT = {
|
|
9
|
+
text: getText('calories'),
|
|
10
|
+
x: 32,
|
|
11
|
+
y: 11,
|
|
12
|
+
w: 232,
|
|
13
|
+
h: 42,
|
|
14
|
+
color: 0xffffff,
|
|
15
|
+
text_size: 32,
|
|
16
|
+
align_v: hmUI.align.LEFT,
|
|
17
|
+
text_style: hmUI.text_style.WRAP,
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const ALIGN_DESC_GROUP = {
|
|
21
|
+
x: 0,
|
|
22
|
+
y: px(80),
|
|
23
|
+
w: 0,
|
|
24
|
+
h: px(82),
|
|
25
|
+
}
|
|
26
|
+
export const IMGAE_CALORIES_MARIN = px(0)
|
|
27
|
+
export const CALORIES_UNIT_MARIN = px(8)
|
|
28
|
+
export const CALORIE_TEXT_SIZE = px(72)
|
|
29
|
+
export const CALORIE_TEXT = {
|
|
30
|
+
text: '400',
|
|
31
|
+
x: 0,
|
|
32
|
+
y: 0,
|
|
33
|
+
w: 0,
|
|
34
|
+
h: px(82),
|
|
35
|
+
color: 0xffffff,
|
|
36
|
+
text_size: CALORIE_TEXT_SIZE,
|
|
37
|
+
align_h: hmUI.align.LEFT,
|
|
38
|
+
align_v: hmUI.align.CENTER_V,
|
|
39
|
+
}
|
|
40
|
+
export const UNIT_TEXT_SIZE = px(24)
|
|
41
|
+
export const UNIT_TEXT = {
|
|
42
|
+
text: getText('unit'),
|
|
43
|
+
x: 0,
|
|
44
|
+
y: px(46),
|
|
45
|
+
w: 0,
|
|
46
|
+
h: px(34),
|
|
47
|
+
color: 0x999999,
|
|
48
|
+
text_size: UNIT_TEXT_SIZE,
|
|
49
|
+
align_h: hmUI.align.LEFT,
|
|
50
|
+
align_v: hmUI.align.CENTER_V,
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const TOTAL_CONSUME_TEXT = {
|
|
54
|
+
text: getText('consumption'),
|
|
55
|
+
x: 4,
|
|
56
|
+
y: 162,
|
|
57
|
+
w: 382,
|
|
58
|
+
h: 38,
|
|
59
|
+
color: 0x999999,
|
|
60
|
+
text_size: 28,
|
|
61
|
+
align_h: hmUI.align.CENTER_H,
|
|
62
|
+
align_v: hmUI.align.CENTER_V,
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const EQUIVALENT_TO_BUTTON = {
|
|
66
|
+
text: getText('equivalent'),
|
|
67
|
+
press_color: 0x333333,
|
|
68
|
+
normal_color: 0x1a1a1a,
|
|
69
|
+
x: 71,
|
|
70
|
+
y: 330,
|
|
71
|
+
w: 248,
|
|
72
|
+
h: 48,
|
|
73
|
+
color: 0xffffff,
|
|
74
|
+
text_size: 28,
|
|
75
|
+
radius: 28,
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export const CONSUME_ICON_WIDTH = px(32)
|
|
79
|
+
export const CONSUME_ICON = {
|
|
80
|
+
src: 'consume.png',
|
|
81
|
+
x: 0,
|
|
82
|
+
y: px(47),
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export const EQUIVALENT_MARGIN = 8
|
|
86
|
+
export const EQUIVALENT_MORE_X = 113
|
|
87
|
+
export const EQUIVALENT_TO_FOOD_ICON_WIDTH = 72
|
|
88
|
+
|
|
89
|
+
export const EQUIVALENT_TO_FOOD_ICON = {
|
|
90
|
+
src: 'food/hamburger.png',
|
|
91
|
+
x: 103, //0
|
|
92
|
+
y: 224,
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export const EQUIVALENT_MORE_FOOD_ICON = {
|
|
96
|
+
src: 'multiply.png',
|
|
97
|
+
x: 183,
|
|
98
|
+
y: 235,
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export const EQUIVALENT_MORE_FOOD_NUM = {
|
|
102
|
+
text: '',
|
|
103
|
+
x: 237,
|
|
104
|
+
y: 225,
|
|
105
|
+
w: 60,
|
|
106
|
+
h: 60,
|
|
107
|
+
color: 0xee801e,
|
|
108
|
+
text_size: 50,
|
|
109
|
+
align_h: hmUI.align.LEFT,
|
|
110
|
+
align_v: hmUI.align.CENTER_V,
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export const FOOD_LIST_Y = 96
|
|
114
|
+
export const FOOD_LIST_ITEM_MARGIN = 60
|
|
115
|
+
export const FOOD_LIST_ITEM_HEIGHT = 52
|
|
116
|
+
export const FOOD_LIST_RADIOGROUP = {
|
|
117
|
+
select_src: 'selected.png',
|
|
118
|
+
unselect_src: 'unselected.png',
|
|
119
|
+
x: 30,
|
|
120
|
+
y: FOOD_LIST_Y,
|
|
121
|
+
w: -1,
|
|
122
|
+
h: -1,
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export const FOOD_LIST_RADIO_ITEM = {
|
|
126
|
+
x: 0,
|
|
127
|
+
y: FOOD_LIST_Y,
|
|
128
|
+
w: FOOD_LIST_ITEM_HEIGHT,
|
|
129
|
+
h: FOOD_LIST_ITEM_HEIGHT,
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export const FOOD_LIST_RADIO_ITEM_TEXT = {
|
|
133
|
+
x: 106,
|
|
134
|
+
y: 97,
|
|
135
|
+
w: 254,
|
|
136
|
+
h: FOOD_LIST_ITEM_HEIGHT,
|
|
137
|
+
color: 0xffffff,
|
|
138
|
+
text_size: 32,
|
|
139
|
+
align_h: hmUI.align.LEFT,
|
|
140
|
+
align_v: hmUI.align.CENTER_V,
|
|
141
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import * as hmUI from '@zos/ui'
|
|
2
|
+
import { getText } from '@zos/i18n'
|
|
3
|
+
import { getDeviceInfo } from '@zos/device'
|
|
4
|
+
import { px } from '@zos/utils'
|
|
5
|
+
|
|
6
|
+
export const { width: DEVICE_WIDTH, height: DEVICE_HEIGHT } = getDeviceInfo()
|
|
7
|
+
|
|
8
|
+
export const COMMON_TITLE_TEXT = {
|
|
9
|
+
text: getText('calories'),
|
|
10
|
+
x: px(96),
|
|
11
|
+
y: px(40),
|
|
12
|
+
w: px(288),
|
|
13
|
+
h: px(46),
|
|
14
|
+
color: 0xffffff,
|
|
15
|
+
text_size: px(36),
|
|
16
|
+
align_h: hmUI.align.CENTER_H,
|
|
17
|
+
align_v: hmUI.align.CENTER_V,
|
|
18
|
+
text_style: hmUI.text_style.WRAP,
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const ALIGN_DESC_GROUP = {
|
|
22
|
+
x: 0,
|
|
23
|
+
y: px(118),
|
|
24
|
+
w: 0,
|
|
25
|
+
h: px(100),
|
|
26
|
+
}
|
|
27
|
+
export const IMGAE_CALORIES_MARIN = px(0)
|
|
28
|
+
export const CALORIES_UNIT_MARIN = px(8)
|
|
29
|
+
export const CALORIE_TEXT_SIZE = px(100)
|
|
30
|
+
export const CALORIE_TEXT = {
|
|
31
|
+
text: '',
|
|
32
|
+
x: px(0),
|
|
33
|
+
y: px(0),
|
|
34
|
+
w: px(0),
|
|
35
|
+
h: px(100),
|
|
36
|
+
color: 0xffffff,
|
|
37
|
+
text_size: CALORIE_TEXT_SIZE,
|
|
38
|
+
align_h: hmUI.align.LEFT,
|
|
39
|
+
align_v: hmUI.align.CENTER_V,
|
|
40
|
+
}
|
|
41
|
+
export const UNIT_TEXT_SIZE = px(28)
|
|
42
|
+
export const UNIT_TEXT = {
|
|
43
|
+
text: getText('unit'),
|
|
44
|
+
x: px(0),
|
|
45
|
+
y: px(63),
|
|
46
|
+
w: px(0),
|
|
47
|
+
h: px(34),
|
|
48
|
+
color: 0x999999,
|
|
49
|
+
text_size: UNIT_TEXT_SIZE,
|
|
50
|
+
align_h: hmUI.align.LEFT,
|
|
51
|
+
align_v: hmUI.align.CENTER_V,
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export const TOTAL_CONSUME_TEXT = {
|
|
55
|
+
text: getText('consumption'),
|
|
56
|
+
x: px(40),
|
|
57
|
+
y: px(218),
|
|
58
|
+
w: px(400),
|
|
59
|
+
h: px(38),
|
|
60
|
+
color: 0x999999,
|
|
61
|
+
text_size: px(28),
|
|
62
|
+
align_h: hmUI.align.CENTER_H,
|
|
63
|
+
align_v: hmUI.align.CENTER_V,
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const EQUIVALENT_TO_BUTTON = {
|
|
67
|
+
text: getText('equivalent'),
|
|
68
|
+
press_color: 0x333333,
|
|
69
|
+
normal_color: 0x1a1a1a,
|
|
70
|
+
x: px(108),
|
|
71
|
+
y: px(376),
|
|
72
|
+
w: px(264),
|
|
73
|
+
h: px(56),
|
|
74
|
+
color: 0xffffff,
|
|
75
|
+
text_size: px(32),
|
|
76
|
+
radius: px(28),
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export const CONSUME_ICON_WIDTH = px(48)
|
|
80
|
+
export const CONSUME_ICON = {
|
|
81
|
+
src: 'consume.png',
|
|
82
|
+
x: px(0),
|
|
83
|
+
y: px(53),
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export const EQUIVALENT_MARGIN = 8
|
|
87
|
+
export const EQUIVALENT_MORE_X = 155
|
|
88
|
+
export const EQUIVALENT_TO_FOOD_ICON_WIDTH = 80
|
|
89
|
+
|
|
90
|
+
export const EQUIVALENT_TO_FOOD_ICON = {
|
|
91
|
+
src: 'food/hamburger.png',
|
|
92
|
+
x: px(0),
|
|
93
|
+
y: px(288),
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export const EQUIVALENT_MORE_FOOD_ICON = {
|
|
97
|
+
src: 'multiply.png',
|
|
98
|
+
x: px(243),
|
|
99
|
+
y: px(304),
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export const EQUIVALENT_MORE_FOOD_NUM = {
|
|
103
|
+
text: '',
|
|
104
|
+
x: px(299),
|
|
105
|
+
y: px(294),
|
|
106
|
+
w: px(100),
|
|
107
|
+
h: px(60),
|
|
108
|
+
color: 0xee801e,
|
|
109
|
+
text_size: px(55),
|
|
110
|
+
align_h: hmUI.align.LEFT,
|
|
111
|
+
align_v: hmUI.align.CENTER_V,
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export const FOOD_LIST_Y = 178
|
|
115
|
+
export const FOOD_LIST_ITEM_MARGIN = 64
|
|
116
|
+
export const FOOD_LIST_ITEM_HEIGHT = 64
|
|
117
|
+
export const FOOD_LIST_RADIOGROUP = {
|
|
118
|
+
select_src: 'selected.png',
|
|
119
|
+
unselect_src: 'unselected.png',
|
|
120
|
+
x: px(44),
|
|
121
|
+
y: px(FOOD_LIST_Y),
|
|
122
|
+
w: -1,
|
|
123
|
+
h: -1,
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export const FOOD_LIST_RADIO_ITEM = {
|
|
127
|
+
x: px(0),
|
|
128
|
+
y: px(0),
|
|
129
|
+
w: px(FOOD_LIST_ITEM_HEIGHT),
|
|
130
|
+
h: px(FOOD_LIST_ITEM_HEIGHT),
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export const FOOD_LIST_RADIO_ITEM_TEXT = {
|
|
134
|
+
x: px(120),
|
|
135
|
+
y: px(0),
|
|
136
|
+
w: px(360),
|
|
137
|
+
h: px(64),
|
|
138
|
+
color: 0xffffff,
|
|
139
|
+
text_size: px(32),
|
|
140
|
+
align_h: hmUI.align.LEFT,
|
|
141
|
+
align_v: hmUI.align.CENTER_V,
|
|
142
|
+
}
|
package/private-modules/zeppos-app-utils/dist/public/template/config-version-v3/v2/empty/app.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"configVersion": "v3",
|
|
3
|
+
"app": {
|
|
4
|
+
"appId": 20000,
|
|
5
|
+
"appName": "Empty",
|
|
6
|
+
"appType": "app",
|
|
7
|
+
"version": {
|
|
8
|
+
"code": 1,
|
|
9
|
+
"name": "1.0.0"
|
|
10
|
+
},
|
|
11
|
+
"icon": "icon.png",
|
|
12
|
+
"vender": "zepp",
|
|
13
|
+
"description": "empty application"
|
|
14
|
+
},
|
|
15
|
+
"permissions": [
|
|
16
|
+
"data:os.device.info",
|
|
17
|
+
"device:os.local_storage",
|
|
18
|
+
"data:user.hd.calorie"
|
|
19
|
+
],
|
|
20
|
+
"runtime": {
|
|
21
|
+
"apiVersion": {
|
|
22
|
+
"compatible": "2.0.0",
|
|
23
|
+
"target": "2.0.0",
|
|
24
|
+
"minVersion": "2.0"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"targets": {
|
|
28
|
+
"default": {
|
|
29
|
+
"module": {
|
|
30
|
+
"page": {
|
|
31
|
+
"pages": [
|
|
32
|
+
"page/index"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"app-side": {
|
|
36
|
+
"path": "app-side/index"
|
|
37
|
+
},
|
|
38
|
+
"setting": {
|
|
39
|
+
"path": "setting/index"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"platforms": [
|
|
43
|
+
{
|
|
44
|
+
"st": "r"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"st": "s"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"designWidth": 480
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"i18n": {
|
|
54
|
+
"en-US": {
|
|
55
|
+
"appName": "Empty"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"defaultLanguage": "en-US"
|
|
59
|
+
}
|
|
Binary file
|