Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: more fixes to new notebooks tree

Abdullah Attaa01185728645
diff --git a/apps/web/src/components/virtualized-tree/index.tsx b/apps/web/src/components/virtualized-tree/index.tsx
index 2fce17841..39402ac79 100644
--- a/apps/web/src/components/virtualized-tree/index.tsx
+++ b/apps/web/src/components/virtualized-tree/index.tsx
@@ -170,7 +170,7 @@ export function VirtualizedTree<T>(props: TreeViewProps<T>) {
useEffect(() => {
fetchChildren(rootId, -1, expandedIds, getChildNodes).then(setNodes);
}, [rootId]);
-
+ console.log(expandedIds);
return (
<Virtuoso
data-test-id={testId}
diff --git a/apps/web/src/dialogs/move-note-dialog.tsx b/apps/web/src/dialogs/move-note-dialog.tsx
index 31fabc669..ea8187948 100644
--- a/apps/web/src/dialogs/move-note-dialog.tsx
+++ b/apps/web/src/dialogs/move-note-dialog.tsx
@@ -232,7 +232,7 @@ export const MoveNoteDialog = DialogManager.register(function MoveNoteDialog({
depth: depth + 1,
hasChildren: children > 0,
id,
- parentId: id
+ parentId: "root"
});
}
return nodes;
@@ -265,7 +265,6 @@ export const MoveNoteDialog = DialogManager.register(function MoveNoteDialog({
toggle={expanded ? collapse : expand}
onCreateItem={() => {
treeRef.current?.refreshItem(index, item.data);
- expand();
}}
/>
)}
diff --git a/packages/intl/locale/en.po b/packages/intl/locale/en.po
index 5cde5419c..37cd24e92 100644
--- a/packages/intl/locale/en.po
+++ b/packages/intl/locale/en.po
@@ -117,7 +117,7 @@ msgstr "{count, plural, one {Attachment deleted} other {# attachments deleted}}"
msgid "{count, plural, one {Attachment downloaded at {path}} other {#/{total} attachments downloaded as a zip file at {path}}}"
msgstr "{count, plural, one {Attachment downloaded at {path}} other {#/{total} attachments downloaded as a zip file at {path}}}"
-#: generated/actions.ts:90
+#: generated/actions.ts:96
msgid "{count, plural, one {Color renamed} other {# colors renamed}}"
msgstr "{count, plural, one {Color renamed} other {# colors renamed}}"
@@ -189,7 +189,7 @@ msgstr "{count, plural, one {Edit tag} other {Edit # tags}}"
msgid "{count, plural, one {Failed to download attachment} other {Failed to download # attachments}}"
msgstr "{count, plural, one {Failed to download attachment} other {Failed to download # attachments}}"
-#: generated/actions.ts:60
+#: generated/actions.ts:66
msgid "{count, plural, one {Item restored} other {# items restored}}"
msgstr "{count, plural, one {Item restored} other {# items restored}}"
@@ -233,10 +233,14 @@ msgstr "{count, plural, one {Note permanently deleted} other {# notes permanentl
msgid "{count, plural, one {Note published} other {# notes published}}"
msgstr "{count, plural, one {Note published} other {# notes published}}"
-#: generated/actions.ts:52
+#: generated/actions.ts:58
msgid "{count, plural, one {Note restored} other {# notes restored}}"
msgstr "{count, plural, one {Note restored} other {# notes restored}}"
+#: generated/actions.ts:52
+msgid "{count, plural, one {Note unpublished} other {# notes unpublished}}"
+msgstr "{count, plural, one {Note unpublished} other {# notes unpublished}}"
+
#: src/strings.ts:880
msgid "{count, plural, one {Note will be automatically deleted from all other devices & any future changes won't get synced. Are you sure you want to continue?} other {# notes will be automatically deleted from all other devices & any future changes won't get synced. Are you sure you want to continue?}}"
msgstr "{count, plural, one {Note will be automatically deleted from all other devices & any future changes won't get synced. Are you sure you want to continue?} other {# notes will be automatically deleted from all other devices & any future changes won't get synced. Are you sure you want to continue?}}"
@@ -245,11 +249,11 @@ msgstr "{count, plural, one {Note will be automatically deleted from all other d
msgid "{count, plural, one {note} other {# notes}}"
msgstr "{count, plural, one {note} other {# notes}}"
-#: generated/actions.ts:76
+#: generated/actions.ts:82
msgid "{count, plural, one {Notebook created} other {# notebooks created}}"
msgstr "{count, plural, one {Notebook created} other {# notebooks created}}"
-#: generated/actions.ts:70
+#: generated/actions.ts:76
msgid "{count, plural, one {Notebook edited} other {# notebooks edited}}"
msgstr "{count, plural, one {Notebook edited} other {# notebooks edited}}"
@@ -261,7 +265,7 @@ msgstr "{count, plural, one {Notebook moved to trash} other {# notebooks moved t
msgid "{count, plural, one {Notebook permanently deleted} other {# notebooks permanently deleted}}"
msgstr "{count, plural, one {Notebook permanently deleted} other {# notebooks permanently deleted}}"
-#: generated/actions.ts:56
+#: generated/actions.ts:62
msgid "{count, plural, one {Notebook restored} other {# notebooks restored}}"
msgstr "{count, plural, one {Notebook restored} other {# notebooks restored}}"
@@ -325,11 +329,11 @@ msgstr "{count, plural, one {Restore note} other {Restore # notes}}"
msgid "{count, plural, one {Restore notebook} other {Restore # notebooks}}"
msgstr "{count, plural, one {Restore notebook} other {Restore # notebooks}}"
-#: generated/actions.ts:84
+#: generated/actions.ts:90
msgid "{count, plural, one {Shortcut created} other {# shortcuts created}}"
msgstr "{count, plural, one {Shortcut created} other {# shortcuts created}}"
-#: generated/actions.ts:80
+#: generated/actions.ts:86
msgid "{count, plural, one {Tag created} other {# tags created}}"
msgstr "{count, plural, one {Tag created} other {# tags created}}"
@@ -337,7 +341,7 @@ msgstr "{count, plural, one {Tag created} other {# tags created}}"
msgid "{count, plural, one {Tag deleted} other {# tags deleted}}"
msgstr "{count, plural, one {Tag deleted} other {# tags deleted}}"
-#: generated/actions.ts:66
+#: generated/actions.ts:72
msgid "{count, plural, one {Tag edited} other {# tags edited}}"
msgstr "{count, plural, one {Tag edited} other {# tags edited}}"
diff --git a/packages/intl/locale/pseudo-LOCALE.po b/packages/intl/locale/pseudo-LOCALE.po
index fb0c897fc..44274a682 100644
--- a/packages/intl/locale/pseudo-LOCALE.po
+++ b/packages/intl/locale/pseudo-LOCALE.po
@@ -117,7 +117,7 @@ msgstr ""
msgid "{count, plural, one {Attachment downloaded at {path}} other {#/{total} attachments downloaded as a zip file at {path}}}"
msgstr ""
-#: generated/actions.ts:90
+#: generated/actions.ts:96
msgid "{count, plural, one {Color renamed} other {# colors renamed}}"
msgstr ""
@@ -189,7 +189,7 @@ msgstr ""
msgid "{count, plural, one {Failed to download attachment} other {Failed to download # attachments}}"
msgstr ""
-#: generated/actions.ts:60
+#: generated/actions.ts:66
msgid "{count, plural, one {Item restored} other {# items restored}}"
msgstr ""
@@ -233,10 +233,14 @@ msgstr ""
msgid "{count, plural, one {Note published} other {# notes published}}"
msgstr ""
-#: generated/actions.ts:52
+#: generated/actions.ts:58
msgid "{count, plural, one {Note restored} other {# notes restored}}"
msgstr ""
+#: generated/actions.ts:52
+msgid "{count, plural, one {Note unpublished} other {# notes unpublished}}"
+msgstr ""
+
#: src/strings.ts:880
msgid "{count, plural, one {Note will be automatically deleted from all other devices & any future changes won't get synced. Are you sure you want to continue?} other {# notes will be automatically deleted from all other devices & any future changes won't get synced. Are you sure you want to continue?}}"
msgstr ""
@@ -245,11 +249,11 @@ msgstr ""
msgid "{count, plural, one {note} other {# notes}}"
msgstr ""
-#: generated/actions.ts:76
+#: generated/actions.ts:82
msgid "{count, plural, one {Notebook created} other {# notebooks created}}"
msgstr ""
-#: generated/actions.ts:70
+#: generated/actions.ts:76
msgid "{count, plural, one {Notebook edited} other {# notebooks edited}}"
msgstr ""
@@ -261,7 +265,7 @@ msgstr ""
msgid "{count, plural, one {Notebook permanently deleted} other {# notebooks permanently deleted}}"
msgstr ""
-#: generated/actions.ts:56
+#: generated/actions.ts:62
msgid "{count, plural, one {Notebook restored} other {# notebooks restored}}"
msgstr ""
@@ -325,11 +329,11 @@ msgstr ""
msgid "{count, plural, one {Restore notebook} other {Restore # notebooks}}"
msgstr ""
-#: generated/actions.ts:84
+#: generated/actions.ts:90
msgid "{count, plural, one {Shortcut created} other {# shortcuts created}}"
msgstr ""
-#: generated/actions.ts:80
+#: generated/actions.ts:86
msgid "{count, plural, one {Tag created} other {# tags created}}"
msgstr ""
@@ -337,7 +341,7 @@ msgstr ""
msgid "{count, plural, one {Tag deleted} other {# tags deleted}}"
msgstr ""
-#: generated/actions.ts:66
+#: generated/actions.ts:72
msgid "{count, plural, one {Tag edited} other {# tags edited}}"
msgstr ""
diff --git a/packages/intl/scripts/generate-strings.mjs b/packages/intl/scripts/generate-strings.mjs
index e6bfc3e16..a1635f7c5 100644
--- a/packages/intl/scripts/generate-strings.mjs
+++ b/packages/intl/scripts/generate-strings.mjs
@@ -86,6 +86,7 @@ const ACTIONS = [
dataTypes: ["note", "notebook"]
},
{ action: "published", label: "published", dataTypes: ["note"] },
+ { action: "unpublished", label: "unpublished", dataTypes: ["note"] },
{
action: "restored",
label: "restored",