diff --git a/.vscode/settings.json b/.vscode/settings.json index 4c05394..065b86f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,5 +7,9 @@ }, "[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" - } + }, + "cSpell.words": [ + "treo", + "unnesaccary" + ] } diff --git a/electron-builder.yml b/electron-builder.yml index 3c8b383..7a3a978 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -1,5 +1,5 @@ appId: com.electron.app -productName: Notebook +productName: Treo directories: buildResources: build files: @@ -12,7 +12,7 @@ files: asarUnpack: - resources/** win: - executableName: Notebook + executableName: Treo nsis: artifactName: ${name}-${version}-setup.${ext} shortcutName: ${productName} diff --git a/package.json b/package.json index 10146f4..8f7c4d0 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "notebook", + "name": "treo", "version": "1.1.4", "description": "An Electron application with React and TypeScript", "main": "./out/main/index.js", diff --git a/src/renderer/index.html b/src/renderer/index.html index ddf12cf..b71ee0e 100644 --- a/src/renderer/index.html +++ b/src/renderer/index.html @@ -2,7 +2,7 @@ - Notebook + Treo ): - - - - - - - toggleSidebar()} /> ) diff --git a/src/renderer/src/components/home/components/notes-nav-actions.tsx b/src/renderer/src/components/home/components/notes-nav-actions.tsx index 4dff20f..25f1e7d 100644 --- a/src/renderer/src/components/home/components/notes-nav-actions.tsx +++ b/src/renderer/src/components/home/components/notes-nav-actions.tsx @@ -1,32 +1,6 @@ import React from 'react' -import { - ArrowDown, - ArrowUp, - Bell, - Copy, - CornerUpLeft, - CornerUpRight, - FileText, - GalleryVerticalEnd, - LineChart, - Link, - MoreHorizontal, - Settings2, - Star, - Trash, - Trash2 -} from 'lucide-react' +import { Star } from 'lucide-react' import { Button } from '../../ui/button' -import { - SidebarContent, - SidebarGroup, - SidebarGroupContent, - SidebarMenu, - SidebarMenuItem, - SidebarMenuButton, - Sidebar -} from '../../ui/sidebar' -import { Popover, PopoverContent, PopoverTrigger } from '../../ui/popover' import { formatDistanceToNow } from 'date-fns' import { useQueryClient } from '@tanstack/react-query' import { useLocation } from '@tanstack/react-router' @@ -36,69 +10,6 @@ import { mutationKeys } from '@renderer/constants/mutation-keys' import { Tooltip, TooltipContent, TooltipTrigger } from '@renderer/components/ui/tooltip' import { cn } from '@renderer/utils' -const data = [ - [ - { - label: 'Customize Page', - icon: Settings2 - }, - { - label: 'Turn into wiki', - icon: FileText - } - ], - [ - { - label: 'Copy Link', - icon: Link - }, - { - label: 'Duplicate', - icon: Copy - }, - { - label: 'Move to', - icon: CornerUpRight - }, - { - label: 'Move to Trash', - icon: Trash2 - } - ], - [ - { - label: 'Undo', - icon: CornerUpLeft - }, - { - label: 'View analytics', - icon: LineChart - }, - { - label: 'Version History', - icon: GalleryVerticalEnd - }, - { - label: 'Show delete pages', - icon: Trash - }, - { - label: 'Notifications', - icon: Bell - } - ], - [ - { - label: 'Import', - icon: ArrowUp - }, - { - label: 'Export', - icon: ArrowDown - } - ] -] - export function NotesNavActions(): React.JSX.Element { const queryClient = useQueryClient() const { pathname } = useLocation() @@ -118,53 +29,20 @@ export function NotesNavActions(): React.JSX.Element { includeSeconds: true })}`} - -
0 ? 'bg-blue-500' : 'bg-green-500' )} /> - Saved - - - - - - - - - - {data.map((group, index) => ( - - - - {group.map((item, index) => ( - - - {item.label} - - - ))} - - - - ))} - - - -
) } diff --git a/src/renderer/src/components/home/index.tsx b/src/renderer/src/components/home/index.tsx index 8ee0d8b..903232f 100644 --- a/src/renderer/src/components/home/index.tsx +++ b/src/renderer/src/components/home/index.tsx @@ -1,9 +1,6 @@ -import { SearchIcon } from 'lucide-react' import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from '../ui/resizable' import { Separator } from '../ui/separator' -import { Tabs, TabsContent, TabsList, TabsTrigger } from '../ui/tabs' import { TooltipProvider } from '../ui/tooltip' -import { Input } from '../ui/input' import { NoteInterface } from '@renderer/types/notes' import { NoteList } from './components/note-list' import { Outlet } from '@tanstack/react-router' @@ -25,41 +22,12 @@ export function Note({ Notes, defaultLayout = [12, 32, 48] }: NoteProps): React. }} > - -
-

Inbox

- - - - All Note - - - - Unread - - -
- - - -
-
-
- - - -
-
-
- - - - - - {/* - !item.read)} /> - */} -
+
+

All Notes

+
+ +
+
diff --git a/src/renderer/src/components/nav-main.tsx b/src/renderer/src/components/nav-main.tsx index 6b291f3..4a7f2e2 100644 --- a/src/renderer/src/components/nav-main.tsx +++ b/src/renderer/src/components/nav-main.tsx @@ -1,7 +1,4 @@ -'use client' - import { ChevronRight, type LucideIcon } from 'lucide-react' - import { Collapsible, CollapsibleContent, @@ -9,7 +6,6 @@ import { } from '@renderer/components/ui/collapsible' import { SidebarGroup, - SidebarGroupLabel, SidebarMenu, SidebarMenuButton, SidebarMenuItem, @@ -36,8 +32,6 @@ export function NavMain({ }): React.JSX.Element { return ( - Platform - {items.map((item) => ( - Projects - {projects.map((item) => ( @@ -43,52 +29,8 @@ export function NavProjects({ {item.name} - - - - - - - More - - - - - - - - View Project - - - - - - Share Project - - - - - - - - Delete Project - - - ))} - - - - - - More - - ) diff --git a/src/renderer/src/components/team-switcher.tsx b/src/renderer/src/components/team-switcher.tsx index dd0935a..7074a95 100644 --- a/src/renderer/src/components/team-switcher.tsx +++ b/src/renderer/src/components/team-switcher.tsx @@ -1,23 +1,5 @@ -'use client' - import * as React from 'react' -import { ChevronsUpDown, Plus } from 'lucide-react' - -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuLabel, - DropdownMenuSeparator, - DropdownMenuShortcut, - DropdownMenuTrigger -} from '@renderer/components/ui/dropdown-menu' -import { - SidebarMenu, - SidebarMenuButton, - SidebarMenuItem, - useSidebar -} from '@renderer/components/ui/sidebar' +import { SidebarMenu, SidebarMenuButton, SidebarMenuItem } from '@renderer/components/ui/sidebar' export function TeamSwitcher({ teams @@ -28,67 +10,26 @@ export function TeamSwitcher({ plan: string }[] }): React.JSX.Element { - const { isMobile } = useSidebar() - const [activeTeam, setActiveTeam] = React.useState(teams[0]) + // const { isMobile } = useSidebar() + const [activeTeam] = React.useState(teams[0]) return ( - - - -
- -
- -
- {activeTeam.name} - - {activeTeam.plan} -
- - -
-
- - - Teams - - {teams.map((team, index) => ( - setActiveTeam(team)} - > -
- -
- - {team.name} - - ⌘{index + 1} -
- ))} - - - - -
- -
- -
Add team
-
-
-
+ +
+ +
+ +
+ {activeTeam.name} + + {activeTeam.plan} +
+
) diff --git a/src/renderer/src/constants/query-keys.ts b/src/renderer/src/constants/query-keys.ts index 749b7cb..9c5332d 100644 --- a/src/renderer/src/constants/query-keys.ts +++ b/src/renderer/src/constants/query-keys.ts @@ -1,5 +1,6 @@ export const queryKeys = { 'all-notes': 'all-notes', - note: 'note' + note: 'note', + 'clipboard-data': 'clipboard-data' } export const allNoteKey = [queryKeys['all-notes']] diff --git a/src/renderer/src/routes/(home)/_home.tsx b/src/renderer/src/routes/(home)/_home.tsx index 7c56995..c09c362 100644 --- a/src/renderer/src/routes/(home)/_home.tsx +++ b/src/renderer/src/routes/(home)/_home.tsx @@ -37,7 +37,6 @@ export const Route = createFileRoute('/(home)/_home')({ return ( <> - ) diff --git a/src/renderer/src/routes/__root.tsx b/src/renderer/src/routes/__root.tsx index 514b5fa..35c85e6 100644 --- a/src/renderer/src/routes/__root.tsx +++ b/src/renderer/src/routes/__root.tsx @@ -21,7 +21,7 @@ export const Route = createRootRoute({ - +
@@ -39,13 +39,10 @@ export const Route = createRootRoute({
-
- - diff --git a/src/renderer/src/routes/settings/_settings.tsx b/src/renderer/src/routes/settings/_settings.tsx index 1e14a3e..bdaab32 100644 --- a/src/renderer/src/routes/settings/_settings.tsx +++ b/src/renderer/src/routes/settings/_settings.tsx @@ -38,25 +38,9 @@ export function SidebarNav({ className, items, ...props }: SidebarNavProps): Rea } const sidebarNavItems = [ - { - title: 'Profile', - href: '/settings/profile' - }, - { - title: 'Account', - href: '/settings/account' - }, { title: 'Appearance', href: '/settings/appearance' - }, - { - title: 'Notifications', - href: '/settings/notifications' - }, - { - title: 'Display', - href: '/settings/display' } ] @@ -75,7 +59,7 @@ export const Route = createFileRoute('/settings/_settings')({
-