Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colors theme fix: charging colors in powergraph #1356

Merged
merged 2 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ body>.container-fluid {
--color-switchRed: #d12020;
--color-switchGreen: #4db662;
--color-switchBlue: steelblue;
--color-cp1: #6baed6;
--color-cp2: #4292c6;
--color-cp3: #2171b5;
--color-cp4: #9ecae1;
--color-cp5: #c6dbef;
--color-cp6: #deebf7;
--color-cp7: #08519c;
--color-cp8: #6baed6;
--color-cp0: #6baed6;
--color-cp1: #4292c6;
--color-cp2: #2171b5;
--color-cp3: #9ecae1;
--color-cp4: #c6dbef;
--color-cp5: #deebf7;
--color-cp6: #08519c;
--color-cp7: #6baed6;
--color-evu: firebrick;
--color-pv: #33a02c;
--color-house: #7f7f7f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,12 @@
<div v-if="props.chargepoint.etActive" class="row m-1 p-0">
<div class="col m-0 mb-1 p-0 d-flex justify-content-between">
<InfoItem heading="max. Preis:">
{{ (Math.round(props.chargepoint.etMaxPrice*10)/10).toFixed(1) }} ct
{{
(Math.round(props.chargepoint.etMaxPrice * 10) / 10).toFixed(
1,
)
}}
ct
</InfoItem>
<InfoItem heading="akt. Preis:">
<span :style="currentPriceStyle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ export function addChargePoint(chargePointIndex: number) {
if (!(chargePointIndex in chargePoints)) {
chargePoints[chargePointIndex] = new ChargePoint(chargePointIndex)
chargePoints[chargePointIndex].color =
'var(--color-cp' + Object.values(chargePoints).length + ')'
'var(--color-cp' + (Object.values(chargePoints).length - 1) + ')'
// console.info('Added chargepoint ' + chargePointIndex)
} else {
// console.info('Duplicate chargepoint message: ' + chargePointIndex)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ const keysToUse = computed(() => {
}
additionalKeys.map((key, i) => {
k.splice(idx + i, 0, key)
colors[key] = 'var(--color-cp' + i + ')'
})
return k
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export const monthGraph = reactive({
this.month = this.month + 1
}
} else {
this.month = this.month+1
this.month = this.month + 1
if (this.month > 12) {
this.month = 1
this.year += 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const dec = props.decimals ?? 0
const emit = defineEmits(['update:modelValue'])
const v = computed({
get() {
return Math.round(props.modelValue*Math.pow(10,dec))/Math.pow(10,dec)
return Math.round(props.modelValue * Math.pow(10, dec)) / Math.pow(10, dec)
},
set(value: number) {
emit('update:modelValue', value)
Expand Down

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/modules/web_themes/colors/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<link rel="apple-touch-icon" sizes="57x57" href="/openWB/web/img/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/openWB/web/img/favicons/apple-touch-icon-60x60.png">
<title>openWB</title>
<script type="module" crossorigin src="/openWB/web/themes/colors/assets/index-b069a092.js"></script>
<script type="module" crossorigin src="/openWB/web/themes/colors/assets/index-4f7e6ac3.js"></script>
<link rel="modulepreload" crossorigin href="/openWB/web/themes/colors/assets/vendor-6b0aaf61.js">
<link rel="stylesheet" href="/openWB/web/themes/colors/assets/index-6e0e9966.css">
<link rel="stylesheet" href="/openWB/web/themes/colors/assets/index-ddfbfd60.css">
</head>

<body>
Expand Down