Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions web/src/components/MemoActionMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,33 @@ const MemoActionMenu = observer((props: Props) => {
},
["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) {
toast.error(error.details);
console.error(error);
Expand Down Expand Up @@ -144,7 +170,6 @@ const MemoActionMenu = observer((props: Props) => {
const children = node.listNode.children;
for (let i = 0; i < children.length; i++) {
if (children[i].type === NodeType.TASK_LIST_ITEM && children[i].taskListItemNode?.complete) {
// Remove completed taskList item and next line breaks
children.splice(i, 1);
if (children[i]?.type === NodeType.LINE_BREAK) {
children.splice(i, 1);
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"title": "Title",
"tree-mode": "Tree mode",
"type": "Type",
"undo": "Undo",
"unpin": "Unpin",
"update": "Update",
"upload": "Upload",
Expand Down Expand Up @@ -188,6 +189,7 @@
"remove-completed-task-list-items-successfully": "The removal was successful",
"restored-successfully": "Restored successfully",
"succeed-copy-link": "Link copied successfully.",
"undo-successful": "Undo successful",
"update-succeed": "Update succeeded",
"user-not-found": "User not found"
},
Expand Down
80 changes: 32 additions & 48 deletions web/src/themes/default.css
Original file line number Diff line number Diff line change
@@ -1,52 +1,36 @@
:root {
--background: oklch(0.9818 0.0054 95.0986);
--foreground: oklch(0.2438 0.0269 95.7226);
--card: oklch(0.9818 0.0054 95.0986);
--card-foreground: oklch(0.1908 0.002 106.5859);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.2671 0.0196 98.939);
--primary: oklch(0.3918 0.0127 286.3);
--primary-foreground: oklch(0.9818 0.0054 95.0986);
--secondary: oklch(0.9245 0.0138 92.9892);
--secondary-foreground: oklch(0.4334 0.0177 98.6048);
--muted: oklch(0.9341 0.0153 90.239);
--muted-foreground: oklch(0.5559 0.0075 97.4233);
--accent: oklch(0.9245 0.0138 92.9892);
--accent-foreground: oklch(0.2671 0.0196 98.939);
--destructive: oklch(0.35 0.02 250);
--destructive-foreground: oklch(0.95 0.005 250);
--border: oklch(0.8847 0.0069 97.3627);
--input: oklch(0.7621 0.0156 98.3528);
--ring: oklch(0.5937 0.1673 253.063);
--chart-1: oklch(0.5583 0.1276 42.9956);
--chart-2: oklch(0.6898 0.1581 290.4107);
--chart-3: oklch(0.8816 0.0276 93.128);
--chart-4: oklch(0.8822 0.0403 298.1792);
--chart-5: oklch(0.5608 0.1348 42.0584);
--sidebar: oklch(0.9663 0.008 98.8792);
--sidebar-foreground: oklch(0.359 0.0051 106.6524);
--sidebar-primary: oklch(0.3918 0.0127 286.3);
--sidebar-primary-foreground: oklch(0.9818 0.0054 95.0986);
--sidebar-accent: oklch(0.9245 0.0138 92.9892);
--sidebar-accent-foreground: oklch(0.325 0 0);
--sidebar-border: oklch(0.9401 0 0);
--sidebar-ring: oklch(0.7731 0 0);
--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;
--background: oklch(22% 0.07 300);
--foreground: oklch(87% 0.08 300);
--card: oklch(22% 0.07 300);
--card-foreground: oklch(84% 0.07 302);
--popover: oklch(30% 0.02 300);
--popover-foreground: oklch(85% 0.02 300);
--primary: oklch(70% 0.09 300);
--primary-foreground: oklch(22% 0.07 300);
--secondary: oklch(34% 0.01 300);
--secondary-foreground: oklch(82% 0.02 300);
--muted: oklch(25% 0.01 300);
--muted-foreground: oklch(55% 0.04 300);
--accent: oklch(32% 0.02 300);
--accent-foreground: oklch(82% 0.02 300);
--destructive: oklch(55% 0.015 20);
--destructive-foreground: oklch(95% 0.01 20);
--border: oklch(36% 0.03 300);
--input: oklch(45% 0.015 300);
--ring: oklch(60% 0.15 300);
--chart-1: oklch(55% 0.12 40);
--chart-2: oklch(68% 0.15 300);
--chart-3: oklch(45% 0.02 245);
--chart-4: oklch(32% 0.05 300);
--chart-5: oklch(56% 0.13 40);
--sidebar: oklch(18% 0.05 300);
--sidebar-foreground: oklch(87% 0.08 300);
--sidebar-primary: oklch(12% 0.03 300);
--sidebar-primary-foreground: oklch(27% 0.01 300);
--sidebar-accent: oklch(25% 0.08 300);
--sidebar-accent-foreground: oklch(82% 0.02 300);
--sidebar-border: oklch(37% 0.01 110);
--sidebar-ring: oklch(60% 0.15 300);
}

@theme inline {
Expand Down