From 74b5e42492bcd52968ceb2fa59e3c7be0b08c9a0 Mon Sep 17 00:00:00 2001 From: Ammar Ahmed Date: Thu, 13 Feb 2025 10:41:15 +0500 Subject: [PATCH] mobile: finalize sidebar and list revamp --- apps/mobile/app/assets/images/assets.js | 13 + .../app/components/announcements/cta.js | 10 +- .../components/announcements/description.js | 4 +- .../components/announcements/subheading.js | 4 +- .../app/components/announcements/title.js | 6 +- .../app/components/app-lock-overlay/index.tsx | 4 +- .../app/components/attachments/actions.tsx | 18 +- .../attachments/attachment-item.tsx | 13 +- .../app/components/attachments/index.tsx | 10 +- apps/mobile/app/components/auth/common.js | 27 +- apps/mobile/app/components/auth/index.js | 85 ++- apps/mobile/app/components/auth/login.js | 35 +- .../app/components/auth/session-expired.js | 17 +- apps/mobile/app/components/auth/signup.js | 54 +- apps/mobile/app/components/auth/two-factor.js | 6 +- .../components/container/floating-button.tsx | 4 +- .../delay-layout/default-placeholder.tsx | 17 +- .../delay-layout/settings-placeholder.tsx | 11 +- .../app/components/dialog/base-dialog.tsx | 6 +- .../app/components/dialog/dialog-buttons.js | 13 +- .../app/components/dialog/dialog-header.tsx | 4 +- apps/mobile/app/components/dialog/index.js | 4 +- .../dialogs/applock-password/index.tsx | 6 +- .../dialogs/attach-image-dialog/index.tsx | 8 +- .../dialogs/jump-to-section/index.tsx | 6 +- .../components/dialogs/pdf-preview/index.js | 4 +- .../app/components/dialogs/progress/index.tsx | 4 +- .../app/components/dialogs/result/index.js | 10 +- .../components/dialogs/result/pro-features.js | 12 +- apps/mobile/app/components/header/index.tsx | 4 +- apps/mobile/app/components/header/title.tsx | 6 +- .../components/intro/{index.js => index.tsx} | 87 ++- apps/mobile/app/components/intro/welcome.js | 125 ---- .../list-items/headers/notebook-header.tsx | 24 +- .../list-items/headers/section-header.tsx | 27 +- .../app/components/list-items/note/index.tsx | 82 ++- .../components/list-items/notebook/index.tsx | 24 +- .../components/list-items/reminder/index.tsx | 20 +- .../selection-wrapper/selection.tsx | 4 +- .../app/components/list-items/tag/index.tsx | 10 +- apps/mobile/app/components/list/card.tsx | 34 +- apps/mobile/app/components/list/empty.tsx | 8 +- .../app/components/list/reorderable-list.tsx | 11 +- .../app/components/merge-conflicts/index.js | 10 +- .../app/components/note-history/index.tsx | 8 +- .../app/components/premium/component.js | 33 +- .../mobile/app/components/premium/expiring.js | 10 +- apps/mobile/app/components/premium/feature.js | 12 +- apps/mobile/app/components/premium/group.js | 25 +- apps/mobile/app/components/premium/offer.js | 4 +- .../app/components/premium/premium-toast.js | 6 +- .../app/components/premium/pricing-item.tsx | 10 +- .../app/components/premium/pricing-plans.tsx | 43 +- .../app/components/properties/color-tags.tsx | 13 +- .../app/components/properties/date-meta.js | 6 +- .../mobile/app/components/properties/index.js | 31 +- .../app/components/properties/items.tsx | 142 +++-- .../app/components/properties/notebooks.js | 74 ++- .../app/components/properties/synced.js | 6 +- apps/mobile/app/components/properties/tags.js | 6 +- .../app/components/selection-header/index.tsx | 8 +- .../app/components/sheet-provider/index.js | 10 +- .../components/sheets/add-notebook/index.tsx | 6 +- .../app/components/sheets/add-to/index.tsx | 4 +- .../sheets/add-to/notebook-item.tsx | 12 +- .../components/sheets/editor-tabs/index.tsx | 16 +- .../components/sheets/export-notes/index.tsx | 20 +- .../components/sheets/export-notes/share.jsx | 6 +- .../app/components/sheets/github/issue.js | 18 +- .../app/components/sheets/link-note/index.tsx | 15 +- .../components/sheets/manage-tags/index.tsx | 16 +- .../components/sheets/move-notebook/index.tsx | 4 +- .../components/sheets/move-notes/movenote.tsx | 6 +- .../components/sheets/new-feature/index.tsx | 6 +- .../sheets/notebook-sheet/index.tsx | 16 +- .../app/components/sheets/progress/index.tsx | 4 +- .../components/sheets/publish-note/index.tsx | 34 +- .../app/components/sheets/rate-app/index.js | 10 +- .../components/sheets/recovery-key/index.jsx | 18 +- .../components/sheets/references/index.tsx | 13 +- .../sheets/relations-list/index.tsx | 4 +- .../sheets/reminder-notify/index.tsx | 8 +- .../app/components/sheets/reminder/index.tsx | 21 +- .../app/components/sheets/sort/index.tsx | 199 +++--- .../app/components/sheets/toc/index.tsx | 6 +- .../app/components/sheets/update/index.js | 10 +- .../app/components/sheets/user/index.tsx | 121 ++-- .../mobile/app/components/side-menu/index.tsx | 302 +++++---- .../app/components/side-menu/menu-item.tsx | 15 +- .../components/side-menu/side-menu-header.tsx | 98 ++- .../components/side-menu/side-menu-home.tsx | 11 +- .../side-menu/side-menu-list-empty.tsx | 61 ++ .../side-menu/side-menu-notebooks.tsx | 195 ++++-- .../components/side-menu/side-menu-tags.tsx | 279 +++++--- .../app/components/side-menu/user-status.js | 27 +- apps/mobile/app/components/tip/index.tsx | 12 +- apps/mobile/app/components/toast/index.tsx | 10 +- .../app/components/ui/AppIcon/index.tsx | 8 +- .../mobile/app/components/ui/button/index.tsx | 8 +- .../app/components/ui/icon-button/index.tsx | 4 +- apps/mobile/app/components/ui/input/index.tsx | 14 +- .../mobile/app/components/ui/notice/index.tsx | 6 +- .../app/components/ui/pressable/index.tsx | 8 +- .../app/components/ui/reminder-time/index.tsx | 8 +- apps/mobile/app/components/ui/tag/index.tsx | 4 +- .../app/components/ui/typography/heading.tsx | 10 +- .../components/ui/typography/paragraph.tsx | 8 +- .../app/components/walkthroughs/index.tsx | 4 +- .../components/walkthroughs/walkthroughs.tsx | 36 +- apps/mobile/app/hooks/use-actions.tsx | 11 +- .../app/navigation/navigation-stack.tsx | 55 +- apps/mobile/app/screens/editor/loading.tsx | 20 +- .../app/screens/editor/readonly-editor.tsx | 17 +- .../editor/tiptap/use-editor-events.tsx | 6 +- apps/mobile/app/screens/home/filter-bar.tsx | 4 +- apps/mobile/app/screens/home/index.tsx | 3 - apps/mobile/app/screens/notebook/index.tsx | 5 +- apps/mobile/app/screens/search/search-bar.tsx | 10 +- apps/mobile/app/screens/settings/2fa.tsx | 18 +- apps/mobile/app/screens/settings/app-lock.js | 10 +- .../mobile/app/screens/settings/appearance.js | 4 +- .../settings/attachment-group-progress.tsx | 4 +- .../settings/editor/configure-toolbar.tsx | 6 +- .../app/screens/settings/editor/group.tsx | 12 +- .../screens/settings/editor/tool-sheet.tsx | 6 +- .../app/screens/settings/editor/tool.tsx | 10 +- apps/mobile/app/screens/settings/licenses.tsx | 4 +- .../app/screens/settings/picker/index.tsx | 12 +- .../screens/settings/restore-backup/index.tsx | 13 +- .../app/screens/settings/section-group.tsx | 4 +- .../app/screens/settings/section-item.tsx | 15 +- .../app/screens/settings/sound-picker.tsx | 4 +- .../app/screens/settings/subscription.js | 6 +- .../app/screens/settings/theme-selector.tsx | 46 +- .../app/screens/settings/title-format.tsx | 4 +- .../app/screens/settings/user-section.js | 20 +- apps/mobile/app/services/message.js | 16 +- apps/mobile/app/services/navigation.ts | 14 +- .../app/stores/create-notebook-tree-stores.ts | 23 +- .../mobile/app/stores/use-navigation-store.ts | 8 +- apps/mobile/app/utils/functions.ts | 12 + apps/mobile/app/utils/global-refs.ts | 8 +- apps/mobile/app/utils/size/index.js | 8 +- .../native/fonts/MaterialCommunityIcons.ttf | Bin 26276 -> 26372 bytes apps/mobile/scripts/optimize-fonts.mjs | 3 +- apps/mobile/share/add-notebooks.jsx | 3 +- apps/mobile/share/add-tags.jsx | 3 +- apps/mobile/share/editor.js | 7 +- apps/mobile/share/share.js | 18 +- .../public/fonts/Inter-Black.ttf | Bin 0 -> 419968 bytes .../public/fonts/Inter-BlackItalic.ttf | Bin 0 -> 428036 bytes .../editor-mobile/public/fonts/Inter-Bold.ttf | Bin 0 -> 420428 bytes .../public/fonts/Inter-BoldItalic.ttf | Bin 0 -> 425296 bytes .../public/fonts/Inter-ExtraBold.ttf | Bin 0 -> 421796 bytes .../public/fonts/Inter-ExtraBoldItalic.ttf | Bin 0 -> 428284 bytes .../public/fonts/Inter-ExtraLight.ttf | Bin 0 -> 414676 bytes .../public/fonts/Inter-ExtraLightItalic.ttf | Bin 0 -> 420260 bytes .../public/fonts/Inter-Italic.ttf | Bin 0 -> 417388 bytes .../public/fonts/Inter-Light.ttf | Bin 0 -> 412844 bytes .../public/fonts/Inter-LightItalic.ttf | Bin 0 -> 419468 bytes .../public/fonts/Inter-Medium.ttf | Bin 0 -> 417300 bytes .../public/fonts/Inter-MediumItalic.ttf | Bin 0 -> 423452 bytes .../public/fonts/Inter-Regular.ttf | Bin 0 -> 411640 bytes .../public/fonts/Inter-SemiBold.ttf | Bin 0 -> 419744 bytes .../public/fonts/Inter-SemiBoldItalic.ttf | Bin 0 -> 423976 bytes .../editor-mobile/public/fonts/Inter-Thin.ttf | Bin 0 -> 406736 bytes .../public/fonts/Inter-ThinItalic.ttf | Bin 0 -> 413532 bytes packages/intl/locale/pseudo-LOCALE.po | 600 +++++++++--------- packages/intl/src/strings.ts | 2 + 169 files changed, 2272 insertions(+), 1841 deletions(-) rename apps/mobile/app/components/intro/{index.js => index.tsx} (66%) delete mode 100644 apps/mobile/app/components/intro/welcome.js create mode 100644 apps/mobile/app/components/side-menu/side-menu-list-empty.tsx create mode 100644 packages/editor-mobile/public/fonts/Inter-Black.ttf create mode 100644 packages/editor-mobile/public/fonts/Inter-BlackItalic.ttf create mode 100644 packages/editor-mobile/public/fonts/Inter-Bold.ttf create mode 100644 packages/editor-mobile/public/fonts/Inter-BoldItalic.ttf create mode 100644 packages/editor-mobile/public/fonts/Inter-ExtraBold.ttf create mode 100644 packages/editor-mobile/public/fonts/Inter-ExtraBoldItalic.ttf create mode 100644 packages/editor-mobile/public/fonts/Inter-ExtraLight.ttf create mode 100644 packages/editor-mobile/public/fonts/Inter-ExtraLightItalic.ttf create mode 100644 packages/editor-mobile/public/fonts/Inter-Italic.ttf create mode 100644 packages/editor-mobile/public/fonts/Inter-Light.ttf create mode 100644 packages/editor-mobile/public/fonts/Inter-LightItalic.ttf create mode 100644 packages/editor-mobile/public/fonts/Inter-Medium.ttf create mode 100644 packages/editor-mobile/public/fonts/Inter-MediumItalic.ttf create mode 100644 packages/editor-mobile/public/fonts/Inter-Regular.ttf create mode 100644 packages/editor-mobile/public/fonts/Inter-SemiBold.ttf create mode 100644 packages/editor-mobile/public/fonts/Inter-SemiBoldItalic.ttf create mode 100644 packages/editor-mobile/public/fonts/Inter-Thin.ttf create mode 100644 packages/editor-mobile/public/fonts/Inter-ThinItalic.ttf diff --git a/apps/mobile/app/assets/images/assets.js b/apps/mobile/app/assets/images/assets.js index fe98326e0..56190c801 100644 --- a/apps/mobile/app/assets/images/assets.js +++ b/apps/mobile/app/assets/images/assets.js @@ -29,3 +29,16 @@ export const SUPPORT_SVG = () => export const WELCOME_SVG = (color) => ``; + +export const NOTESNOOK_LOGO_SVG = ` + + + + + + + + + + +`; diff --git a/apps/mobile/app/components/announcements/cta.js b/apps/mobile/app/components/announcements/cta.js index 2516450a4..6c53315a4 100644 --- a/apps/mobile/app/components/announcements/cta.js +++ b/apps/mobile/app/components/announcements/cta.js @@ -23,7 +23,7 @@ import { Linking, View } from "react-native"; import { useThemeColors } from "@notesnook/theme"; import { eSendEvent, presentSheet } from "../../services/event-manager"; import { eCloseAnnouncementDialog } from "../../utils/events"; -import { SIZE } from "../../utils/size"; +import { AppFontSize } from "../../utils/size"; import { sleep } from "../../utils/time"; import { PricingPlans } from "../premium/pricing-plans"; import SheetProvider from "../sheet-provider"; @@ -75,7 +75,7 @@ export const Cta = ({ actions, style = {}, color, inline }) => {