Skip to content

Commit

Permalink
Merge pull request #256 from afspeirs/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
afspeirs authored Mar 11, 2024
2 parents 05d56fc + 5d3a6be commit 9419010
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
1.0.0-develop.3
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "note-me",
"private": true,
"version": "1.0.0",
"version": "1.0.0-develop.3",
"type": "module",
"scripts": {
"start": "vite",
Expand Down
File renamed without changes
4 changes: 2 additions & 2 deletions scripts/webmanifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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})`;
Expand All @@ -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',
},
Expand Down
7 changes: 7 additions & 0 deletions src/components/Page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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 (
<>
<Helmet>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Sidebar/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Tooltip } from '@/components/Tooltip';
export function Footer() {
return (
<Card as="nav" aria-label="sidebar footer">
<ul role="list" className="flex gap-1 p-2">
<ul role="list" className="flex gap-2 p-2">
<li className="flex-1">
<Button
Icon={PlusIcon}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';

import { App } from '@/App';
import '@/index.css';
import '@/main.css';
import '@/webmanifest-apple';

createRoot(document.getElementById('root') as HTMLElement).render(
Expand Down

0 comments on commit 9419010

Please sign in to comment.