Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 57 additions & 22 deletions src/components/shared/Calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,62 @@
<div>
<v-sheet :height="status === 'loading' ? 60 : 64">
<v-toolbar flat>
<v-btn
outlined
class="mr-4"
color="grey darken-2"
@click="jumpToCurrentDate"
>
Today
</v-btn>
<v-btn fab text small color="grey darken-2" @click="prev">
<v-icon small> mdi-chevron-left </v-icon>
</v-btn>
<v-btn fab text small color="grey darken-2" @click="next">
<v-icon small> mdi-chevron-right </v-icon>
<v-btn outlined color="grey darken-2" @click="jumpToCurrentDate">

Copilot AI Sep 19, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of the mr-4 class may affect the spacing between the Today button and navigation controls. Consider adding appropriate margin classes to maintain consistent spacing.

Suggested change
<v-btn outlined color="grey darken-2" @click="jumpToCurrentDate">
<v-btn outlined color="grey darken-2" class="mr-4" @click="jumpToCurrentDate">

Copilot uses AI. Check for mistakes.
<v-icon v-if="buttonSlim"> mdi-calendar-today-outline </v-icon>
<span v-else> Today </span>
</v-btn>
<div class="mx-2">
<v-btn fab text small color="grey darken-2" @click="prev">
<v-icon small> mdi-chevron-left </v-icon>
</v-btn>
<v-btn fab text small color="grey darken-2" @click="next">
<v-icon small> mdi-chevron-right </v-icon>
</v-btn>
</div>
<v-toolbar-title v-if="$refs.calendar">
{{ calendarTitle }}
</v-toolbar-title>
<v-spacer />
<v-menu bottom right>
<template #activator="{ on, attrs }">
<v-btn outlined color="grey darken-2" v-bind="attrs" v-on="on">
<span>{{ typeToLabel[type] }}</span>
<v-icon v-if="buttonSlim">{{ typeToLabel[type].icon }}</v-icon>
<span v-else>{{ typeToLabel[type].text }}</span>
<v-icon right> mdi-menu-down </v-icon>
Comment thread
YuHima03 marked this conversation as resolved.
</v-btn>
</template>
<v-list>
<v-list-item @click="type = 'day'">
<v-list-item-title>{{ typeToLabel['day'] }}</v-list-item-title>
<v-list-item-icon class="mr-4">
<v-icon>{{ typeToLabel['day'].icon }}</v-icon>
</v-list-item-icon>
<v-list-item-title>
{{ typeToLabel['day'].text }}
</v-list-item-title>
</v-list-item>
<v-list-item @click="type = '4day'">
<v-list-item-title>{{ typeToLabel['4day'] }}</v-list-item-title>
<v-list-item-icon class="mr-4">
<v-icon>{{ typeToLabel['4day'].icon }}</v-icon>
</v-list-item-icon>
<v-list-item-title>
{{ typeToLabel['4day'].text }}
</v-list-item-title>
</v-list-item>
<v-list-item @click="type = 'week'">
<v-list-item-title>{{ typeToLabel['week'] }}</v-list-item-title>
<v-list-item-icon class="mr-4">
<v-icon>{{ typeToLabel['week'].icon }}</v-icon>
</v-list-item-icon>
<v-list-item-title>
{{ typeToLabel['week'].text }}
</v-list-item-title>
</v-list-item>
<v-list-item @click="type = 'month'">
<v-list-item-title>{{ typeToLabel['month'] }}</v-list-item-title>
<v-list-item-icon class="mr-4">
<v-icon>{{ typeToLabel['month'].icon }}</v-icon>
</v-list-item-icon>
<v-list-item-title>
{{ typeToLabel['month'].text }}
</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
Expand Down Expand Up @@ -146,10 +165,22 @@ export default class Calendar extends Vue {
selectedOpen = false

typeToLabel = {
month: 'Month',
week: 'Week',
'4day': '4 Days',
day: 'Day',
month: {
text: 'Month',
icon: 'mdi-view-grid-outline',
},
week: {
text: 'Week',
icon: 'mdi-view-week-outline',
},
'4day': {
text: '4 Days',
icon: 'mdi-view-array-outline',
},
day: {
text: 'Day',
icon: 'mdi-view-day-outline',
},
}

calendarRefName = 'calendar'
Expand Down Expand Up @@ -230,6 +261,10 @@ export default class Calendar extends Vue {
value = new Date(value)
this.$emit('monthChanged', value)
}

get buttonSlim() {
return this.$vuetify.breakpoint.xs
}
}
</script>

Expand Down
Loading