AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
Add manual note sync button
yoma977044529de4
diff --git a/apps/web/src/components/MemoListPane.tsx b/apps/web/src/components/MemoListPane.tsxindex e54113b2..14ceedf4 100644--- a/apps/web/src/components/MemoListPane.tsx+++ b/apps/web/src/components/MemoListPane.tsx@@ -28,6 +28,7 @@ import {FileText as FileIcon,Star,RotateCcw,+ RefreshCw,Folder,Merge,FilePlus2,@@ -354,7 +355,10 @@ export const MemoListPane = ({onOpenAssets,onOpenTrash,onOpenSettings,+ onSyncMemos,onCreateMemo,+ isSyncingMemos,+ canSyncMemos,mobileListActionsOpen,setMobileListActionsOpen,mobileMoveOpen,@@ -422,7 +426,10 @@ export const MemoListPane = ({onOpenAssets: () => void;onOpenTrash: () => void;onOpenSettings: () => void;+ onSyncMemos: () => void;onCreateMemo: () => void;+ isSyncingMemos: boolean;+ canSyncMemos: boolean;mobileListActionsOpen: boolean;setMobileListActionsOpen: (open: boolean) => void;mobileMoveOpen: boolean;@@ -504,6 +511,11 @@ export const MemoListPane = ({const hasListConstraint = Boolean(search.trim()) || filterMode !== "all";const activeFilterLabel = filterOptions.find((option) => option.value === filterMode)?.label ?? t("options.memoFilter.all");const activeSortLabel = memoSortOptions.find((option) => option.value === sortMode)?.label ?? t("options.memoSort.updatedDesc");+ const syncMemosTitle = !canSyncMemos+ ? t("memoList.manualSyncOffline")+ : isSyncingMemos+ ? t("memoList.manualSyncing")+ : t("memoList.manualSync");useEffect(() => {if (notebook?.id) {@@ -1099,6 +1111,16 @@ export const MemoListPane = ({</ToggleGroup></div><div className="flex shrink-0 items-center gap-1">+ <Button+ size="icon"+ variant="ghost"+ title={syncMemosTitle}+ aria-label={syncMemosTitle}+ disabled={!canSyncMemos || isSyncingMemos}+ onClick={onSyncMemos}+ >+ <RefreshCw className={cn("h-4 w-4", isSyncingMemos && "animate-spin")} />+ </Button>{view === "trash" && (<Buttonsize="sm"diff --git a/apps/web/src/components/WorkspaceApp.tsx b/apps/web/src/components/WorkspaceApp.tsxindex d96846b9..9a53adaf 100644--- a/apps/web/src/components/WorkspaceApp.tsx+++ b/apps/web/src/components/WorkspaceApp.tsx@@ -775,6 +775,7 @@ export const WorkspaceApp = ({const [isOnline, setIsOnline] = useState(() => (typeof navigator === "undefined" ? true : navigator.onLine));const [isDesktop, setIsDesktop] = useState(isDesktopViewport);const [isSyncingQueuedChanges, setIsSyncingQueuedChanges] = useState(false);+ const [isManualMemoSyncing, setIsManualMemoSyncing] = useState(false);const [isStandaloneRuntime] = useState(isStandaloneApp);const [pullToRefreshDistance, setPullToRefreshDistance] = useState(0);const [isPullRefreshing, setIsPullRefreshing] = useState(false);@@ -845,6 +846,27 @@ export const WorkspaceApp = ({}}, [queryClient]);+ const syncMemosManually = useCallback(async () => {+ if (typeof navigator !== "undefined" && !navigator.onLine) {+ setIsOnline(false);+ return;+ }++ setIsManualMemoSyncing(true);++ try {+ await runQueuedSync();+ await Promise.all([+ queryClient.invalidateQueries({ queryKey: ["memos"] }),+ queryClient.invalidateQueries({ queryKey: ["memo"] }),+ queryClient.invalidateQueries({ queryKey: ["notebooks"] }),+ queryClient.invalidateQueries({ queryKey: ["resources"], refetchType: "all" }),+ ]);+ } finally {+ setIsManualMemoSyncing(false);+ }+ }, [queryClient, runQueuedSync]);+const notebooksQuery = useQuery({queryKey: ["notebooks"],queryFn: () => api.listNotebooks(),@@ -2408,6 +2430,9 @@ export const WorkspaceApp = ({onOpenAssets={handleOpenAssets}onOpenTags={handleOpenTags}onOpenSettings={handleOpenSettings}+ onSyncMemos={() => void syncMemosManually()}+ isSyncingMemos={isManualMemoSyncing || isSyncingQueuedChanges || isPullRefreshing || memosQuery.isRefetching}+ canSyncMemos={isOnline}onOpenTrash={() => {navigateWorkspaceHome();setMemoView("trash");diff --git a/apps/web/src/i18n/resources/en-US.ts b/apps/web/src/i18n/resources/en-US.tsindex 38c22f8a..6cfe4852 100644--- a/apps/web/src/i18n/resources/en-US.ts+++ b/apps/web/src/i18n/resources/en-US.ts@@ -282,6 +282,9 @@ export const enUS = {moveToNotebook: "Move to notebook",deleteMemo: "Delete note",toggleOffFilter: "Cancel {{label}}",+ manualSync: "Sync notes manually",+ manualSyncing: "Syncing notes",+ manualSyncOffline: "Cannot sync notes while offline",},memoCard: {yesterday: "Yesterday",diff --git a/apps/web/src/i18n/resources/zh-CN.ts b/apps/web/src/i18n/resources/zh-CN.tsindex 11238f6e..67e69163 100644--- a/apps/web/src/i18n/resources/zh-CN.ts+++ b/apps/web/src/i18n/resources/zh-CN.ts@@ -282,6 +282,9 @@ export const zhCN = {moveToNotebook: "移动到笔记本",deleteMemo: "删除笔记",toggleOffFilter: "取消{{label}}",+ manualSync: "手动同步笔记",+ manualSyncing: "正在同步笔记",+ manualSyncOffline: "离线时无法同步笔记",},memoCard: {yesterday: "昨天",