feat: Edit relative reminders #3248

Merged
konrad merged 27 commits from ce72/frontend:main into main 2023-06-10 17:04:10 +00:00
2 changed files with 17 additions and 13 deletions
Showing only changes of commit 8930f61548 - Show all commits

View File

@ -61,11 +61,12 @@
</span>
</BaseButton>
<flat-pickr
:config="flatPickerConfig"
class="input"
v-model="flatPickrDate"
/>
<div class="flatpickr-container">
<flat-pickr
:config="flatPickerConfig"
v-model="flatPickrDate"
/>
</div>
</template>
<script lang="ts" setup>
@ -214,8 +215,14 @@ function getWeekdayFromStringInterval(dateString: string) {
}
}
:deep(.flatpickr-calendar) {
margin: 0 auto 8px;
box-shadow: none;
.flatpickr-container {
:deep(.flatpickr-calendar) {
margin: 0 auto 8px;
box-shadow: none;
}
:deep(.input) {
border: none;
}
}
</style>

View File

@ -166,6 +166,8 @@ function updateDataAndMaybeClose(toggle) {
function formatReminder(reminder: TaskReminderModel) {
const period = secondsToPeriod(reminder.relativePeriod)
// TODO: 0 does not work
if (period.amount === 0) {
switch (reminder.relativeTo) {
@ -267,9 +269,4 @@ function translateUnit(amount: number, unit: PeriodUnit): string {
.currently-active {
color: var(--primary);
}
:deep(.flatpickr-calendar) {
margin: 0 auto;
box-shadow: none;
}
</style>