-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
497 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.DS_Store | ||
node_modules/** | ||
dist/* | ||
npm-debug.log | ||
yarn-debug.log* | ||
yarn-error.log* | ||
yarn.lock | ||
package-lock.json | ||
selenium-debug.log | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Opposite Time Watchface | ||
Watchface for Amazfit GTR Mini and for other round ZeppOS watch. | ||
|
||
![demo](./demo-gtr-mini.png) | ||
|
||
## Features | ||
|
||
**Main features** | ||
- Time is displayed with a word for every digit. | ||
- Lots of extra data | ||
|
||
**Legend** | ||
|
||
`.` – steps | ||
|
||
`*` – calories | ||
|
||
`´` – active time | ||
|
||
`:` – heart rate | ||
|
||
`%` – battery | ||
|
||
**Original watchface by:** | ||
|
||
TTMM studia and their [OPPOSITTMM watchface for Fitbit Versa](https://ttmm.is/portfolio/opposittmm/). | ||
|
||
**Model compatibility:** Amazfit GTR Mini, Amazfit GTR 4 and all other round ZeppOS watches | ||
|
||
**Note: Time text requires devices with ZeppOS 2 and higher and is not compatible with older models like the GTR 3 and GTR 3.** | ||
|
||
**AOD:** No | ||
|
||
**Tap-zones:** No | ||
|
||
**Language:** English, Russian | ||
|
||
## Download ⏬ | ||
|
||
To install it to your smartwatch: | ||
|
||
See instructions [here](https://github.com/novvember/amazfit-watchfaces/blob/main/README.md) to download and install to your watch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
App({ | ||
globalData: {}, | ||
onCreate(options) { | ||
console.log('app on create invoke') | ||
}, | ||
|
||
onDestroy(options) { | ||
console.log('app on destroy invoke') | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"configVersion": "v3", | ||
"app": { | ||
"appId": 1068472, | ||
"appName": "Opposite Time", | ||
"appType": "watchface", | ||
"version": { | ||
"code": 1, | ||
"name": "1.0.0" | ||
}, | ||
"icon": "icon.png", | ||
"vender": "novvember", | ||
"cover": [ | ||
"cover.png", | ||
"cover2.png" | ||
], | ||
"description": "Opposite Time watchface. Source code here: https://github.com/novvember/amazfit-watchfaces. Original idea by Daniel Duarte" | ||
}, | ||
"runtime": { | ||
"apiVersion": { | ||
"compatible": "1.0.0", | ||
"target": "1.0.1", | ||
"minVersion": "1.0.0" | ||
} | ||
}, | ||
"permissions": [], | ||
"targets": { | ||
"common": { | ||
"module": { | ||
"watchface": { | ||
"path": "watchface/index", | ||
"main": 1, | ||
"editable": 1, | ||
"lockscreen": 1, | ||
"photoscreen": 0 | ||
} | ||
}, | ||
"platforms": [ | ||
{ | ||
"st": "r" | ||
} | ||
], | ||
"designWidth": 480 | ||
} | ||
}, | ||
"i18n": { | ||
"en-US": { | ||
"appName": "Opposite Time" | ||
}, | ||
"ru-RU": { | ||
"appName": "Opposite Time" | ||
}, | ||
"uk-UA": { | ||
"appName": "Opposite Time" | ||
} | ||
}, | ||
"defaultLanguage": "en-US", | ||
"debug": false | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
const lang = DeviceRuntimeCore.HmUtils.getLanguage(); | ||
const isRusLang = ['ru-RU', 'uk-UA'].includes(lang); | ||
|
||
const { width, height } = hmSetting.getDeviceInfo(); | ||
|
||
export const SCREEN = { | ||
width, | ||
height, | ||
centerX: width / 2, | ||
centerY: height / 2, | ||
}; | ||
|
||
export const COLORS = { | ||
primary: 0xffffff, | ||
secondary: 0x6b6c70, | ||
accent: 0xfea308, | ||
accentFaded: 0xce7f00, | ||
}; | ||
|
||
export const FONT = 'fonts/FiraSans-Black.ttf'; | ||
|
||
export const WIDTH = isRusLang ? px(364) : px(324); | ||
|
||
export const TEXT_HEIGHT = px(44); | ||
export const TEXT_SIZE = px(52); | ||
|
||
export const LINE_Y = new Array(7) | ||
.fill(null) | ||
.map((_, i) => px(82) + i * TEXT_HEIGHT); | ||
|
||
const DIGITS_EN = [ | ||
'ZERO', | ||
'ONE', | ||
'TWO', | ||
'THREE', | ||
'FOUR', | ||
'FIVE', | ||
'SIX', | ||
'SEVEN', | ||
'EIGHT', | ||
'NINE', | ||
]; | ||
|
||
const DIGITS_RU = [ | ||
'НОЛЬ', | ||
'ОДИН', | ||
'ДВА', | ||
'ТРИ', | ||
'ЧЕТЫРЕ', | ||
'ПЯТЬ', | ||
'ШЕСТЬ', | ||
'СЕМЬ', | ||
'ВОСЕМЬ', | ||
'ДЕВЯТЬ', | ||
]; | ||
|
||
export const DIGITS = isRusLang ? DIGITS_RU : DIGITS_EN; | ||
|
||
const WEEKDAYS_EN = ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']; | ||
const WEEKDAYS_RU = ['ПН', 'ВТ', 'СР', 'ЧТ', 'ПТ', 'СБ', 'ВС']; | ||
export const WEEKDAYS = isRusLang ? WEEKDAYS_RU : WEEKDAYS_EN; | ||
|
||
export const M_TEXT = isRusLang ? 'м' : 'm'; | ||
export const KM_TEXT = isRusLang ? 'км' : 'km'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export function getTimeDigits(timeSensor) { | ||
const { hour, minute, second } = timeSensor; | ||
|
||
const is12HourFormat = hmSetting.getTimeFormat() === 0; | ||
const hourValue = is12HourFormat ? hour % 12 || 12 : hour; | ||
const [h0, h1] = hourValue.toString().padStart(2, '0'); | ||
const [m0, m1] = minute.toString().padStart(2, '0'); | ||
const [s0, s1] = second.toString().padStart(2, '0'); | ||
|
||
return [h0, h1, m0, m1, s0, s1]; | ||
} |
Oops, something went wrong.