WIP Сделала индикатор, таймер

This commit is contained in:
Daria Golova
2022-10-14 19:20:31 +03:00
parent 00ddeff84d
commit 2ccb622243
2 changed files with 42 additions and 10 deletions

View File

@@ -7,7 +7,7 @@
img.icon-wrapper.cursor-pointer(src="@/assets/icons/lock.svg")
base-doc-ok-button
.flex.flex-col
span.block.time-indicator(:style="indicatorLocation")
span.block.time-indicator(v-if="isShownIndicator" :style="indicatorLocation")
.line.flex.items-center(v-for="hour in hoursArray" :key="hour")
.middle-line
</template>
@@ -27,6 +27,11 @@ export default {
hoursArray: Array,
currentTime: String,
},
data() {
return {
isShownIndicator: true,
};
},
computed: {
indicatorLocation() {
return {
@@ -39,7 +44,12 @@ export default {
let newTime = this.currentTime
.split(":")
.map((elem) => parseInt(elem, 10));
return (newTime[0] - 7) * 60 + newTime[1];
let result = (newTime[0] - 7) * 60.5 + newTime[1];
if (result > 666) {
this.isShownIndicator = false;
return 0;
}
return result;
},
},
};