This commit is contained in:
Anthony Cooper 2025-10-06 22:42:22 -07:00 committed by GitHub
commit a175f02785
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 61 additions and 50 deletions

View File

@ -101,7 +101,33 @@ const MemoActionMenu = observer((props: Props) => {
}, },
["state"], ["state"],
); );
toast(message);
toast.custom((tToast) => (
<div className="flex items-center gap-3 ml-auto bg-primary dark:bg-primary p-3 rounded-xl shadow">
<span className="text-background">{message}</span>
<button
className="ml-auto text-background italic hover:underline"
onClick={async () => {
await memoStore.updateMemo(
{
name: memo.name,
state: memo.state,
},
["state"],
);
toast.dismiss(tToast.id);
toast.custom((tToast) => (
<div className="flex items-center gap-3 ml-auto bg-primary dark:bg-primary p-3 rounded-xl shadow">
<span className="text-background">{t("message.undo-successful")}</span>
</div>
));
memoUpdatedCallback();
}}
>
({t("common.undo")})
</button>
</div>
));
} catch (error: any) { } catch (error: any) {
toast.error(error.details); toast.error(error.details);
console.error(error); console.error(error);
@ -144,7 +170,6 @@ const MemoActionMenu = observer((props: Props) => {
const children = node.listNode.children; const children = node.listNode.children;
for (let i = 0; i < children.length; i++) { for (let i = 0; i < children.length; i++) {
if (children[i].type === NodeType.TASK_LIST_ITEM && children[i].taskListItemNode?.complete) { if (children[i].type === NodeType.TASK_LIST_ITEM && children[i].taskListItemNode?.complete) {
// Remove completed taskList item and next line breaks
children.splice(i, 1); children.splice(i, 1);
if (children[i]?.type === NodeType.LINE_BREAK) { if (children[i]?.type === NodeType.LINE_BREAK) {
children.splice(i, 1); children.splice(i, 1);

View File

@ -93,6 +93,7 @@
"title": "Title", "title": "Title",
"tree-mode": "Tree mode", "tree-mode": "Tree mode",
"type": "Type", "type": "Type",
"undo": "Undo",
"unpin": "Unpin", "unpin": "Unpin",
"update": "Update", "update": "Update",
"upload": "Upload", "upload": "Upload",
@ -188,6 +189,7 @@
"remove-completed-task-list-items-successfully": "The removal was successful", "remove-completed-task-list-items-successfully": "The removal was successful",
"restored-successfully": "Restored successfully", "restored-successfully": "Restored successfully",
"succeed-copy-link": "Link copied successfully.", "succeed-copy-link": "Link copied successfully.",
"undo-successful": "Undo successful",
"update-succeed": "Update succeeded", "update-succeed": "Update succeeded",
"user-not-found": "User not found" "user-not-found": "User not found"
}, },

View File

@ -1,52 +1,36 @@
:root { :root {
--background: oklch(0.9818 0.0054 95.0986); --background: oklch(22% 0.07 300);
--foreground: oklch(0.2438 0.0269 95.7226); --foreground: oklch(87% 0.08 300);
--card: oklch(0.9818 0.0054 95.0986); --card: oklch(22% 0.07 300);
--card-foreground: oklch(0.1908 0.002 106.5859); --card-foreground: oklch(84% 0.07 302);
--popover: oklch(1 0 0); --popover: oklch(30% 0.02 300);
--popover-foreground: oklch(0.2671 0.0196 98.939); --popover-foreground: oklch(85% 0.02 300);
--primary: oklch(0.3918 0.0127 286.3); --primary: oklch(70% 0.09 300);
--primary-foreground: oklch(0.9818 0.0054 95.0986); --primary-foreground: oklch(22% 0.07 300);
--secondary: oklch(0.9245 0.0138 92.9892); --secondary: oklch(34% 0.01 300);
--secondary-foreground: oklch(0.4334 0.0177 98.6048); --secondary-foreground: oklch(82% 0.02 300);
--muted: oklch(0.9341 0.0153 90.239); --muted: oklch(25% 0.01 300);
--muted-foreground: oklch(0.5559 0.0075 97.4233); --muted-foreground: oklch(55% 0.04 300);
--accent: oklch(0.9245 0.0138 92.9892); --accent: oklch(32% 0.02 300);
--accent-foreground: oklch(0.2671 0.0196 98.939); --accent-foreground: oklch(82% 0.02 300);
--destructive: oklch(0.35 0.02 250); --destructive: oklch(55% 0.015 20);
--destructive-foreground: oklch(0.95 0.005 250); --destructive-foreground: oklch(95% 0.01 20);
--border: oklch(0.8847 0.0069 97.3627); --border: oklch(36% 0.03 300);
--input: oklch(0.7621 0.0156 98.3528); --input: oklch(45% 0.015 300);
--ring: oklch(0.5937 0.1673 253.063); --ring: oklch(60% 0.15 300);
--chart-1: oklch(0.5583 0.1276 42.9956); --chart-1: oklch(55% 0.12 40);
--chart-2: oklch(0.6898 0.1581 290.4107); --chart-2: oklch(68% 0.15 300);
--chart-3: oklch(0.8816 0.0276 93.128); --chart-3: oklch(45% 0.02 245);
--chart-4: oklch(0.8822 0.0403 298.1792); --chart-4: oklch(32% 0.05 300);
--chart-5: oklch(0.5608 0.1348 42.0584); --chart-5: oklch(56% 0.13 40);
--sidebar: oklch(0.9663 0.008 98.8792); --sidebar: oklch(18% 0.05 300);
--sidebar-foreground: oklch(0.359 0.0051 106.6524); --sidebar-foreground: oklch(87% 0.08 300);
--sidebar-primary: oklch(0.3918 0.0127 286.3); --sidebar-primary: oklch(12% 0.03 300);
--sidebar-primary-foreground: oklch(0.9818 0.0054 95.0986); --sidebar-primary-foreground: oklch(27% 0.01 300);
--sidebar-accent: oklch(0.9245 0.0138 92.9892); --sidebar-accent: oklch(25% 0.08 300);
--sidebar-accent-foreground: oklch(0.325 0 0); --sidebar-accent-foreground: oklch(82% 0.02 300);
--sidebar-border: oklch(0.9401 0 0); --sidebar-border: oklch(37% 0.01 110);
--sidebar-ring: oklch(0.7731 0 0); --sidebar-ring: oklch(60% 0.15 300);
--font-sans:
ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--radius: 0.5rem;
--shadow-2xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
--shadow-xs: 0 1px 3px 0px hsl(0 0% 0% / 0.05);
--shadow-sm: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
--shadow: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 1px 2px -1px hsl(0 0% 0% / 0.1);
--shadow-md: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 2px 4px -1px hsl(0 0% 0% / 0.1);
--shadow-lg: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 4px 6px -1px hsl(0 0% 0% / 0.1);
--shadow-xl: 0 1px 3px 0px hsl(0 0% 0% / 0.1), 0 8px 10px -1px hsl(0 0% 0% / 0.1);
--shadow-2xl: 0 1px 3px 0px hsl(0 0% 0% / 0.25);
--tracking-normal: 0em;
--spacing: 0.25rem;
} }
@theme inline { @theme inline {