Skip to content

Commit

Permalink
0.8.0-beta (#94)
Browse files Browse the repository at this point in the history
* test: Test fixing for the modal alert window
* feat: Auto update SVG values based on selected unit system
* bug: Corrects default Electron app.quit() behavior
* ci: Create version-update.js script
* doc: Updates README files
  • Loading branch information
kashamalasha authored Jan 26, 2024
1 parent 20e9741 commit 12354e2
Show file tree
Hide file tree
Showing 13 changed files with 340 additions and 128 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ I was inspired by the [mlukasek/M5_NightscoutMon](https://github.com/mlukasek/M5

## Installation packages

[![Download for Windows](https://img.shields.io/badge/Download-Windows%20.exe-blue?style=for-the-badge&logo=windows)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.7.1-beta/Owlet-0.7.1-beta-win-x64.exe)
[![Download for Windows](https://img.shields.io/badge/Download-Windows%20.exe-blue?style=for-the-badge&logo=windows)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.8.0-beta/Owlet-0.8.0-beta-win-x64.exe)

[![Download for macOS(Apple Silicon)](https://img.shields.io/badge/Download-macOS%20(Apple%20Silicon)%20.dmg-blue?style=for-the-badge&logo=apple)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.7.1-beta/Owlet-0.7.1-beta-mac-arm64.dmg)
[![Download for macOS(Apple Silicon)](https://img.shields.io/badge/Download-macOS%20(Apple%20Silicon)%20.dmg-blue?style=for-the-badge&logo=apple)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.8.0-beta/Owlet-0.8.0-beta-mac-arm64.dmg)

[![Download for macOS(Intel)](https://img.shields.io/badge/Download-macOS%20(Intel)%20.dmg-blue?style=for-the-badge&logo=apple)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.7.1-beta/Owlet-0.7.1-beta-mac-x64.dmg)
[![Download for macOS(Intel)](https://img.shields.io/badge/Download-macOS%20(Intel)%20.dmg-blue?style=for-the-badge&logo=apple)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.8.0-beta/Owlet-0.8.0-beta-mac-x64.dmg)

[![Download for Linux](https://img.shields.io/badge/Download-Linux%20.AppImage-blue?style=for-the-badge&logo=linux&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.7.1-beta/Owlet-0.7.1-beta-linux-x86_64.AppImage)
[![Download for Linux](https://img.shields.io/badge/Download-Linux%20.AppImage-blue?style=for-the-badge&logo=linux&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.8.0-beta/Owlet-0.8.0-beta-linux-x86_64.AppImage)

[![Download Souces](https://img.shields.io/badge/Download-Sources%20.tar.gz-blue?style=for-the-badge&logo=electron&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/archive/refs/tags/v0.7.1-beta.tar.gz)
[![Download Souces](https://img.shields.io/badge/Download-Sources%20.tar.gz-blue?style=for-the-badge&logo=electron&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/archive/refs/tags/v0.8.0-beta.tar.gz)

[![Download Souces](https://img.shields.io/badge/Browse-Latest%20Release-red?style=for-the-badge&logo=github&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/releases/latest)

Expand Down Expand Up @@ -109,7 +109,7 @@ On the first launch, the app will prompt you to fill in the following settings

- **SHOW AGE** - (*default: enabled*) that option displays additional information about how old the shown data is

- **UNITS IN MMOL/L** - (*default: enabled*) that option allows to display sensor glucose values in mmol/l instead of mg/d. If you decide to modify this setting, ensure that you adjust all the blood sugar level preferences based on the selected units of measurement as well. When changing units of measurement, the color display of SGV values will be disabled until the settings are saved.
- **UNITS IN MMOL/L** - (*default: enabled*) that option allows to display sensor glucose values in mmol/l instead of mg/d. If you decide to modify this setting, please verify the blood sugar level preferences based on the selected units of measurement after making changes. Remember to save the settings after adjusting the measurement unit system.

- **CALC TREND** - (*default: disabled*) This option allows to calculate the direction of the trend using the last six received (for the last half an hour) SGV values. You may find it useful when your sensor doesn't have built-in option (e.g., Dexcom, Medtronic) and the Nightscout API doesn't store this value. In such cases, you will see a ` - ` symbol in the bottom right corner of the widget all the time instead of a trend arrow.

Expand Down
20 changes: 20 additions & 0 deletions build/version-update.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const fs = require(`fs`);
const path = require(`path`);

console.log(`Current version is:`, process.env.npm_package_version);

const readmeFiles = [
path.join(process.cwd(), `README.md`),
path.join(process.cwd(), `docs`, `README.it.md`),
path.join(process.cwd(), `docs`, `README.pl.md`),
path.join(process.cwd(), `docs`, `README.ru.md`),
];

readmeFiles.forEach((file) => {
let readmeContent = fs.readFileSync(file, `utf-8`);
readmeContent = readmeContent.replace(/\d\.\d\.\d-beta/g, process.env.npm_package_version);
fs.writeFileSync(file, readmeContent, `utf-8`);
console.log(`${path.relative(process.cwd(), file)} updated with the latest version:`, process.env.npm_package_version);
});

console.log(`Version-update job is done`);
12 changes: 6 additions & 6 deletions docs/README.it.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ Sono stato inspirato dalla soluzione [mlukasek/M5_NightscoutMon](https://github.

## Pacchetti di installazione

[![Download for Windows](https://img.shields.io/badge/Download-Windows%20.exe-blue?style=for-the-badge&logo=windows)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.7.1-beta/Owlet-0.7.1-beta-win-x64.exe)
[![Download for Windows](https://img.shields.io/badge/Download-Windows%20.exe-blue?style=for-the-badge&logo=windows)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.8.0-beta/Owlet-0.8.0-beta-win-x64.exe)

[![Download for macOS(Apple Silicon)](https://img.shields.io/badge/Download-macOS%20(Apple%20Silicon)%20.dmg-blue?style=for-the-badge&logo=apple)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.7.1-beta/Owlet-0.7.1-beta-mac-arm64.dmg)
[![Download for macOS(Apple Silicon)](https://img.shields.io/badge/Download-macOS%20(Apple%20Silicon)%20.dmg-blue?style=for-the-badge&logo=apple)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.8.0-beta/Owlet-0.8.0-beta-mac-arm64.dmg)

[![Download for macOS(Intel)](https://img.shields.io/badge/Download-macOS%20(Intel)%20.dmg-blue?style=for-the-badge&logo=apple)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.7.1-beta/Owlet-0.7.1-beta-mac-x64.dmg)
[![Download for macOS(Intel)](https://img.shields.io/badge/Download-macOS%20(Intel)%20.dmg-blue?style=for-the-badge&logo=apple)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.8.0-beta/Owlet-0.8.0-beta-mac-x64.dmg)

[![Download for Linux](https://img.shields.io/badge/Download-Linux%20.AppImage-blue?style=for-the-badge&logo=linux&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.7.1-beta/Owlet-0.7.1-beta-linux-x86_64.AppImage)
[![Download for Linux](https://img.shields.io/badge/Download-Linux%20.AppImage-blue?style=for-the-badge&logo=linux&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.8.0-beta/Owlet-0.8.0-beta-linux-x86_64.AppImage)

[![Download Souces](https://img.shields.io/badge/Download-Sources%20.tar.gz-blue?style=for-the-badge&logo=electron&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/archive/refs/tags/v0.7.1-beta.tar.gz)
[![Download Souces](https://img.shields.io/badge/Download-Sources%20.tar.gz-blue?style=for-the-badge&logo=electron&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/archive/refs/tags/v0.8.0-beta.tar.gz)

[![Download Souces](https://img.shields.io/badge/Browse-Latest%20Release-red?style=for-the-badge&logo=github&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/releases/latest)

Expand Down Expand Up @@ -109,7 +109,7 @@ Al primo avvio l'app ti proporrà di compilare le seguenti informazioni

- **MOSTRA ETÀ DATI** - (*default: enabled*) questa opzione visualizza informazioni aggiuntive sull'età dei dati mostrati

- **UNITÀ IN MMOL/L** - (*default: enabled*) questa opzione consente di visualizzare i valori glicemici del sensore in mmol/l anziché in mg/dl. Se decidi di modificare questa impostazione assicurati di regolare tutte le preferenze del livello di zucchero nel sangue anche in base alle unità di misura selezionate. Quando si modificano le unità di misura, la visualizzazione a colori dei valori SGV sarà disabilitata finché le impostazioni non verranno salvate.
- **UNITÀ IN MMOL/L** - (*default: enabled*) questa opzione consente di visualizzare i valori glicemici del sensore in mmol/l anziché in mg/dl. Se decidi di modificare questa impostazione assicurati di verificare tutte le preferenze del livello di zucchero nel sangue anche in base alle unità di misura selezionate. Ricordarsi di salvare le impostazioni dopo aver regolato il sistema di unità di misura.

- **CALCOLA TREND** - (*default: disabled*) Questa opzione consente di calcolare la direzione del trend utilizzando gli ultimi sei valori SGV ricevuti (nell'ultima mezz'ora). Potresti trovarlo utile quando il tuo sensore non dispone di un'opzione integrata (ad esempio, Dexcom, Medtronic) e l'API Nightscout non memorizza questo valore. In questi casi, vedrai sempre un simbolo ` - ` nell'angolo in basso a destra del widget invece di una freccia di tendenza.

Expand Down
12 changes: 6 additions & 6 deletions docs/README.pl.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ Zainspirowałem się rozwiązaniem [mlukasek/M5_NightscoutMon](https://github.co

## Gotowe pakiety instalacyjne

[![Pobierz dla systemu Windows](https://img.shields.io/badge/Download-Windows%20.exe-blue?style=for-the-badge&logo=windows)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.7.1-beta/Owlet-0.7.1-beta-win-x64.exe)
[![Pobierz dla systemu Windows](https://img.shields.io/badge/Download-Windows%20.exe-blue?style=for-the-badge&logo=windows)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.8.0-beta/Owlet-0.8.0-beta-win-x64.exe)

[![Pobierz dla systemu macOS (procesory Apple Silicon)](https://img.shields.io/badge/Download-macOS%20(Apple%20Silicon)%20.dmg-blue?style=for-the-badge&logo=apple)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.7.1-beta/Owlet-0.7.1-beta-mac-arm64.dmg)
[![Pobierz dla systemu macOS (procesory Apple Silicon)](https://img.shields.io/badge/Download-macOS%20(Apple%20Silicon)%20.dmg-blue?style=for-the-badge&logo=apple)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.8.0-beta/Owlet-0.8.0-beta-mac-arm64.dmg)

[![Pobierz dla systemu macOS (procesory Intel)](https://img.shields.io/badge/Download-macOS%20(Intel)%20.dmg-blue?style=for-the-badge&logo=apple)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.7.1-beta/Owlet-0.7.1-beta-mac-x64.dmg)
[![Pobierz dla systemu macOS (procesory Intel)](https://img.shields.io/badge/Download-macOS%20(Intel)%20.dmg-blue?style=for-the-badge&logo=apple)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.8.0-beta/Owlet-0.8.0-beta-mac-x64.dmg)

[![Pobierz dla systemów Linux](https://img.shields.io/badge/Download-Linux%20.AppImage-blue?style=for-the-badge&logo=linux&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.7.1-beta/Owlet-0.7.1-beta-linux-x86_64.AppImage)
[![Pobierz dla systemów Linux](https://img.shields.io/badge/Download-Linux%20.AppImage-blue?style=for-the-badge&logo=linux&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.8.0-beta/Owlet-0.8.0-beta-linux-x86_64.AppImage)

[![Pobierz źródła](https://img.shields.io/badge/Download-Sources%20.tar.gz-blue?style=for-the-badge&logo=electron&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/archive/refs/tags/v0.7.1-beta.tar.gz)
[![Pobierz źródła](https://img.shields.io/badge/Download-Sources%20.tar.gz-blue?style=for-the-badge&logo=electron&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/archive/refs/tags/v0.8.0-beta.tar.gz)

[![Pobierz źródła](https://img.shields.io/badge/Browse-Latest%20Release-red?style=for-the-badge&logo=github&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/releases/latest)

Expand Down Expand Up @@ -109,7 +109,7 @@ Przy pierwszym uruchomieniu aplikacja poprosi o uzupełnienie danych i wybór od

- **CZAS OD ODCZYTU** - (*domyślnie: włączony*) pokazuje czas w minutach, jaki upłynął od odtatniego odczytu CGM

- **UŻYJ MMOL/L** - (*domyślnie: włączony*) właczenie tej opcji oznacza obsługę w mmol/L. Polscy użytkownicy powinni odznaczyć ten checkbox, co będzie oznaczać przełącznie aplikacji w tryb wyświetlania w mg/dL. Pamiętaj, że należy zmodyfikować także Zakresy glikemii w prawym okienku.
- **UŻYJ MMOL/L** - (*domyślnie: włączony*) właczenie tej opcji oznacza obsługę w mmol/L zamiast mg/dL. Pamiętaj, że musisz także zweryfikować zakresy poziomu glukozy we krwi w prawym panelu, i o zapisaniu ustawień po dostosowaniu systemu jednostek miary.

- **KALKULUJ TREND** - (*domyślnie: wyłączony*) włączenie tej opcji spowoduje wewnętrzne wyliczanie strzałki trendu na podstawie ostatnich sześciu odczytów (czyli z ostatnich 30 minut). Włącz jeśli zamiast strzałki trendu zobaczysz na widźecie, w prawym dolnym rogu, znak "-" (minus). W standardowych warunkach opcja ta nie wymaga włączenia - dane o trendzie będą przekazywane przez Nightscout.

Expand Down
12 changes: 6 additions & 6 deletions docs/README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@

## Установка приложения

[![Download for Windows](https://img.shields.io/badge/Download-Windows%20.exe-blue?style=for-the-badge&logo=windows)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.7.1-beta/Owlet-0.7.1-beta-win-x64.exe)
[![Download for Windows](https://img.shields.io/badge/Download-Windows%20.exe-blue?style=for-the-badge&logo=windows)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.8.0-beta/Owlet-0.8.0-beta-win-x64.exe)

[![Download for macOS(Apple Silicon)](https://img.shields.io/badge/Download-macOS%20(Apple%20Silicon)%20.dmg-blue?style=for-the-badge&logo=apple)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.7.1-beta/Owlet-0.7.1-beta-mac-arm64.dmg)
[![Download for macOS(Apple Silicon)](https://img.shields.io/badge/Download-macOS%20(Apple%20Silicon)%20.dmg-blue?style=for-the-badge&logo=apple)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.8.0-beta/Owlet-0.8.0-beta-mac-arm64.dmg)

[![Download for macOS(Intel)](https://img.shields.io/badge/Download-macOS%20(Intel)%20.dmg-blue?style=for-the-badge&logo=apple)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.7.1-beta/Owlet-0.7.1-beta-mac-x64.dmg)
[![Download for macOS(Intel)](https://img.shields.io/badge/Download-macOS%20(Intel)%20.dmg-blue?style=for-the-badge&logo=apple)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.8.0-beta/Owlet-0.8.0-beta-mac-x64.dmg)

[![Download for Linux](https://img.shields.io/badge/Download-Linux%20.AppImage-blue?style=for-the-badge&logo=linux&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.7.1-beta/Owlet-0.7.1-beta-linux-x86_64.AppImage)
[![Download for Linux](https://img.shields.io/badge/Download-Linux%20.AppImage-blue?style=for-the-badge&logo=linux&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/releases/download/v0.8.0-beta/Owlet-0.8.0-beta-linux-x86_64.AppImage)

[![Download Souces](https://img.shields.io/badge/Download-Sources%20.tar.gz-blue?style=for-the-badge&logo=electron&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/archive/refs/tags/v0.7.1-beta.tar.gz)
[![Download Souces](https://img.shields.io/badge/Download-Sources%20.tar.gz-blue?style=for-the-badge&logo=electron&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/archive/refs/tags/v0.8.0-beta.tar.gz)

[![Download Souces](https://img.shields.io/badge/Browse-Latest%20Release-red?style=for-the-badge&logo=github&logoColor=white)](https://github.com/kashamalasha/nightscout-widget-electron/releases/latest)

Expand Down Expand Up @@ -107,7 +107,7 @@

- **ВРЕМЯ ПОСЛ. ЗАМЕРА** - (*по-умолчанию: включено*) эта опция позволяет отображать информацию о том, как давно было получено последнее измерение

- **ЗНАЧЕНИЯ В MMOL/L** - (*по-умолчанию: включено*) эта опция позволяет установить единицы измерения mmol/l вместо mg/dl. Если вы решили изменить эту настройку, убедитесь, что вы привели в соответствие параметры настроек контроля уровня глюкозы в соответствии с выбранными единицами измерения. В момент переключения единиц измерения цветовая заливка последнего значения будет отключена до сохранения настроек.
- **ЗНАЧЕНИЯ В MMOL/L** - (*по-умолчанию: включено*) эта опция позволяет установить единицы измерения mmol/l вместо mg/dl. Если вы решили изменить эту настройку, убедитесь, что вы прoверили параметры настроек контроля уровня глюкозы в соответствии с выбранными единицами измерения. Не забудьте сохранить настройки после выбора единиц измерения.

- **РАСЧЕТ ТРЕНДА** - (*по-умолчанию: выключено*) эта опция включает расчет направление тренда, используя последние 6 полученных измерений (последние 30 минут).
Эта функция может пригодиться, если ваш сенсор не имеет встроенной функции расчета тренда (напр. Dexcom или Medtronic), и Nightscout не хранит эту информацию; в таких случаях вы всегда будете видеть символ ` - ` в правом нижнем углу виджета вместо стрелки с направлением тренда.
Expand Down
4 changes: 2 additions & 2 deletions js/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ contextBridge.exposeInMainWorld(`electronAPI`, {
getTranslate: (language) => ipcRenderer.invoke(`get-translate`, language),
getLanguage: () => ipcRenderer.invoke(`get-language`),
setLanguage: (language) => ipcRenderer.send(`set-language`, language),
testUnits: (isMMOL, calcTrend) => ipcRenderer.send(`test-units`, isMMOL, calcTrend),
setUnits: (isMMOL, calcTrend) => ipcRenderer.on(`set-units`, isMMOL, calcTrend),
testUnits: (isMMOL) => ipcRenderer.send(`test-units`, isMMOL),
setUnits: (isMMOL) => ipcRenderer.on(`set-units`, isMMOL),
testCalcTrend: (calcTrend, isMMOL) => ipcRenderer.send(`test-calc-trend`, calcTrend, isMMOL),
setCalcTrend: (calcTrend, isMMOL) => ipcRenderer.on(`set-calc-trend`, calcTrend, isMMOL),
});
Loading

0 comments on commit 12354e2

Please sign in to comment.