This commit is contained in:
Tom Moor
2026-06-08 22:43:18 -04:00
parent 93511be380
commit d14296033d
4 changed files with 28 additions and 28 deletions
+26 -24
View File
@@ -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: (
<DynamicCalendarIcon
day={parseISODate(parsedISODate)?.getDate()}
/>
),
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: (
<DynamicCalendarIcon day={parseISODate(parsedISODate)?.getDate()} />
),
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 () => {
+1 -1
View File
@@ -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")};
+1 -1
View File
@@ -38,7 +38,7 @@ export function DynamicCalendarIcon({ day, className }: Props) {
dominantBaseline="middle"
letterSpacing="0em"
>
<tspan x="12" y="14">
<tspan x="12" y="13.5">
{day}
</tspan>
</text>
@@ -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",