Skip to content

Commit

Permalink
thought about it just now
Browse files Browse the repository at this point in the history
  • Loading branch information
NyaomiDEV committed Aug 5, 2024
1 parent 3dc3532 commit c07d340
Showing 1 changed file with 17 additions and 22 deletions.
39 changes: 17 additions & 22 deletions src/views/options/FrontHistory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,37 +78,32 @@
</IonTitle>
<IonButtons slot="secondary">
<IonButton @click="isCalendarView = !isCalendarView">
<IonIcon slot="icon-only" :ios="isCalendarView ? listIOS : calendarIOS" :md="isCalendarView ? listMD : calendarMD" />
<IonIcon slot="icon-only" :ios="isCalendarView ? listIOS : calendarIOS"
:md="isCalendarView ? listMD : calendarMD" />
</IonButton>
</IonButtons>
</IonToolbar>
<IonToolbar>
<IonSearchbar
:animated="true"
:placeholder="$t('options:frontHistory.searchPlaceholder')"
showCancelButton="focus"
showClearButton="focus"
:spellcheck="false"
v-model="search"
/>
<IonSearchbar :animated="true" :placeholder="$t('options:frontHistory.searchPlaceholder')"
showCancelButton="focus" showClearButton="focus" :spellcheck="false" v-model="search" />
</IonToolbar>
</IonHeader>

<IonContent>
<div class="container">
<IonDatetime presentation="date" :firstDayOfWeek="firstWeekOfDayIsSunday ? 0 : 1" @ionChange="(e) => date = e.detail.value as string" v-if="isCalendarView" />
<IonDatetime presentation="date" :firstDayOfWeek="firstWeekOfDayIsSunday ? 0 : 1"
@ionChange="(e) => date = e.detail.value as string" v-if="isCalendarView" />
</div>
</IonHeader>

<IonContent>
<IonList :inset="isIOS" v-if="isCalendarView">
<template v-for="tuple in getAtDate(date)">
<IonItemDivider sticky v-if="tuple[1].length">
<IonLabel>{{
tuple[0] === "currentlyFronting"
? $t("options:frontHistory.currentlyFronting")
: dayjs(tuple[0]).format("LL")
}}</IonLabel>
? $t("options:frontHistory.currentlyFronting")
: dayjs(tuple[0]).format("LL")
}}</IonLabel>
</IonItemDivider>
<IonItem button v-for="entry in tuple[1]" @click="showModal(entry)" >
<IonItem button v-for="entry in tuple[1]" @click="showModal(entry)">
<FrontingEntryAvatar slot="start" :entry />
<FrontingEntryLabel :entry />
</IonItem>
Expand All @@ -120,19 +115,19 @@
<IonItemDivider sticky>
<IonLabel>{{
tuple[0] === "currentlyFronting"
? $t("options:frontHistory.currentlyFronting")
: dayjs(tuple[0]).format("LL")
}}</IonLabel>
? $t("options:frontHistory.currentlyFronting")
: dayjs(tuple[0]).format("LL")
}}</IonLabel>
</IonItemDivider>
<IonItem button v-for="entry in tuple[1]" @click="showModal(entry)" >
<IonItem button v-for="entry in tuple[1]" @click="showModal(entry)">
<FrontingEntryAvatar slot="start" :entry />
<FrontingEntryLabel :entry />
</IonItem>
</template>
</IonList>
</IonContent>

<FrontingEntryEdit ref="frontingEntryModal"/>
<FrontingEntryEdit ref="frontingEntryModal" />
</IonPage>
</template>

Expand Down

0 comments on commit c07d340

Please sign in to comment.