mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
mobile: minor improvements
This commit is contained in:
committed by
Abdullah Atta
parent
20866ab2f5
commit
b7f5a5dc66
@@ -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"
|
||||
];
|
||||
|
||||
|
||||
@@ -138,13 +138,14 @@ function isNotePinnedInNotifications(item: Item) {
|
||||
|
||||
export const useActions = ({
|
||||
close,
|
||||
item,
|
||||
item: propItem,
|
||||
customActionHandlers
|
||||
}: {
|
||||
item: Item;
|
||||
close: () => void;
|
||||
customActionHandlers?: Record<ActionId, () => 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
|
||||
},
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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 ""
|
||||
|
||||
|
||||
@@ -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`,
|
||||
|
||||
Reference in New Issue
Block a user