mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-02-26 17:04:20 +00:00
Fixed undefined month
This commit is contained in:
12
lib/SvelteUi/app/dist/index.js
vendored
12
lib/SvelteUi/app/dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
<script>
|
||||
import { priceConfigStore, getPriceConfig } from './ConfigurationStore'
|
||||
import { translationsStore } from './TranslationService';
|
||||
import { wiki } from './Helpers.js';
|
||||
import { wiki, zeropad } from './Helpers.js';
|
||||
import Mask from './Mask.svelte'
|
||||
import { navigate } from 'svelte-navigator';
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
<select name="rsm" class="in-m" bind:value={c.s.m}>
|
||||
<option value={0}>-</option>
|
||||
{#each {length: 12} as _,i}
|
||||
<option value={i+1}>{translations.months?.[i]}</option>
|
||||
<option value={i+1}>{translations.months ? translations.months?.[i] : zeropad(i+1)}</option>
|
||||
{/each}
|
||||
</select>
|
||||
<input class="in-m" disabled value="to" style="width: 20px;color:#888;"/>
|
||||
@@ -183,7 +183,7 @@
|
||||
<select name="rem" class="in-l" bind:value={c.e.m}>
|
||||
<option value={0}>-</option>
|
||||
{#each {length: 12} as _,i}
|
||||
<option value={i+1}>{translations.months?.[i]}</option>
|
||||
<option value={i+1}>{translations.months ? translations.months?.[i] : zeropad(i+1)}</option>
|
||||
{/each}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
color: dark ? '#5c2da5' : '#7c3aed'
|
||||
});
|
||||
xTicks.push({
|
||||
label: peak.d > 0 ? zeropad(peak.d) + "." + translations.months?.[new Date().getMonth()] : "-"
|
||||
label: peak.d > 0 ? zeropad(peak.d) + "." + (translations.months ? translations.months?.[new Date().getMonth()] : zeropad(new Date().getMonth()+1)) : "-"
|
||||
})
|
||||
max = Math.max(max, peak.v);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ export default defineConfig({
|
||||
"/tariff.json": "http://192.168.233.49",
|
||||
"/realtime.json": "http://192.168.233.49",
|
||||
"/priceconfig.json": "http://192.168.233.49",
|
||||
"/translations.json": "http://192.168.233.188",
|
||||
"/cloudkey.json": "http://192.168.233.49",
|
||||
"/save": "http://192.168.233.49",
|
||||
"/reboot": "http://192.168.233.49",
|
||||
|
||||
Reference in New Issue
Block a user