Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: show more days in one row

Abdullah Atta9438c3ed46d1
diff --git a/apps/web/src/components/dialogs/add-reminder-dialog.tsx b/apps/web/src/components/dialogs/add-reminder-dialog.tsx
index 516d6bf73..0b13c7d65 100644
--- a/apps/web/src/components/dialogs/add-reminder-dialog.tsx
+++ b/apps/web/src/components/dialogs/add-reminder-dialog.tsx
@@ -56,15 +56,7 @@ const RecurringModes = {
DAY: "day"
} as const;
-const WEEK_DAYS = [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
-];
+const WEEK_DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
const modes = [
{
id: Modes.ONCE,
@@ -99,7 +91,7 @@ const recurringModes = [
{
id: RecurringModes.WEEK,
title: "Weekly",
- options: WEEK_DAYS
+ options: new Array(7).fill(0).map((_, i) => i)
},
{
id: RecurringModes.MONTH,
@@ -299,8 +291,8 @@ export default function AddReminderDialog(props: AddReminderDialogProps) {
display: "grid",
gridTemplateColumns:
mode.id === RecurringModes.WEEK
- ? "1fr 1fr 1fr"
- : "1fr 1fr 1fr 1fr 1fr",
+ ? "1fr 1fr 1fr 1fr 1fr 1fr 1fr"
+ : "1fr 1fr 1fr 1fr 1fr 1fr 1fr",
mt: mode.options.length > 0 ? 1 : 0,
maxHeight: 150,
overflowY: "auto",
@@ -331,7 +323,7 @@ export default function AddReminderDialog(props: AddReminderDialogProps) {
color: selectedDays.includes(i) ? "primary" : "text"
}}
>
- {day}
+ {mode.id === "week" ? WEEK_DAYS[i] : day}
</Button>
))}
</Box>