diff --git a/apps/mobile/app/components/list-items/headers/section-header.tsx b/apps/mobile/app/components/list-items/headers/section-header.tsx
index c2191e603..c544a15b4 100644
--- a/apps/mobile/app/components/list-items/headers/section-header.tsx
+++ b/apps/mobile/app/components/list-items/headers/section-header.tsx
@@ -101,7 +101,7 @@ export const SectionHeader = React.memo<
alignSelf: "center",
textAlignVertical: "center"
}}
- color={colors.secondary.paragraph}
+ color={colors.primary.accent}
>
{!item.title || item.title === ""
? screen === "Search"
diff --git a/apps/mobile/app/components/list-items/reminder/index.tsx b/apps/mobile/app/components/list-items/reminder/index.tsx
index 5773b86c9..3bf1ef69a 100644
--- a/apps/mobile/app/components/list-items/reminder/index.tsx
+++ b/apps/mobile/app/components/list-items/reminder/index.tsx
@@ -16,28 +16,28 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
+import { getFormattedReminderTime } from "@notesnook/common";
import { Reminder } from "@notesnook/core";
import { strings } from "@notesnook/intl";
import { useThemeColors } from "@notesnook/theme";
-import React from "react";
+import React, { useState } from "react";
import { View } from "react-native";
-import Icon from "react-native-vector-icons/MaterialCommunityIcons";
import { notesnook } from "../../../../e2e/test.ids";
+import { Radius, Spacing } from "../../../common/design/spacing";
import useIsSelected from "../../../hooks/use-selected";
import AddReminder from "../../../screens/add-reminder";
import { eSendEvent } from "../../../services/event-manager";
-import { useSelectionStore } from "../../../stores/use-selection-store";
+import {
+ selectItem,
+ useSelectionStore
+} from "../../../stores/use-selection-store";
import { eCloseSheet } from "../../../utils/events";
-import { AppFontSize, defaultBorderRadius } from "../../../utils/size";
-import { DefaultAppStyles } from "../../../utils/styles";
import { Properties } from "../../properties";
import AppIcon from "../../ui/AppIcon";
import { IconButton } from "../../ui/icon-button";
-import { ReminderTime } from "../../ui/reminder-time";
import Heading from "../../ui/typography/heading";
import Paragraph from "../../ui/typography/paragraph";
import SelectionWrapper from "../selection-wrapper";
-import { selectItem } from "../../../stores/use-selection-store";
const ReminderItem = React.memo(
({
@@ -50,6 +50,7 @@ const ReminderItem = React.memo(
isSheet: boolean;
}) => {
const { colors } = useThemeColors();
+ const [checked, setChecked] = useState(false);
const openReminder = () => {
if (selectItem(item)) return;
AddReminder.present(item, undefined);
@@ -59,148 +60,129 @@ const ReminderItem = React.memo(
};
const selectionMode = useSelectionStore((state) => state.selectionMode);
const [selected] = useIsSelected(item);
+
+ // Subtitle segments (reminder time · recurring mode · disabled), rendered as
+ // plain text separated by a dot to match the redesign.
+ const subtitleSegments = [
+ getFormattedReminderTime(item, false),
+ item.mode === "repeat" && item.recurringMode
+ ? strings.reminderRecurringMode[item.recurringMode]()
+ : undefined,
+ item.disabled ? strings.disabled() : undefined
+ ].filter(Boolean) as string[];
+
return (
-
+ {
+ if (selectItem(item)) return;
+
+ setChecked(!checked);
+ }}
+ item={item}
+ isSheet={isSheet}
+ hideSeparator
+ style={{
+ borderWidth: 1,
+ borderColor: colors.primary.border,
+ borderRadius: Radius.S,
+ marginBottom: Spacing.LEVEL_2,
+ backgroundColor: selected ? colors.primary.shade : undefined
+ }}
+ wrapperStyle={{
+ paddingHorizontal: Spacing.LEVEL_3
+ }}
+ >
+ {/* Leading "done" checkbox — visual only for now, not yet wired. */}
+
+
-
- {item.title}
-
+
+ {item.title}
+
+
+ Properties.present(item, isSheet)}
+ style={{
+ justifyContent: "center",
+ height: undefined,
+ width: undefined,
+ borderRadius: 100,
+ alignItems: "center"
+ }}
+ />
+
{item.description ? (
-
- {item.description}
-
+ {item.description}
) : null}
- {item.disabled ? (
-
-
+ {subtitleSegments.map((segment, i) => (
+
+ {i > 0 ? (
+
+ ) : null}
- {strings.disabled()}
+ {segment}
-
- ) : null}
- {item.mode === "repeat" && item.recurringMode ? (
-
-
-
- {strings.reminderRecurringMode[item.recurringMode]()}
-
-
- ) : null}
-
-
+
+ ))}
-
- {selectionMode === "note" || selectionMode === "trash" ? (
- <>
-
-
-
- >
- ) : (
- Properties.present(item, isSheet)}
- style={{
- justifyContent: "center",
- height: 35,
- width: 35,
- borderRadius: 100,
- alignItems: "center"
- }}
- />
- )}
);
},
diff --git a/apps/mobile/app/components/list-items/selection-wrapper/index.tsx b/apps/mobile/app/components/list-items/selection-wrapper/index.tsx
index 9f9f3800d..d3dc04aa4 100644
--- a/apps/mobile/app/components/list-items/selection-wrapper/index.tsx
+++ b/apps/mobile/app/components/list-items/selection-wrapper/index.tsx
@@ -24,7 +24,7 @@ import { useIsCompactModeEnabled } from "../../../hooks/use-is-compact-mode-enab
import { useTabStore } from "../../../screens/editor/tiptap/use-tab-store";
import { useSelectionStore } from "../../../stores/use-selection-store";
import { Pressable } from "../../ui/pressable";
-import { View } from "react-native";
+import { View, ViewStyle } from "react-native";
import { Spacing } from "../../../common/design/spacing";
type SelectionWrapperProps = PropsWithChildren<{
@@ -35,6 +35,9 @@ type SelectionWrapperProps = PropsWithChildren<{
color?: string;
index?: number;
hasGroupHeader?: boolean;
+ style?: ViewStyle;
+ wrapperStyle?: ViewStyle;
+ hideSeparator?: boolean;
}>;
const SelectionWrapper = ({
@@ -45,7 +48,10 @@ const SelectionWrapper = ({
children,
color,
hasGroupHeader,
- index = 0
+ index = 0,
+ style,
+ wrapperStyle,
+ hideSeparator
}: SelectionWrapperProps) => {
const itemId = useRef(item.id);
const { colors, isDark } = useThemeColors();
@@ -72,7 +78,7 @@ const SelectionWrapper = ({
return (
<>
- {hasGroupHeader ? null : (
+ {hasGroupHeader || hideSeparator ? null : (
{
close();
await db.reminders.add({
@@ -524,7 +522,7 @@ export const useActions = ({
{
id: "edit-reminder",
title: strings.editReminder(),
- icon: "pencil",
+ icon: "pencil-simple",
onPress: async () => {
AddReminder.present(item);
close();
diff --git a/apps/mobile/app/screens/add-reminder/index.tsx b/apps/mobile/app/screens/add-reminder/index.tsx
index 4ab3c81f5..3ef71452e 100644
--- a/apps/mobile/app/screens/add-reminder/index.tsx
+++ b/apps/mobile/app/screens/add-reminder/index.tsx
@@ -17,9 +17,13 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
import { Note, Reminder } from "@notesnook/core";
+import {
+ getFormattedDate,
+ useIsFeatureAvailable,
+ usePromise
+} from "@notesnook/common";
import { strings } from "@notesnook/intl";
import { useThemeColors } from "@notesnook/theme";
-import dayjs from "dayjs";
import React, { useRef, useState } from "react";
import {
KeyboardAvoidingView,
@@ -28,60 +32,39 @@ import {
TextInput,
View
} from "react-native";
-import DatePicker from "react-native-date-picker";
import DateTimePickerModal from "react-native-modal-datetime-picker";
import { SafeAreaView } from "react-native-safe-area-context";
+import { Spacing, Radius } from "../../common/design/spacing";
import { db } from "../../common/database";
import { Dialog } from "../../components/dialog";
import { Header } from "../../components/header";
+import AppIcon from "../../components/ui/AppIcon";
import { Button } from "../../components/ui/button";
-import { ReminderTime } from "../../components/ui/reminder-time";
-import Paragraph from "../../components/ui/typography/paragraph";
-import { DDS } from "../../services/device-detection";
-import { eSendEvent, ToastManager } from "../../services/event-manager";
-import Navigation, { NavigationProps } from "../../services/navigation";
-import Notifications from "../../services/notifications";
-import SettingsService from "../../services/settings";
-import { useRelationStore } from "../../stores/use-relation-store";
-import { useSettingStore } from "../../stores/use-setting-store";
-import { AppFontSize, defaultBorderRadius } from "../../utils/size";
-import { DefaultAppStyles } from "../../utils/styles";
-import {
- getFormattedDate,
- useIsFeatureAvailable,
- usePromise
-} from "@notesnook/common";
-import PaywallSheet from "../../components/sheets/paywall";
-import { useNavigationFocus } from "../../hooks/use-navigation-focus";
-import { Pressable } from "../../components/ui/pressable";
-import { TimeSince } from "../../components/ui/time-since";
-import Heading from "../../components/ui/typography/heading";
-import { eOnLoadNote } from "../../utils/events";
-import { fluidTabsRef } from "../../utils/global-refs";
import FormInput, {
createFormRef,
validators
} from "../../components/ui/input/form-input";
-import AppIcon from "../../components/ui/AppIcon";
+import { Pressable } from "../../components/ui/pressable";
+import LineSeparator from "../../components/ui/seperator/line-separator";
+import { TimeSince } from "../../components/ui/time-since";
+import Heading from "../../components/ui/typography/heading";
+import Paragraph from "../../components/ui/typography/paragraph";
+import { useNavigationFocus } from "../../hooks/use-navigation-focus";
+import { eSendEvent, ToastManager } from "../../services/event-manager";
+import Navigation, { NavigationProps } from "../../services/navigation";
+import Notifications from "../../services/notifications";
+import SettingsService from "../../services/settings";
+import PaywallSheet from "../../components/sheets/paywall";
+import { useRelationStore } from "../../stores/use-relation-store";
+import { useSettingStore } from "../../stores/use-setting-store";
+import { eOnLoadNote } from "../../utils/events";
+import { fluidTabsRef } from "../../utils/global-refs";
+import { AppFontSize } from "../../utils/size";
-const ReminderModes =
- Platform.OS === "ios"
- ? {
- Once: "once",
- Repeat: "repeat"
- }
- : {
- Once: "once",
- Repeat: "repeat",
- Permanent: "permanent"
- };
-
-const RecurringModes = {
- Daily: "day",
- Week: "week",
- Month: "month",
- Year: "year"
-};
+// Frequency chips shown in the "Reminder frequency" section. "once" maps to
+// reminderMode = "once", the rest map to reminderMode = "repeat" + recurringMode.
+const FrequencyModes = ["once", "day", "week", "month", "year"] as const;
+type FrequencyMode = (typeof FrequencyModes)[number];
const WeekDays = [0, 1, 2, 3, 4, 5, 6];
const WeekDaysMon = [1, 2, 3, 4, 5, 6, 0];
@@ -91,7 +74,7 @@ const ReminderNotificationModes = {
Silent: "silent",
Vibrate: "vibrate",
Urgent: "urgent"
-};
+} as const;
export default function AddReminder(props: NavigationProps<"AddReminder">) {
const { reminder, reference } = props.route.params;
@@ -109,8 +92,9 @@ export default function AddReminder(props: NavigationProps<"AddReminder">) {
const { colors, isDark } = useThemeColors();
const weekFormat = useSettingStore((state) => state.weekFormat);
const [reminderMode, setReminderMode] = useState(
- reminder?.mode || "once"
+ reminder?.mode === "permanent" ? "once" : reminder?.mode || "once"
);
+ const [allDay, setAllDay] = useState(reminder?.mode === "permanent");
const [recurringMode, setRecurringMode] = useState(
reminder?.recurringMode || "week"
);
@@ -124,7 +108,11 @@ export default function AddReminder(props: NavigationProps<"AddReminder">) {
Reminder["priority"]
>(reminder?.priority || SettingsService.get().reminderNotificationMode);
const [isDatePickerVisible, setDatePickerVisibility] = useState(false);
- const [repeatFrequency, setRepeatFrequency] = useState(1);
+ const [pickerMode, setPickerMode] = useState<"date" | "time">("date");
+ const [dateSelected, setDateSelected] = useState(!!reminder);
+ const [timeSelected, setTimeSelected] = useState(!!reminder);
+ const [frequencyExpanded, setFrequencyExpanded] = useState(true);
+ const [moreOptionsExpanded, setMoreOptionsExpanded] = useState(false);
const referencedItem = reference ? (reference as Note) : null;
const recurringReminderFeature = useIsFeatureAvailable("recurringReminders");
const formRef = useRef(
@@ -141,7 +129,6 @@ export default function AddReminder(props: NavigationProps<"AddReminder">) {
);
const titleRef = useRef(null);
const descriptionRef = useRef(null);
- const timer = useRef(undefined);
const referencedNotes = usePromise(
() =>
reminder?.id
@@ -154,54 +141,90 @@ export default function AddReminder(props: NavigationProps<"AddReminder">) {
const [dateError, setDateError] = useState();
const [selectDayError, setSelectDayError] = useState();
- const showDatePicker = () => {
+ // The frequency chip currently reflected by reminderMode + recurringMode.
+ const currentFrequency: FrequencyMode =
+ reminderMode === "once" ? "once" : recurringMode || "week";
+ // Once and yearly reminders pick a specific date; daily/weekly/monthly only a time.
+ const showDatePicker = reminderMode === "once" || recurringMode === "year";
+ const showDaySelector =
+ reminderMode === "repeat" &&
+ (recurringMode === "week" || recurringMode === "month");
+
+ const openPicker = (mode: "date" | "time") => {
+ setPickerMode(mode);
setDatePickerVisibility(true);
};
- const hideDatePicker = () => {
+ const hidePicker = () => {
setDatePickerVisibility(false);
};
- const handleConfirm = (date: Date) => {
- timer.current = setTimeout(() => {
- setDateError(undefined);
- hideDatePicker();
- setDate(date);
- }, 10);
+ const handleConfirm = (selected: Date) => {
+ hidePicker();
+ setDateError(undefined);
+ const next = new Date(date);
+ if (pickerMode === "time") {
+ next.setHours(selected.getHours(), selected.getMinutes(), 0, 0);
+ setTimeSelected(true);
+ } else {
+ next.setFullYear(
+ selected.getFullYear(),
+ selected.getMonth(),
+ selected.getDate()
+ );
+ setDateSelected(true);
+ }
+ setDate(next);
};
- function nth(n: number) {
- return (
- ["st", "nd", "rd"][(((((n < 0 ? -n : n) + 90) % 100) - 10) % 10) - 1] ||
- "th"
- );
- }
- function getSelectedDaysText(selectedDays: number[]) {
- const text = selectedDays
- .sort((a, b) => a - b)
- .map((day, index) => {
- const isLast = index === selectedDays.length - 1;
- const isSecondLast = index === selectedDays.length - 2;
- const joinWith = isSecondLast ? " & " : isLast ? "" : ", ";
- return recurringMode === RecurringModes.Week
- ? strings.weekDayNames[day as keyof typeof strings.weekDayNames]() +
- joinWith
- : `${day}${nth(day)} ${joinWith}`;
- })
- .join("");
- return text;
- }
+ const selectFrequency = (mode: FrequencyMode) => {
+ if (
+ mode !== "once" &&
+ recurringReminderFeature &&
+ !recurringReminderFeature?.isAllowed
+ ) {
+ PaywallSheet.present(recurringReminderFeature);
+ return;
+ }
+ setSelectDayError(undefined);
+ if (mode === "once") {
+ setReminderMode("once");
+ return;
+ }
+ setReminderMode("repeat");
+ setRecurringMode(mode as Reminder["recurringMode"]);
+ if (mode === "week") {
+ setSelectedDays((days) => (days.length ? days : [date.getDay()]));
+ } else if (mode === "month") {
+ setSelectedDays((days) => (days.length ? days : [date.getDate()]));
+ } else {
+ setSelectedDays([]);
+ }
+ };
+
+ const toggleDay = (day: number) => {
+ setSelectDayError(undefined);
+ setSelectedDays((days) => {
+ if (days.indexOf(day) > -1) {
+ return days.filter((d) => d !== day);
+ }
+ return [...days, day];
+ });
+ };
async function saveReminder() {
try {
if (!formRef.current.validate()) return;
- if (date.getTime() < Date.now() && reminderMode === "once") {
+
+ const mode: Reminder["mode"] = allDay ? "permanent" : reminderMode;
+
+ if (date.getTime() < Date.now() && mode === "once") {
setDateError(strings.dateError());
return;
}
if (
- reminderMode === ReminderModes.Repeat &&
+ mode === "repeat" &&
recurringMode !== "day" &&
recurringMode !== "year" &&
selectedDays.length === 0
@@ -210,7 +233,7 @@ export default function AddReminder(props: NavigationProps<"AddReminder">) {
return;
}
- if (!date && reminderMode !== ReminderModes.Permanent) return;
+ if (!date && mode !== "permanent") return;
if (!(await Notifications.checkAndRequestPermissions(true)))
throw new Error(strings.noNotificationPermission());
@@ -225,8 +248,8 @@ export default function AddReminder(props: NavigationProps<"AddReminder">) {
description: details.current,
recurringMode: recurringMode,
selectedDays: selectedDays,
- mode: reminderMode,
- localOnly: reminderMode === "permanent",
+ mode: mode,
+ localOnly: mode === "permanent",
snoozeUntil:
date?.getTime() > Date.now() ? undefined : reminder?.snoozeUntil,
disabled: false
@@ -267,449 +290,467 @@ export default function AddReminder(props: NavigationProps<"AddReminder">) {
+
+
- (title.current = text)}
- wrapperStyle={{
- marginTop: DefaultAppStyles.GAP_VERTICAL
- }}
- onSubmitEditing={() => {
- descriptionRef.current?.focus();
- }}
- />
-
- (details.current = text)}
- containerStyle={{
- maxHeight: 80
- }}
- multiline
- textAlignVertical="top"
- inputStyle={{
- minHeight: 80,
- paddingVertical: DefaultAppStyles.GAP_VERTICAL
- }}
- height={80}
- />
-
-
- {Object.keys(ReminderModes).map((mode) => (
-
-
- {reminderMode === ReminderModes.Repeat ? (
-
+ (title.current = text)}
+ onSubmitEditing={() => {
+ descriptionRef.current?.focus();
}}
- >
-
- {Object.keys(RecurringModes).map((mode) => (
-
+ />
-
- {recurringMode === RecurringModes.Daily ||
- recurringMode === RecurringModes.Year
- ? null
- : recurringMode === RecurringModes.Week
- ? (weekFormat === "Mon" ? WeekDaysMon : WeekDays).map(
- (item) => (
-
- {selectDayError ? (
-
- {" "}
- {selectDayError}
-
- ) : null}
-
- ) : null}
+
+
- {reminderMode === ReminderModes.Permanent ? null : (
-
+
+ {strings.reminderFrequency()}
+
+
+ setFrequencyExpanded((v) => !v)}
style={{
width: "100%",
- flexDirection: "column",
- justifyContent: "center",
- alignItems: "center"
- }}
- >
-
-
-
-
- {reminderMode === ReminderModes.Repeat ? null : (
- {
- showDatePicker();
- }}
- />
- )}
-
- {dateError ? (
-
- {" "}
- {dateError}
-
- ) : null}
-
- )}
-
- {reminderMode === ReminderModes.Once ||
- reminderMode === ReminderModes.Permanent ? null : (
-
- <>
+
+
+ {`${strings.reminderModes("repeat")}: ${
+ currentFrequency === "once"
+ ? strings.reminderModes("once")
+ : strings.recurringModes(currentFrequency)
+ }`}
+
- {recurringMode === RecurringModes.Daily
- ? strings.reminderRepeatStrings.day(
- dayjs(date).format("hh:mm A")
- )
- : recurringMode === RecurringModes.Year
- ? strings.reminderRepeatStrings.year(
- dayjs(date).format("dddd, MMMM D, h:mm A")
- )
- : selectedDays.length === 7 &&
- recurringMode === RecurringModes.Week
- ? strings.reminderRepeatStrings.week.daily(
- dayjs(date).format("hh:mm A")
- )
- : selectedDays.length === 0
- ? strings.reminderRepeatStrings[
- recurringMode as "week" | "month"
- ].selectDays()
- : strings.reminderRepeatStrings.repeats(
- repeatFrequency,
- recurringMode as string,
- getSelectedDaysText(selectedDays),
- dayjs(date).format("hh:mm A")
- )}
+ {strings.reminderFrequencyDescription(currentFrequency)}
- >
-
- )}
+
+
+
- {reminderMode === ReminderModes.Permanent ? null : (
-
- {Object.keys(ReminderNotificationModes).map((mode) => (
-
+ {
- const _mode = ReminderNotificationModes[
- mode as keyof typeof ReminderNotificationModes
- ] as Reminder["priority"];
- SettingsService.set({
- reminderNotificationMode: _mode
- });
- setReminderNotificatioMode(_mode);
- }}
- />
- ))}
-
- )}
+ >
+ {FrequencyModes.map((mode) => {
+ const selected = currentFrequency === mode;
+ return (
+ selectFrequency(mode)}
+ style={{
+ width: "auto",
+ alignSelf: "flex-start",
+ paddingHorizontal: Spacing.LEVEL_3,
+ paddingVertical: Spacing.LEVEL_1,
+ borderRadius: Radius.XS,
+ borderWidth: selected ? 0 : 1,
+ borderColor: colors.primary.border
+ }}
+ >
+
+ {mode === "once"
+ ? strings.reminderModes("once")
+ : strings.recurringModes(mode)}
+
+
+ );
+ })}
+
-
+
+ {recurringMode === "month"
+ ? strings.selectDate()
+ : strings.reminderSelectDays()}
+
+
+
+ {recurringMode === "week"
+ ? (weekFormat === "Mon" ? WeekDaysMon : WeekDays).map(
+ (day) => {
+ const selected = selectedDays.indexOf(day) > -1;
+ return (
+ toggleDay(day)}
+ style={{
+ width: 35,
+ height: 32,
+ justifyContent: "center",
+ alignItems: "center",
+ borderRadius: Radius.XS,
+ borderWidth: selected ? 0 : 1,
+ borderColor: colors.primary.border
+ }}
+ >
+
+ {strings.weekDayNamesShort[
+ day as keyof typeof strings.weekDayNamesShort
+ ]().charAt(0)}
+
+
+ );
+ }
+ )
+ : MonthDays.map((_, index) => {
+ const day = index + 1;
+ const selected = selectedDays.indexOf(day) > -1;
+ return (
+ toggleDay(day)}
+ style={{
+ width: 35,
+ height: 32,
+ borderRadius: Radius.XS,
+ justifyContent: "center",
+ alignItems: "center",
+ borderWidth: selected ? 0 : 1,
+ borderColor: colors.primary.border
+ }}
+ >
+
+ {day}
+
+
+ );
+ })}
+
+
+ {selectDayError ? (
+
+ {" "}
+ {selectDayError}
+
+ ) : (
+
+ {recurringMode === "month"
+ ? strings.reminderSelecetDateHelp()
+ : strings.reminderSelectedDayHelp()}
+
+ )}
+
+ ) : null}
+ >
+ ) : null}
+
+
+ {/* Date & time */}
+
+
+ {showDatePicker
+ ? strings.selectDateAndTime()
+ : strings.selectTimeHeading()}
+
+
+ {showDatePicker ? (
+ openPicker("date")}
+ />
+ ) : null}
+ openPicker("time")}
+ />
+
+ {dateError ? (
+
+ {" "}
+ {dateError}
+
+ ) : null}
+
+
+
+ {/* More options */}
+
+ setMoreOptionsExpanded((v) => !v)}
+ style={{
+ width: "100%",
+ flexDirection: "row",
+ alignItems: "center",
+ justifyContent: "space-between",
+ padding: Spacing.LEVEL_2,
+ borderRadius: Radius.S,
+ borderWidth: moreOptionsExpanded ? 0 : 1,
+ borderColor: colors.primary.border
+ }}
+ >
+
+ {strings.moreOptions()}
+
+
+
+
+ {moreOptionsExpanded ? (
+ <>
+ {Platform.OS !== "ios" ? (
+ setAllDay((v) => !v)}
+ style={{
+ width: "100%",
+ flexDirection: "row",
+ alignItems: "center",
+ gap: Spacing.LEVEL_1,
+ padding: Spacing.LEVEL_2,
+ borderRadius: Radius.S
+ }}
+ >
+
+
+ {strings.allDayReminder()}
+
+
+ {strings.allDayReminderDescription()}
+
+
+
+
+ ) : null}
+
+
+
+ {strings.alertMode()}
+
+
+ {Object.keys(ReminderNotificationModes).map((key) => {
+ const value =
+ ReminderNotificationModes[
+ key as keyof typeof ReminderNotificationModes
+ ];
+ const selected = reminderNotificationMode === value;
+ return (
+ {
+ SettingsService.set({
+ reminderNotificationMode: value
+ });
+ setReminderNotificatioMode(value);
+ }}
+ />
+ );
+ })}
+
+
+ >
+ ) : null}
+
+
+ {/* Referenced notes */}
{referencedNotes &&
referencedNotes.status === "fulfilled" &&
referencedNotes.value !== null &&
referencedNotes.value?.length > 0 ? (
- {strings.referencedIn()}
+
+ {strings.referencedIn()}
+
{referencedNotes.value.map((item) => (
{
Navigation.navigate("FluidPanelsView");
@@ -724,8 +765,7 @@ export default function AddReminder(props: NavigationProps<"AddReminder">) {
) {
) : null}
+
+ {/* Bottom sticky action */}
+
+
+
);
}
+type DateTimeFieldProps = {
+ value: string;
+ placeholder: boolean;
+ icon: string;
+ onPress: () => void;
+};
+
+function DateTimeField({
+ value,
+ placeholder,
+ icon,
+ onPress
+}: DateTimeFieldProps) {
+ const { colors } = useThemeColors();
+ return (
+
+
+ {value}
+
+
+
+ );
+}
+
AddReminder.present = (reminder?: Reminder, reference?: Note) => {
Navigation.navigate("AddReminder", {
reminder,
diff --git a/apps/mobile/fonts/MaterialCommunityIcons.ttf b/apps/mobile/fonts/MaterialCommunityIcons.ttf
index 447fe45e8..3b6bdcfc3 100644
Binary files a/apps/mobile/fonts/MaterialCommunityIcons.ttf and b/apps/mobile/fonts/MaterialCommunityIcons.ttf differ
diff --git a/packages/intl/locale/en.po b/packages/intl/locale/en.po
index 369b17643..4a5b4d656 100644
--- a/packages/intl/locale/en.po
+++ b/packages/intl/locale/en.po
@@ -538,6 +538,10 @@ msgstr "{mode, select, create {Create app lock {keyboardType}} change {Change ap
msgid "{mode, select, day {Daily} week {Weekly} month {Monthly} year {Yearly} other {Unknown mode}}"
msgstr "{mode, select, day {Daily} week {Weekly} month {Monthly} year {Yearly} other {Unknown mode}}"
+#: src/strings.ts:2991
+msgid "{mode, select, once {The reminder will occur once.} day {The reminder will occur daily.} week {Custom schedule active} month {Custom schedule active} year {The reminder will repeat every year.} other {}}"
+msgstr "{mode, select, once {The reminder will occur once.} day {The reminder will occur daily.} week {Custom schedule active} month {Custom schedule active} year {The reminder will repeat every year.} other {}}"
+
#: src/strings.ts:622
msgid "{mode, select, repeat {Repeat} once {Once} permanent {Permanent} other {Unknown mode}}"
msgstr "{mode, select, repeat {Repeat} once {Once} permanent {Permanent} other {Unknown mode}}"
@@ -766,6 +770,10 @@ msgstr "Add shortcut"
msgid "Add shortcuts for notebooks and tags here."
msgstr "Add shortcuts for notebooks and tags here."
+#: src/strings.ts:3013
+msgid "Add some details..."
+msgstr "Add some details..."
+
#: src/strings.ts:596
msgid "Add tag"
msgstr "Add tag"
@@ -803,6 +811,10 @@ msgstr "Add your first notebook"
msgid "Adjust the line height of the editor"
msgstr "Adjust the line height of the editor"
+#: src/strings.ts:3002
+msgid "Adjusts to last day in shorter months"
+msgstr "Adjusts to last day in shorter months"
+
#: src/strings.ts:2232
msgid "Advanced"
msgstr "Advanced"
@@ -819,6 +831,10 @@ msgstr "Advanced settings"
msgid "After scanning the QR code image, the app will display a code that you can enter below."
msgstr "After scanning the QR code image, the app will display a code that you can enter below."
+#: src/strings.ts:3010
+msgid "Alert mode"
+msgstr "Alert mode"
+
#: src/strings.ts:2371
msgid "Align left"
msgstr "Align left"
@@ -895,6 +911,10 @@ msgstr "All tools in this group will be removed from the toolbar."
msgid "All your backups are stored in 'Phone Storage/Notesnook/backups/' folder"
msgstr "All your backups are stored in 'Phone Storage/Notesnook/backups/' folder"
+#: src/strings.ts:3008
+msgid "All-day reminder"
+msgstr "All-day reminder"
+
#: src/strings.ts:108
msgid "Already have an account?"
msgstr "Already have an account?"
@@ -2150,6 +2170,10 @@ msgstr "Create new key"
msgid "Create notebook"
msgstr "Create notebook"
+#: src/strings.ts:3014
+msgid "Create Reminder"
+msgstr "Create Reminder"
+
#: src/strings.ts:1519
msgid "Create shortcut of this notebook in side menu"
msgstr "Create shortcut of this notebook in side menu"
@@ -4549,6 +4573,10 @@ msgstr "Monthly"
msgid "More"
msgstr "More"
+#: src/strings.ts:3007
+msgid "More options"
+msgstr "More options"
+
#: src/strings.ts:669
msgid "Most relevant first"
msgstr "Most relevant first"
@@ -5950,6 +5978,10 @@ msgstr "Reload app"
msgid "Relogin to your Account"
msgstr "Relogin to your Account"
+#: src/strings.ts:3009
+msgid "Remains active throughout the day."
+msgstr "Remains active throughout the day."
+
#: src/strings.ts:1847
msgid "Remembered your password?"
msgstr "Remembered your password?"
@@ -5979,6 +6011,10 @@ msgstr "reminder"
msgid "Reminder"
msgstr "Reminder"
+#: src/strings.ts:2989
+msgid "Reminder frequency"
+msgstr "Reminder frequency"
+
#: src/strings.ts:1292
msgid "Reminder notifications"
msgstr "Reminder notifications"
@@ -6547,10 +6583,22 @@ msgstr "Select backups folder"
msgid "Select date"
msgstr "Select date"
+#: src/strings.ts:3003
+msgid "Select date & time"
+msgstr "Select date & time"
+
+#: src/strings.ts:3005
+msgid "Select Dates"
+msgstr "Select Dates"
+
#: src/strings.ts:351
msgid "Select day of the week to repeat the reminder."
msgstr "Select day of the week to repeat the reminder."
+#: src/strings.ts:2999
+msgid "Select Days"
+msgstr "Select Days"
+
#: src/strings.ts:1814
msgid "Select files to import"
msgstr "Select files to import"
@@ -6615,6 +6663,14 @@ msgstr "Select the languages the spell checker should check in."
msgid "Select the release track for Notesnook."
msgstr "Select the release track for Notesnook."
+#: src/strings.ts:3004
+msgid "Select time"
+msgstr "Select time"
+
+#: src/strings.ts:3006
+msgid "Select Time"
+msgstr "Select Time"
+
#: src/strings.ts:2980
msgid "Selected note"
msgstr "Selected note"
@@ -6849,6 +6905,10 @@ msgstr "Share to cloud"
msgid "Share ZIP"
msgstr "Share ZIP"
+#: src/strings.ts:3011
+msgid "Short Detail"
+msgstr "Short Detail"
+
#: src/strings.ts:305
msgid "shortcut"
msgstr "shortcut"
@@ -7380,6 +7440,10 @@ msgstr "The password for decrypting the Colornote backup file."
msgid "The password/pin for unlocking the app."
msgstr "The password/pin for unlocking the app."
+#: src/strings.ts:3001
+msgid "The reminder will occur on the selected day."
+msgstr "The reminder will occur on the selected day."
+
#: src/strings.ts:350
msgid "The reminder will repeat daily at {date}."
msgstr "The reminder will repeat daily at {date}."
@@ -8234,6 +8298,10 @@ msgstr "What happens to my data if I switch plans?"
msgid "What is your refund policy?"
msgstr "What is your refund policy?"
+#: src/strings.ts:3012
+msgid "What needs to be done?"
+msgstr "What needs to be done?"
+
#: src/strings.ts:1718
msgid "What went wrong?"
msgstr "What went wrong?"
diff --git a/packages/intl/locale/pseudo-LOCALE.po b/packages/intl/locale/pseudo-LOCALE.po
index f2ae8ea1e..74f3b7864 100644
--- a/packages/intl/locale/pseudo-LOCALE.po
+++ b/packages/intl/locale/pseudo-LOCALE.po
@@ -538,6 +538,10 @@ msgstr ""
msgid "{mode, select, day {Daily} week {Weekly} month {Monthly} year {Yearly} other {Unknown mode}}"
msgstr ""
+#: src/strings.ts:2991
+msgid "{mode, select, once {The reminder will occur once.} day {The reminder will occur daily.} week {Custom schedule active} month {Custom schedule active} year {The reminder will repeat every year.} other {}}"
+msgstr ""
+
#: src/strings.ts:622
msgid "{mode, select, repeat {Repeat} once {Once} permanent {Permanent} other {Unknown mode}}"
msgstr ""
@@ -766,6 +770,10 @@ msgstr ""
msgid "Add shortcuts for notebooks and tags here."
msgstr ""
+#: src/strings.ts:3013
+msgid "Add some details..."
+msgstr ""
+
#: src/strings.ts:596
msgid "Add tag"
msgstr ""
@@ -803,6 +811,10 @@ msgstr ""
msgid "Adjust the line height of the editor"
msgstr ""
+#: src/strings.ts:3002
+msgid "Adjusts to last day in shorter months"
+msgstr ""
+
#: src/strings.ts:2232
msgid "Advanced"
msgstr ""
@@ -819,6 +831,10 @@ msgstr ""
msgid "After scanning the QR code image, the app will display a code that you can enter below."
msgstr ""
+#: src/strings.ts:3010
+msgid "Alert mode"
+msgstr ""
+
#: src/strings.ts:2371
msgid "Align left"
msgstr ""
@@ -895,6 +911,10 @@ msgstr ""
msgid "All your backups are stored in 'Phone Storage/Notesnook/backups/' folder"
msgstr ""
+#: src/strings.ts:3008
+msgid "All-day reminder"
+msgstr ""
+
#: src/strings.ts:108
msgid "Already have an account?"
msgstr ""
@@ -2139,6 +2159,10 @@ msgstr ""
msgid "Create notebook"
msgstr ""
+#: src/strings.ts:3014
+msgid "Create Reminder"
+msgstr ""
+
#: src/strings.ts:1519
msgid "Create shortcut of this notebook in side menu"
msgstr ""
@@ -4529,6 +4553,10 @@ msgstr ""
msgid "More"
msgstr ""
+#: src/strings.ts:3007
+msgid "More options"
+msgstr ""
+
#: src/strings.ts:669
msgid "Most relevant first"
msgstr ""
@@ -5924,6 +5952,10 @@ msgstr ""
msgid "Relogin to your Account"
msgstr ""
+#: src/strings.ts:3009
+msgid "Remains active throughout the day."
+msgstr ""
+
#: src/strings.ts:1847
msgid "Remembered your password?"
msgstr ""
@@ -5953,6 +5985,10 @@ msgstr ""
msgid "Reminder"
msgstr ""
+#: src/strings.ts:2989
+msgid "Reminder frequency"
+msgstr ""
+
#: src/strings.ts:1292
msgid "Reminder notifications"
msgstr ""
@@ -6521,10 +6557,22 @@ msgstr ""
msgid "Select date"
msgstr ""
+#: src/strings.ts:3003
+msgid "Select date & time"
+msgstr ""
+
+#: src/strings.ts:3005
+msgid "Select Dates"
+msgstr ""
+
#: src/strings.ts:351
msgid "Select day of the week to repeat the reminder."
msgstr ""
+#: src/strings.ts:2999
+msgid "Select Days"
+msgstr ""
+
#: src/strings.ts:1814
msgid "Select files to import"
msgstr ""
@@ -6589,6 +6637,14 @@ msgstr ""
msgid "Select the release track for Notesnook."
msgstr ""
+#: src/strings.ts:3004
+msgid "Select time"
+msgstr ""
+
+#: src/strings.ts:3006
+msgid "Select Time"
+msgstr ""
+
#: src/strings.ts:2980
msgid "Selected note"
msgstr ""
@@ -6815,6 +6871,10 @@ msgstr ""
msgid "Share ZIP"
msgstr ""
+#: src/strings.ts:3011
+msgid "Short Detail"
+msgstr ""
+
#: src/strings.ts:305
msgid "shortcut"
msgstr ""
@@ -7339,6 +7399,10 @@ msgstr ""
msgid "The password/pin for unlocking the app."
msgstr ""
+#: src/strings.ts:3001
+msgid "The reminder will occur on the selected day."
+msgstr ""
+
#: src/strings.ts:350
msgid "The reminder will repeat daily at {date}."
msgstr ""
@@ -8184,6 +8248,10 @@ msgstr ""
msgid "What is your refund policy?"
msgstr ""
+#: src/strings.ts:3012
+msgid "What needs to be done?"
+msgstr ""
+
#: src/strings.ts:1718
msgid "What went wrong?"
msgstr ""
diff --git a/packages/intl/src/strings.ts b/packages/intl/src/strings.ts
index bc61fec2c..b9778e468 100644
--- a/packages/intl/src/strings.ts
+++ b/packages/intl/src/strings.ts
@@ -2985,5 +2985,31 @@ Continue without attachments?`,
linkedReferences: () => t`Linked References`,
selectParagraphs: () => t`Select paragraphs`,
addLink: () => t`Add Link`,
- linkAdded: () => t`Link added`
+ linkAdded: () => t`Link added`,
+ reminderFrequency: () => t`Reminder frequency`,
+ reminderFrequencyDescription: (mode: string) =>
+ select(mode, {
+ once: "The reminder will occur once.",
+ day: "The reminder will occur daily.",
+ week: "Custom schedule active",
+ month: "Custom schedule active",
+ year: "The reminder will repeat every year.",
+ other: ""
+ }),
+ reminderSelectDays: () => t`Select Days`,
+ reminderSelectedDayHelp: () =>
+ t`The reminder will occur on the selected day.`,
+ reminderSelecetDateHelp: () => t`Adjusts to last day in shorter months`,
+ selectDateAndTime: () => t`Select date & time`,
+ selectTimeHeading: () => t`Select time`,
+ selectDatesPlaceholder: () => t`Select Dates`,
+ selectTimePlaceholder: () => t`Select Time`,
+ moreOptions: () => t`More options`,
+ allDayReminder: () => t`All-day reminder`,
+ allDayReminderDescription: () => t`Remains active throughout the day.`,
+ alertMode: () => t`Alert mode`,
+ reminderShortDetail: () => t`Short Detail`,
+ reminderTitlePlaceholder: () => t`What needs to be done?`,
+ reminderDetailsPlaceholder: () => t`Add some details...`,
+ createReminder: () => t`Create Reminder`
};