diff --git a/.version b/.version index 3eefcb9d..8ed371f3 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -1.0.0 +1.0.0-develop.3 diff --git a/package.json b/package.json index 1f8a925e..936f5938 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "note-me", "private": true, - "version": "1.0.0", + "version": "1.0.0-develop.3", "type": "module", "scripts": { "start": "vite", diff --git a/public/icon-512x512-apple.png b/public/icon-apple-512x512.png similarity index 100% rename from public/icon-512x512-apple.png rename to public/icon-apple-512x512.png diff --git a/scripts/webmanifest.js b/scripts/webmanifest.js index 75f9d49d..698f805c 100644 --- a/scripts/webmanifest.js +++ b/scripts/webmanifest.js @@ -2,7 +2,7 @@ import { readFile, writeFile } from 'fs'; readFile('./dist/manifest.webmanifest', 'utf8', (err, data) => { const webmanifest = JSON.parse(data); - const branchName = process.env.HEAD; + const branchName = process.env.HEAD || 'local'; if (branchName && branchName !== 'main') { webmanifest.name += ` (${branchName})`; @@ -11,7 +11,7 @@ readFile('./dist/manifest.webmanifest', 'utf8', (err, data) => { const webmanifestApple = JSON.parse(JSON.stringify(webmanifest)); webmanifestApple.icons = [ { - src: '/icon-512x512-apple.png', + src: '/icon-apple-512x512.png', sizes: '512x512', type: 'image/png', }, diff --git a/src/components/Page/index.tsx b/src/components/Page/index.tsx index 23310b84..c9da98a7 100644 --- a/src/components/Page/index.tsx +++ b/src/components/Page/index.tsx @@ -2,6 +2,7 @@ import { useAtom } from 'jotai'; import { ChevronLeftIcon, MenuIcon } from 'lucide-react'; import { Helmet } from 'react-helmet-async'; import { useHotkeys } from 'react-hotkeys-hook'; +import { useNavigate } from 'react-router-dom'; import { Button } from '@/components/Button'; import { drawerOpenAtom } from '@/context/navigation'; @@ -14,11 +15,17 @@ export function Page({ }: PageProps) { const [open, setOpen] = useAtom(drawerOpenAtom); const toggleOpen = () => setOpen((prevState) => !prevState); + const navigate = useNavigate(); useHotkeys('ctrl+b, meta+b', toggleOpen, { enableOnFormTags: true, }); + useHotkeys('ctrl+n, meta+n', () => navigate('/note/'), { + enableOnFormTags: true, + preventDefault: true, + }); + return ( <> diff --git a/src/components/Sidebar/Footer.tsx b/src/components/Sidebar/Footer.tsx index fd089b80..5373be30 100644 --- a/src/components/Sidebar/Footer.tsx +++ b/src/components/Sidebar/Footer.tsx @@ -8,7 +8,7 @@ import { Tooltip } from '@/components/Tooltip'; export function Footer() { return ( -