Sessions UI: visualization, month/year charts (#15902)
This commit is contained in:
parent
1bd521fc24
commit
cfa35f295b
38 changed files with 3271 additions and 715 deletions
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<div class="mode-group border d-inline-flex" role="group">
|
||||
<div class="mode-group border d-inline-flex" :class="{ large }" role="group">
|
||||
<button
|
||||
v-for="(option, i) in options"
|
||||
:id="i === 0 ? id : null"
|
||||
:key="option.value"
|
||||
type="button"
|
||||
class="btn btn-sm flex-grow-1 flex-shrink-1"
|
||||
:class="{ active: option.value === modelValue }"
|
||||
:class="{ active: option.value === modelValue, 'btn--equal': equalWidth }"
|
||||
:disabled="option.disabled"
|
||||
@click="$emit('update:modelValue', option.value)"
|
||||
>
|
||||
|
|
@ -22,6 +22,8 @@ export default {
|
|||
id: String,
|
||||
options: Array,
|
||||
modelValue: [Number, String],
|
||||
equalWidth: Boolean,
|
||||
large: Boolean,
|
||||
},
|
||||
emits: ["update:modelValue"],
|
||||
};
|
||||
|
|
@ -32,11 +34,10 @@ export default {
|
|||
border: 2px solid var(--evcc-default-text);
|
||||
border-radius: 17px;
|
||||
padding: 4px;
|
||||
background: var(--evcc-background);
|
||||
}
|
||||
|
||||
.btn {
|
||||
/* equal width buttons */
|
||||
flex-basis: 0;
|
||||
white-space: nowrap;
|
||||
border-radius: 12px;
|
||||
padding: 0.1em 0.8em;
|
||||
|
|
@ -45,6 +46,9 @@ export default {
|
|||
overflow-x: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.btn--equal {
|
||||
flex-basis: 0;
|
||||
}
|
||||
.btn:hover {
|
||||
color: var(--evcc-gray);
|
||||
}
|
||||
|
|
@ -52,7 +56,11 @@ export default {
|
|||
color: var(--evcc-background);
|
||||
background: var(--evcc-default-text);
|
||||
}
|
||||
.btn-group {
|
||||
.modal-group.large {
|
||||
height: 32px;
|
||||
}
|
||||
.large .btn {
|
||||
height: 32px;
|
||||
border-radius: 16px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue