Skip to content
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 @@ -5,7 +5,8 @@
:charge-point-id="props.chargepoint.id"
class="fullwidth"
/>
<span class="fullwidth mb-4">

<span class="fullwidth mb-4 mt-2">
<button type="button" class="btn btn-secondary" @click="pageDown">
<i class="fa-solid fa-circle-down me-2"></i>
Abwärts
Expand Down Expand Up @@ -35,8 +36,8 @@
v-model="cp.ecoTargetPhases"
:options="[
['Eine', 1],
['Max', 2],
['Auto', 3],
['Max', 3],
['Auto', 0],
]"
/>
</ConfigItem>
Expand Down Expand Up @@ -161,4 +162,7 @@ function pageUp() {
.fullwidth {
grid-column: 1 / -1;
}
.chartsection {
border: 1px solid var(--color-border);
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
v-model="cp.instantTargetPhases"
:options="[
['Eine', 1],
['Max', 2],
['Auto', 3],
['Max', 3],
['Auto', 0],
]"
/>
</ConfigItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
v-model="cp.pvTargetPhases"
:options="[
['Eine', 1],
['Max', 2],
['Auto', 3],
['Max', 3],
['Auto', 0],
]"
/>
</ConfigItem>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="pricesettings">
<div class="grapharea">
<div class="grapharea rounded shadow p-2">
<span>Anbieter: {{ etData.etProvider }}</span>
<figure id="pricechart">
<svg viewBox="0 0 400 270">
Expand All @@ -12,7 +12,7 @@
</svg>
</figure>
</div>
<div class="controlarea">
<div class="controlarea rounded shadow p-2">
<span class="pt-1 pb-2 d-flex justify-content-between">
<button
type="button"
Expand Down Expand Up @@ -323,7 +323,7 @@ onMounted(() => {
.pricesettings {
display: grid;
grid-template-columns: 50% 50%;
grid-template-rows: 325px;
grid-template-rows: 310px;
}
.grapharea {
display: flex;
Expand All @@ -333,6 +333,9 @@ onMounted(() => {
min-width: 0px;
overflow: hidden;
height: 100%;
margin-right: 5px;
border: 1px solid var(--color-frame);
border-radius: 30px;
}
.controlarea {
display: flex;
Expand All @@ -344,6 +347,9 @@ onMounted(() => {
height: 100%;
padding-left: 20px;
padding-right: 10px;
margin-left: 5px;
border: 1px solid var(--color-frame);
border-radius: 30px;
}
.sliderarea {
margin-bottom: 5px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
{{ title }}</span
>
<div
class="ms-1 mb-2 p-0 pt-2 d-flex justify-content-stretch align-items-center"
class="configwidget ms-1 mb-2 p-0 pt-2 d-flex justify-content-stretch align-items-center"
>
<span class="justify-content-stretch d-flex">
<span class="configslot justify-content-stretch d-flex">
<slot />
</span>
</div>
Expand All @@ -30,6 +30,12 @@ const props = defineProps<{
</script>

<style scoped>
.configwidget {
width: 100%;
}
.configslot {
width: 100%;
}
.infotext {
font-size: var(--font-settings);
color: var(--color-battery);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const v = computed({
return props.modelValue
},
set(value: number | string) {
console.log(props.options)
console.log('set value', value)
emit('update:modelValue', value)
},
})
Expand All @@ -41,13 +43,18 @@ function getColor(index: number) {
}
}
function setValue(event: Event) {
console.log(event)
let element = event.target as HTMLButtonElement
while (element && !element.value && element.parentElement) {
// we need to move up the DOM in case a sub element of the button was clicked
element = element.parentElement as HTMLButtonElement
}
if (element.value) {
v.value = element.value
if (typeof props.options[0][1] === 'number') {
v.value = Number(element.value)
} else {
v.value = element.value
}
}
}
</script>
Expand Down