diff --git a/apps/mobile/app/components/properties/items.tsx b/apps/mobile/app/components/properties/items.tsx index f0a0d199f..618b4e821 100644 --- a/apps/mobile/app/components/properties/items.tsx +++ b/apps/mobile/app/components/properties/items.tsx @@ -36,8 +36,6 @@ import Paragraph from "../ui/typography/paragraph"; const TOP_BAR_ITEMS: ActionId[] = [ "pin", "favorite", - "copy", - "share", "lock-unlock", "publish", "export", @@ -55,6 +53,8 @@ const BOTTOM_BAR_ITEMS: ActionId[] = [ "reminders", "attachments", "references", + "copy", + "share", "trash" ]; diff --git a/apps/mobile/app/hooks/use-actions.tsx b/apps/mobile/app/hooks/use-actions.tsx index 1975379e0..2557b9bc2 100644 --- a/apps/mobile/app/hooks/use-actions.tsx +++ b/apps/mobile/app/hooks/use-actions.tsx @@ -138,13 +138,14 @@ function isNotePinnedInNotifications(item: Item) { export const useActions = ({ close, - item, + item: propItem, customActionHandlers }: { item: Item; close: () => void; customActionHandlers?: Record void>; }) => { + const [item, setItem] = useState(propItem); const { colors } = useThemeColors(); const setMenuPins = useMenuStore((state) => state.setMenuPins); const [isPinnedToMenu, setIsPinnedToMenu] = useState( @@ -223,8 +224,7 @@ export const useActions = ({ } else if (item.type === "notebook") { await db.notebooks.pin(!item?.pinned, item.id); } - - close(); + setItem((await db.notes.note(item.id)) as Item); Navigation.queueRoutesForUpdate(); } @@ -588,8 +588,8 @@ export const useActions = ({ async function toggleLocalOnly() { if (!user) return; await db.notes.localOnly(!(item as Note).localOnly, item?.id); + setItem((await db.notes.note(item.id)) as Item); Navigation.queueRoutesForUpdate(); - close(); } const toggleReadyOnlyMode = async () => { @@ -602,8 +602,8 @@ export const useActions = ({ } }); }); + setItem((await db.notes.note(item.id)) as Item); Navigation.queueRoutesForUpdate(); - close(); }; const duplicateNote = async () => { @@ -632,8 +632,8 @@ export const useActions = ({ async function addToFavorites() { if (!item.id || item.type !== "note") return; await db.notes.favorite(!item.favorite, item.id); + setItem((await db.notes.note(item.id)) as Item); Navigation.queueRoutesForUpdate(); - close(); } async function pinToNotifications() { @@ -839,7 +839,7 @@ export const useActions = ({ }, { id: "attachments", - title: strings.attachments(), + title: strings.attachedFiles(), icon: "attachment", onPress: showAttachments }, diff --git a/packages/intl/locale/en.po b/packages/intl/locale/en.po index b1befce9f..07c7318b4 100644 --- a/packages/intl/locale/en.po +++ b/packages/intl/locale/en.po @@ -904,6 +904,10 @@ msgstr "Atleast 8 characters required" msgid "Attach image from URL" msgstr "Attach image from URL" +#: src/strings.ts:900 +msgid "Attached files" +msgstr "Attached files" + #: src/strings.ts:290 msgid "attachment" msgstr "attachment" @@ -3984,7 +3988,7 @@ msgstr "notebook" msgid "Notebook" msgstr "Notebook" -#: src/strings.ts:2452 +#: src/strings.ts:2453 msgid "Notebook added" msgstr "Notebook added" diff --git a/packages/intl/locale/pseudo-LOCALE.po b/packages/intl/locale/pseudo-LOCALE.po index deb4fb4f0..0e26b77f0 100644 --- a/packages/intl/locale/pseudo-LOCALE.po +++ b/packages/intl/locale/pseudo-LOCALE.po @@ -6,6 +6,12 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: @lingui/cli\n" "Language: pseudo-LOCALE\n" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Plural-Forms: \n" #: src/strings.ts:2393 msgid " \"Notebook > Notes\"" @@ -904,6 +910,10 @@ msgstr "" msgid "Attach image from URL" msgstr "" +#: src/strings.ts:900 +msgid "Attached files" +msgstr "" + #: src/strings.ts:290 msgid "attachment" msgstr "" @@ -3964,7 +3974,7 @@ msgstr "" msgid "Notebook" msgstr "" -#: src/strings.ts:2452 +#: src/strings.ts:2453 msgid "Notebook added" msgstr "" diff --git a/packages/intl/src/strings.ts b/packages/intl/src/strings.ts index 14df2480a..d78fcc301 100644 --- a/packages/intl/src/strings.ts +++ b/packages/intl/src/strings.ts @@ -896,6 +896,7 @@ $headline$: Use starting line of the note as title.`, notePreparingForShare: () => t`Preparing note for share`, removeFromNotebook: () => t`Remove from notebook`, attachments: () => t`Attachments`, + attachedFiles: () => t`Attached files`, history: () => t`History`, copyLink: () => t`Copy link`, linkCopied: () => t`Link copied`, @@ -914,8 +915,8 @@ $headline$: Use starting line of the note as title.`, duplicate: () => t`Duplicate`, remindMe: () => t`Remind me`, published: () => t`Published`, - unpinFromNotifications: () => t`Unpin from notifications`, - pinToNotifications: () => t`Pin to notifications`, + unpinFromNotifications: () => t`Unpin notification`, + pinToNotifications: () => t`Pin notification`, linkNotebooks: () => t`Link notebooks`, unlinkFromAll: () => t`Unlink from all`, removeFromAll: () => t`Remove from all`,