Add repeat after one-click intervals
This commit is contained in:
parent
2f45b63157
commit
01a1e29db0
1 changed files with 50 additions and 34 deletions
|
@ -1,5 +1,11 @@
|
|||
<template>
|
||||
<div class="control repeat-after-input columns">
|
||||
<div class="control repeat-after-input">
|
||||
<div class="buttons has-addons is-centered mt-2">
|
||||
<button class="button is-small" @click="() => setRepeatAfter(1, 'days')">Every Day</button>
|
||||
<button class="button is-small" @click="() => setRepeatAfter(1, 'weeks')">Every Week</button>
|
||||
<button class="button is-small" @click="() => setRepeatAfter(1, 'months')">Every Month</button>
|
||||
</div>
|
||||
<div class="columns is-align-items-center">
|
||||
<div class="is-flex column">
|
||||
<p class="pr-4">
|
||||
Each
|
||||
|
@ -36,6 +42,7 @@
|
|||
Repeat from current date
|
||||
</fancycheckbox>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -83,6 +90,11 @@ export default {
|
|||
this.$emit('input', this.task)
|
||||
this.$emit('change')
|
||||
},
|
||||
setRepeatAfter(amount, type) {
|
||||
this.repeatAfter.amount = amount
|
||||
this.repeatAfter.type = type
|
||||
this.updateData()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -92,7 +104,11 @@ p {
|
|||
padding-top: 6px;
|
||||
}
|
||||
|
||||
.columns {
|
||||
align-items: center;
|
||||
.input {
|
||||
min-width: 2rem;
|
||||
}
|
||||
|
||||
.fancycheckbox {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
Loading…
Reference in a new issue