Skip to content

Commit

Permalink
Hide minsoc settings; will reappear later at vehicle (#4295)
Browse files Browse the repository at this point in the history
  • Loading branch information
naltatis authored Sep 3, 2022
1 parent 3897de9 commit c52e2be
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 33 deletions.
15 changes: 13 additions & 2 deletions assets/js/components/Loadpoint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,19 @@
<h3 class="me-2 mb-0 text-truncate">
{{ title || $t("main.loadpoint.fallbackName") }}
</h3>
<LoadpointSettingsButton :id="id" class="d-block d-sm-none" />
<LoadpointSettingsButton
v-if="settingsButtonVisible"
:id="id"
class="d-block d-sm-none"
/>
</div>
<div class="mb-3 d-flex align-items-center">
<Mode class="flex-grow-1" :mode="mode" @updated="setTargetMode" />
<LoadpointSettingsButton :id="id" class="d-none d-sm-block ms-2" />
<LoadpointSettingsButton
v-if="settingsButtonVisible"
:id="id"
class="d-none d-sm-block ms-2"
/>
</div>
</div>
<LoadpointSettingsModal
Expand Down Expand Up @@ -188,6 +196,9 @@ export default {
settingsModal: function () {
return this.collectProps(LoadpointSettingsModal);
},
settingsButtonVisible: function () {
return this.$hiddenFeatures || [0, 1, 3].includes(this.phasesConfigured);
},
vehicle: function () {
return this.collectProps(Vehicle);
},
Expand Down
14 changes: 12 additions & 2 deletions assets/js/components/LoadpointSettingsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@
</div>
<div class="modal-body">
<div class="container">
<h4 class="d-flex align-items-center mb-3 mt-0 text-evcc">
<h4
v-if="showMinSoCSettings"
class="d-flex align-items-center mb-3 mt-0 text-evcc"
>
{{ $t("main.loadpointSettings.vehicle") }}
<shopicon-bold-car3 class="ms-2"></shopicon-bold-car3>
</h4>
<div class="mb-3 row">
<div v-if="showMinSoCSettings" class="mb-3 row">
<label
:for="formId('minsoc')"
class="col-sm-4 col-form-label pt-0 pt-sm-1"
Expand Down Expand Up @@ -271,6 +274,9 @@ export default {
showCurrentSettings: function () {
return this.$hiddenFeatures;
},
showMinSoCSettings: function () {
return this.$hiddenFeatures;
},
},
watch: {
maxCurrent: function (value) {
Expand Down Expand Up @@ -323,4 +329,8 @@ export default {
margin-left: calc(var(--bs-gutter-x) * -0.5);
margin-right: calc(var(--bs-gutter-x) * -0.5);
}
.container h4:first-child {
margin-top: 0 !important;
}
</style>
7 changes: 0 additions & 7 deletions cmd/demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,6 @@ chargers:
var lp = state.loadpoints[0];
lp.maxcurrent = val;
if (lp.enabled) lp.chargepower = lp.maxcurrent * 230 * lp.phases; else lp.chargepower = 0;
phases1p3p:
source: js
vm: shared
script: |
set();
if (val === 1) lp.phases = 1; else lp.phases = 3;
lp.phases;
- name: charger_2
type: custom
Expand Down

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions dist/assets/index.ca617d2b.js → dist/assets/index.bf31c10e.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<meta name="theme-color" content="#020318" />

<title>evcc</title>
<script type="module" crossorigin src="./assets/index.ca617d2b.js"></script>
<link rel="stylesheet" href="./assets/index.b1f68136.css">
<script type="module" crossorigin src="./assets/index.bf31c10e.js"></script>
<link rel="stylesheet" href="./assets/index.9dca4fd5.css">
</head>
<body>
<script>
Expand Down

0 comments on commit c52e2be

Please sign in to comment.