mirror of
https://github.com/gauvainboiche/ketapk.git
synced 2026-09-02 11:13:11 +02:00
fix: Deploying version dynamically + adding Tauri project files
This commit is contained in:
+10
-1
@@ -1,4 +1,4 @@
|
||||
import { MODES, PK_MODELS, CLINICAL_THRESHOLDS, generateSimulationData, processTimelineEvents } from './pkCore.js';
|
||||
import { MODES, PK_MODELS, CLINICAL_THRESHOLDS, APP_VERSION, generateSimulationData, processTimelineEvents } from './pkCore.js';
|
||||
import { adjustChartYScale } from './chartManager.js';
|
||||
import { initCalculatorUI } from './calculator.js';
|
||||
import { exportSimulationToCSV } from './csvExport.js';
|
||||
@@ -8,6 +8,13 @@ let currentMode = MODES.ESKETAMINE;
|
||||
let pkChart = null;
|
||||
let currentSimulationData = null;
|
||||
|
||||
function updateVersionDisplay() {
|
||||
const versionEl = document.querySelector('[data-i18n="app.version"]');
|
||||
if (versionEl) {
|
||||
versionEl.textContent = t('app.version', { version: APP_VERSION });
|
||||
}
|
||||
}
|
||||
|
||||
const timelineInputs = Array.from({ length: 61 }, (_, i) => ({
|
||||
time: i * 5,
|
||||
bolusMg: 0,
|
||||
@@ -16,12 +23,14 @@ const timelineInputs = Array.from({ length: 61 }, (_, i) => ({
|
||||
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
await initI18n();
|
||||
updateVersionDisplay();
|
||||
|
||||
const selectLang = document.getElementById('selectLang');
|
||||
if (selectLang) {
|
||||
selectLang.value = getCurrentLang();
|
||||
selectLang.addEventListener('change', async (e) => {
|
||||
await initI18n(e.target.value);
|
||||
updateVersionDisplay();
|
||||
renderTimelineGrid();
|
||||
updateSimulation();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user