diff --git a/app/editor/components/MentionMenu.tsx b/app/editor/components/MentionMenu.tsx index 4c70a8ae6e..7da2cb1457 100644 --- a/app/editor/components/MentionMenu.tsx +++ b/app/editor/components/MentionMenu.tsx @@ -1,6 +1,7 @@ import { isEmail } from "class-validator"; import { observer } from "mobx-react"; import { v4 as uuidv4 } from "uuid"; +import { runInAction } from "mobx"; import { DocumentIcon, PlusIcon, @@ -40,7 +41,6 @@ import { client } from "~/utils/ApiClient"; import type { Props as SuggestionsMenuProps } from "./SuggestionsMenu"; import SuggestionsMenu from "./SuggestionsMenu"; import SuggestionsMenuItem from "./SuggestionsMenuItem"; -import { runInAction } from "mobx"; interface MentionItem extends MenuItem { attrs: { @@ -99,29 +99,31 @@ function MentionMenu({ search, isActive, ...rest }: Props) { }; }, [search]); - const dateItems: MentionItem[] = - actorId && parsedISODate - ? [ - { - name: "mention", - icon: ( - - ), - title: dateToRelativeReadable(parsedISODate, t, userLocale), - subtitle: dateToReadable(parsedISODate, userLocale), - section: DateSection, - appendSpace: true, - attrs: { - id: uuidv4(), - type: MentionType.Date, - modelId: parsedISODate, - actorId, - }, - } as MentionItem, - ] - : []; + let dateItems: MentionItem[] = []; + + if (actorId && parsedISODate) { + const title = dateToRelativeReadable(parsedISODate, t, userLocale); + const subtitle = dateToReadable(parsedISODate, userLocale); + + dateItems = [ + { + name: "mention", + icon: ( + + ), + title, + subtitle: title !== subtitle ? subtitle : undefined, + section: DateSection, + appendSpace: true, + attrs: { + id: uuidv4(), + type: MentionType.Date, + modelId: parsedISODate, + actorId, + }, + } as MentionItem, + ]; + } const { loading, request } = useRequest( useCallback(async () => { diff --git a/shared/components/Calendar.tsx b/shared/components/Calendar.tsx index c45568e517..efbce7e2eb 100644 --- a/shared/components/Calendar.tsx +++ b/shared/components/Calendar.tsx @@ -98,7 +98,7 @@ const Wrapper = styled.div` } .rdp-head_cell { - font-size: 11px; + font-size: 12px; font-weight: 500; text-transform: none; color: ${s("textTertiary")}; diff --git a/shared/components/DynamicCalendarIcon.tsx b/shared/components/DynamicCalendarIcon.tsx index 3846838572..90ed8e3f88 100644 --- a/shared/components/DynamicCalendarIcon.tsx +++ b/shared/components/DynamicCalendarIcon.tsx @@ -38,7 +38,7 @@ export function DynamicCalendarIcon({ day, className }: Props) { dominantBaseline="middle" letterSpacing="0em" > - + {day} diff --git a/shared/i18n/locales/en_US/translation.json b/shared/i18n/locales/en_US/translation.json index 07d39ae50f..7ecf337b7a 100644 --- a/shared/i18n/locales/en_US/translation.json +++ b/shared/i18n/locales/en_US/translation.json @@ -617,8 +617,6 @@ "Divider": "Divider", "Page break": "Page break", "Current date": "Current date", - "Current time": "Current time", - "Current date and time": "Current date and time", "Info notice": "Info notice", "Success notice": "Success notice", "Warning notice": "Warning notice",