feat: add QR scanner, improve UX, and simplify navigation
- Add live camera QR scanner for nsec/ncryptsec login - Replace browser prompt() with proper password dialog for ncryptsec - Add missing /notes/:id route for thread view navigation - Remove explore section entirely (button, page, routes) - Remove profile button from bottom nav, avatar now opens profile - Remove "Notes" tab from feed, default to showing all posts/replies - Add PasswordPromptProvider for secure password input - Add SidebarDrawer for mobile navigation - Add domain layer with value objects and adapters - Various UI and navigation improvements 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,6 @@ import { useUserPreferences } from '@/providers/UserPreferencesProvider'
|
||||
import { ChevronsLeft, ChevronsRight } from 'lucide-react'
|
||||
import AccountButton from './AccountButton'
|
||||
import BookmarkButton from './BookmarkButton'
|
||||
import RelaysButton from './ExploreButton'
|
||||
import HomeButton from './HomeButton'
|
||||
import LayoutSwitcher from './LayoutSwitcher'
|
||||
import NotificationsButton from './NotificationButton'
|
||||
@@ -19,7 +18,7 @@ import SearchButton from './SearchButton'
|
||||
import SettingsButton from './SettingsButton'
|
||||
|
||||
export default function PrimaryPageSidebar() {
|
||||
const { isSmallScreen } = useScreenSize()
|
||||
const { isSmallScreen, isNarrowDesktop } = useScreenSize()
|
||||
const { themeSetting } = useTheme()
|
||||
const { sidebarCollapse, updateSidebarCollapse, enableSingleColumnLayout } = useUserPreferences()
|
||||
const { pubkey } = useNostr()
|
||||
@@ -27,15 +26,18 @@ export default function PrimaryPageSidebar() {
|
||||
|
||||
if (isSmallScreen) return null
|
||||
|
||||
// Force collapsed mode in narrow desktop (768-1024px)
|
||||
const isCollapsed = isNarrowDesktop || sidebarCollapse
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
'relative flex flex-col pb-2 pt-3 justify-between h-full shrink-0',
|
||||
sidebarCollapse ? 'px-2 w-16' : 'px-4 w-52'
|
||||
'relative flex flex-col pb-2 pt-3 justify-between h-full shrink-0 bg-chrome-background',
|
||||
isCollapsed ? 'px-2 w-16' : 'px-4 w-52'
|
||||
)}
|
||||
>
|
||||
<div className="space-y-2">
|
||||
{sidebarCollapse ? (
|
||||
{isCollapsed ? (
|
||||
<button
|
||||
className="px-3 py-1 mb-4 w-full cursor-pointer hover:opacity-80 transition-opacity"
|
||||
onClick={() => navigate('home')}
|
||||
@@ -52,31 +54,32 @@ export default function PrimaryPageSidebar() {
|
||||
<Logo />
|
||||
</button>
|
||||
)}
|
||||
<HomeButton collapse={sidebarCollapse} />
|
||||
<RelaysButton collapse={sidebarCollapse} />
|
||||
<NotificationsButton collapse={sidebarCollapse} />
|
||||
<SearchButton collapse={sidebarCollapse} />
|
||||
<ProfileButton collapse={sidebarCollapse} />
|
||||
{pubkey && <BookmarkButton collapse={sidebarCollapse} />}
|
||||
<SettingsButton collapse={sidebarCollapse} />
|
||||
<PostButton collapse={sidebarCollapse} />
|
||||
<HomeButton collapse={isCollapsed} />
|
||||
<NotificationsButton collapse={isCollapsed} />
|
||||
<SearchButton collapse={isCollapsed} />
|
||||
<ProfileButton collapse={isCollapsed} />
|
||||
{pubkey && <BookmarkButton collapse={isCollapsed} />}
|
||||
<SettingsButton collapse={isCollapsed} />
|
||||
<PostButton collapse={isCollapsed} />
|
||||
</div>
|
||||
<div className="space-y-4">
|
||||
<LayoutSwitcher collapse={sidebarCollapse} />
|
||||
<AccountButton collapse={sidebarCollapse} />
|
||||
<LayoutSwitcher collapse={isCollapsed} />
|
||||
<AccountButton collapse={isCollapsed} />
|
||||
</div>
|
||||
<button
|
||||
className={cn(
|
||||
'absolute flex flex-col justify-center items-center right-0 w-5 h-6 p-0 rounded-l-md hover:shadow-md text-muted-foreground hover:text-foreground hover:bg-background transition-colors [&_svg]:size-4',
|
||||
themeSetting === 'pure-black' || enableSingleColumnLayout ? 'top-3' : 'top-5'
|
||||
)}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
updateSidebarCollapse(!sidebarCollapse)
|
||||
}}
|
||||
>
|
||||
{sidebarCollapse ? <ChevronsRight /> : <ChevronsLeft />}
|
||||
</button>
|
||||
{!isNarrowDesktop && (
|
||||
<button
|
||||
className={cn(
|
||||
'absolute flex flex-col justify-center items-center right-0 w-5 h-6 p-0 rounded-l-md hover:shadow-md text-muted-foreground hover:text-foreground hover:bg-background transition-colors [&_svg]:size-4',
|
||||
themeSetting === 'pure-black' || enableSingleColumnLayout ? 'top-3' : 'top-5'
|
||||
)}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
updateSidebarCollapse(!sidebarCollapse)
|
||||
}}
|
||||
>
|
||||
{sidebarCollapse ? <ChevronsRight /> : <ChevronsLeft />}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user