feat(desktop): information architecture overhaul — home, records, meetings first
Wave 2 of the 2026-09-28 design overhaul ("records are the main
character, a quiet instrument"). Decisions: design.md.
- Shell: sidebar with primary Home / Records / Meetings (Ctrl+1..3) and a
secondary "Tools" group; every item is a button with aria-current.
The status bar is removed — its "100% LOCAL PRIVACY · ZERO CLOUD SYNC"
claim contradicted device sync; the sidebar shows only queried state.
- Navigation context (routes, params, back, useRouteRequest) so Home can
open a specific meeting or record.
- Home replaces the dashboard: dictation key, start actions, only real
problems, one-line summary, recent records and meetings, file
transcription, free-tier limits.
- Settings become a full-screen route with vertical tabs (tabs no longer
clip) and a shared row grammar; long-standing bugs fixed: team and
enterprise tiers crashed the license tab (currentTier undefined),
first-run onboarding could not be left, Pro+ saw "upgrade to Pro+".
- Records: date-grouped single list with in-place expansion, search and
tags together, mode/favorite filters, load more past 50, undoable
delete. Meetings: list with search/rename/delete, summary-first detail
(summary | transcript | documents | my notes), notes persisted locally
instead of being lost. Tools pages cleaned up; stale-closure example
chips and a 1550x mouse-distance bug fixed.
- Shared pieces: PageHeader, EmptyStateCard, SearchInput ("/" works),
ConfirmDialog, notify with undo; display-labels maps domain values to
typed i18n keys so missing keys fail to compile.
- Mono font stack falls back to Pretendard for Hangul (Korean labels no
longer render spaced out).
- i18n: new ko/en keys via scripts/i18n-add-keys.mjs (one read-merge-
write so parallel editors cannot clobber locale files).
Some renderer files also carried pre-existing in-flight changes (error
recovery deep links, meeting document hooks); they are included as-is.
This commit is contained in:
parent
ba9ef9741e
commit
f064c93197
96 changed files with 12886 additions and 8924 deletions
|
|
@ -1,22 +1,18 @@
|
|||
// src/renderer/components/AppLayout.tsx
|
||||
// v3 "Tactile Liquid & Midnight Glass": Borderless Shell with Floating Island Navigation
|
||||
// 메인 창 셸 — 2026-09-28 정보 구조 개편 ("기록이 주인공인 조용한 계기").
|
||||
// 타이틀바 · 사이드바(1급 홈·기록·회의 / 도구 / 설정) · 본문. 상태바는 없앴다:
|
||||
// 버전·모델은 설정에, 시계는 OS 에 있고, "100% LOCAL PRIVACY · ZERO CLOUD SYNC"는 기기 간 동기화와 모순된 문구였다.
|
||||
// 의미 있는 상태(로컬 AI 연결·자막·회의 녹음 중)는 사이드바 아래 한 줄로 옮겼다.
|
||||
|
||||
import React, { useState, useEffect } from 'react'
|
||||
import { Alert, Box, Snackbar, Typography } from '@mui/material'
|
||||
import {
|
||||
LayoutDashboard,
|
||||
History as HistoryIcon,
|
||||
BookOpen,
|
||||
SquareTerminal,
|
||||
MessagesSquare,
|
||||
Library,
|
||||
Users,
|
||||
Settings,
|
||||
Headphones,
|
||||
} from 'lucide-react'
|
||||
import React, { useState, useEffect, useCallback } from 'react'
|
||||
import { Alert, Box, Button, IconButton, Snackbar } from '@mui/material'
|
||||
import { X } from 'lucide-react'
|
||||
import { OverlayScrollbarsComponent } from 'overlayscrollbars-react'
|
||||
import { Led, TactileBadge } from '@d3ro/ui/components/ds'
|
||||
import { DashboardPage } from '../pages/DashboardPage'
|
||||
import type { OverlayScrollbarsComponentRef } from 'overlayscrollbars-react'
|
||||
import { d3roPalette } from '@d3ro/ui/theme'
|
||||
import { useI18n } from '@d3ro/i18n'
|
||||
import type { LicenseTier } from '@d3ro/core/types'
|
||||
import { HomePage } from '../pages/HomePage'
|
||||
import { HistoryPage } from '../pages/HistoryPage'
|
||||
import { DictionaryPage } from '../pages/DictionaryPage'
|
||||
import { CommandsPage } from '../pages/CommandsPage'
|
||||
|
|
@ -24,66 +20,54 @@ import { VoiceConversationPage } from '../pages/VoiceConversationPage'
|
|||
import { KnowledgeBasePage } from '../pages/KnowledgeBasePage'
|
||||
import { MeetingModePage } from '../pages/MeetingModePage'
|
||||
import { SettingsModal } from './SettingsModal'
|
||||
import { DEFAULT_SETTINGS_TAB, OPEN_SETTINGS_EVENT, readOpenSettingsTab } from '../navigation/settingsTabs'
|
||||
import { OPEN_SETTINGS_EVENT, readOpenSettingsTab, DEFAULT_SETTINGS_TAB } from '../navigation/settingsTabs'
|
||||
import type { SettingsTabId } from '../navigation/settingsTabs'
|
||||
import { presentError, settingsTabOf } from '../navigation/error-recovery'
|
||||
import { AppNavigationProvider, PRIMARY_ROUTES, useAppNavigation, useRouteRequest } from '../navigation/app-navigation'
|
||||
import { LicenseModal } from './LicenseModal'
|
||||
import { OnboardingModal } from './OnboardingModal'
|
||||
import { OllamaGuideModal } from './OllamaGuideModal'
|
||||
import { AdBanner } from './ads/AdBanner'
|
||||
import { RewardedQuotaModal } from './ads/RewardedQuotaModal'
|
||||
import { SupportModal } from './support/SupportModal'
|
||||
import { StatusBar } from './StatusBar'
|
||||
import { TitleBar } from './TitleBar'
|
||||
import { d3roPalette, d3roFontSans, d3roFontMono, d3roTypo, d3roRadius, d3roShadow } from '@d3ro/ui/theme'
|
||||
import { useI18n } from '@d3ro/i18n'
|
||||
import type { TranslationKey } from '@d3ro/i18n'
|
||||
import type { LicenseTier } from '@d3ro/core/types'
|
||||
import { AppSidebar } from './shell/AppSidebar'
|
||||
import { NotifyProvider, useNotify } from './shared'
|
||||
|
||||
type Route = 'dashboard' | 'history' | 'dictionary' | 'commands' | 'conversation' | 'knowledge' | 'meeting'
|
||||
|
||||
interface NavItem {
|
||||
route: Route
|
||||
labelKey: TranslationKey
|
||||
icon: React.ReactElement
|
||||
/** 입력 요소에 포커스가 있으면 전역 단축키를 무시한다 — 타자 중에 화면이 바뀌면 안 된다. */
|
||||
function isTypingTarget(target: EventTarget | null): boolean {
|
||||
if (!(target instanceof HTMLElement)) return false
|
||||
return target.isContentEditable || ['INPUT', 'TEXTAREA', 'SELECT'].includes(target.tagName)
|
||||
}
|
||||
|
||||
const ICON_SIZE = 18
|
||||
|
||||
const NAV_ITEMS: NavItem[] = [
|
||||
{ route: 'dashboard', labelKey: 'nav.dashboard', icon: <LayoutDashboard size={ICON_SIZE} /> },
|
||||
{ route: 'history', labelKey: 'nav.history', icon: <HistoryIcon size={ICON_SIZE} /> },
|
||||
{ route: 'dictionary', labelKey: 'nav.dictionary', icon: <BookOpen size={ICON_SIZE} /> },
|
||||
{ route: 'commands', labelKey: 'nav.commands', icon: <SquareTerminal size={ICON_SIZE} /> },
|
||||
{ route: 'conversation', labelKey: 'nav.conversation', icon: <MessagesSquare size={ICON_SIZE} /> },
|
||||
{ route: 'knowledge', labelKey: 'nav.knowledge', icon: <Library size={ICON_SIZE} /> },
|
||||
{ route: 'meeting', labelKey: 'nav.meeting', icon: <Users size={ICON_SIZE} /> },
|
||||
]
|
||||
|
||||
function tierToLedColor(tier: LicenseTier): 'amber' | 'green' {
|
||||
switch (tier) {
|
||||
case 'free':
|
||||
return 'amber'
|
||||
case 'pro':
|
||||
case 'pro_plus':
|
||||
case 'team':
|
||||
case 'enterprise':
|
||||
return 'green'
|
||||
default:
|
||||
return 'amber'
|
||||
}
|
||||
}
|
||||
|
||||
export function AppLayout(): React.ReactElement {
|
||||
function Shell(): React.ReactElement {
|
||||
const { t } = useI18n()
|
||||
const [currentRoute, setCurrentRoute] = useState<Route>('dashboard')
|
||||
const [settingsOpen, setSettingsOpen] = useState(false)
|
||||
const [settingsInitialTab, setSettingsInitialTab] = useState<SettingsTabId>(DEFAULT_SETTINGS_TAB)
|
||||
const { route, navigate, back } = useAppNavigation()
|
||||
const notify = useNotify()
|
||||
const [settingsTab, setSettingsTab] = useState<SettingsTabId>(DEFAULT_SETTINGS_TAB)
|
||||
const [onboardingOpen, setOnboardingOpen] = useState(false)
|
||||
const [licenseModalOpen, setLicenseModalOpen] = useState(false)
|
||||
const [supportModalOpen, setSupportModalOpen] = useState(false)
|
||||
const [rewardedModalOpen, setRewardedModalOpen] = useState(false)
|
||||
const [ollamaGuideOpen, setOllamaGuideOpen] = useState(false)
|
||||
const [currentTier, setCurrentTier] = useState<LicenseTier>('free')
|
||||
const [fallbackMsg, setFallbackMsg] = useState<string | null>(null)
|
||||
const [voiceAlert, setVoiceAlert] = useState<{ message: string; severity: 'error' | 'warning' } | null>(null)
|
||||
const [voiceAlert, setVoiceAlert] = useState<{
|
||||
message: string
|
||||
severity: 'error' | 'warning'
|
||||
/** 복구 딥링크(예: STT 모델 없음 → 설정 → STT). 없으면 닫기만. */
|
||||
settingsTab: SettingsTabId | null
|
||||
} | null>(null)
|
||||
const scrollRef = React.useRef<OverlayScrollbarsComponentRef>(null)
|
||||
|
||||
// 화면을 바꾸면 새 화면은 맨 위에서 시작한다
|
||||
useEffect(() => {
|
||||
scrollRef.current?.osInstance()?.elements().viewport.scrollTo({ top: 0 })
|
||||
}, [route])
|
||||
|
||||
useRouteRequest('settings', (params) => {
|
||||
if (params.settingsTab) setSettingsTab(params.settingsTab)
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
window.electronAPI.config.getAll().then((r) => {
|
||||
|
|
@ -106,28 +90,27 @@ export function AppLayout(): React.ReactElement {
|
|||
setLicenseModalOpen(true)
|
||||
})
|
||||
|
||||
const handleOpenLicenseModal = () => setLicenseModalOpen(true)
|
||||
const handleOpenLicenseModal = (): void => setLicenseModalOpen(true)
|
||||
window.addEventListener('d3ro:open-license-modal', handleOpenLicenseModal)
|
||||
|
||||
// detail.tab 은 타입 없는 DOM 경계라 검증한다 — 모르는 값이면 기본 탭(빈 설정 창 방지)
|
||||
const handleOpenSettings = (e: Event) => {
|
||||
setSettingsInitialTab(readOpenSettingsTab(e))
|
||||
setSettingsOpen(true)
|
||||
// detail.tab 은 타입 없는 DOM 경계라 검증한다 — 모르는 값이면 기본 탭(빈 설정 화면 방지)
|
||||
const handleOpenSettings = (e: Event): void => {
|
||||
const tab = readOpenSettingsTab(e)
|
||||
setSettingsTab(tab)
|
||||
navigate('settings', { settingsTab: tab })
|
||||
}
|
||||
window.addEventListener(OPEN_SETTINGS_EVENT, handleOpenSettings)
|
||||
|
||||
const handleOpenGuide = (): void => setOllamaGuideOpen(true)
|
||||
window.addEventListener('d3ro:open-ollama-guide', handleOpenGuide)
|
||||
|
||||
const unsubVoiceError = window.electronAPI.voice.onError((e) => {
|
||||
// 분류·복구는 error-recovery 정책이 정한다. STT 모델 없음(101)은 예전처럼 닫을 수 없는 온보딩을
|
||||
// 열지 않고, 모델을 받을 수 있는 설정 → STT 탭으로 가는 동작을 알림에 붙인다.
|
||||
const severity = e.severity ?? 'error'
|
||||
let message = e.message
|
||||
if (e.errorCode === 101) {
|
||||
message = t('voice.error.modelMissing')
|
||||
setOnboardingOpen(true)
|
||||
} else if (e.errorCode === 103 || (e.errorCode >= 130 && e.errorCode <= 132)) {
|
||||
message = t('voice.error.engine')
|
||||
} else if (severity === 'warning' && e.errorCode === 300) {
|
||||
message = t('voice.warning.llmSkipped')
|
||||
}
|
||||
setVoiceAlert({ message, severity })
|
||||
const presentation = presentError({ context: 'voice', code: e.errorCode, severity })
|
||||
const message = presentation.messageKey ? t(presentation.messageKey) : e.message
|
||||
setVoiceAlert({ message, severity, settingsTab: settingsTabOf(presentation) })
|
||||
})
|
||||
|
||||
const unsubFallback = window.electronAPI.llm.premium.onFallback((e) => {
|
||||
|
|
@ -145,213 +128,52 @@ export function AppLayout(): React.ReactElement {
|
|||
unsubVoiceError()
|
||||
window.removeEventListener('d3ro:open-license-modal', handleOpenLicenseModal)
|
||||
window.removeEventListener(OPEN_SETTINGS_EVENT, handleOpenSettings)
|
||||
window.removeEventListener('d3ro:open-ollama-guide', handleOpenGuide)
|
||||
}
|
||||
}, [t])
|
||||
}, [t, navigate])
|
||||
|
||||
// 키보드: Ctrl+1..3 = 1급 화면, Ctrl+, = 설정. 입력 중에는 무시.
|
||||
useEffect(() => {
|
||||
const onKeyDown = (e: KeyboardEvent): void => {
|
||||
if (!(e.ctrlKey || e.metaKey) || e.altKey || e.shiftKey || isTypingTarget(e.target)) return
|
||||
const index = ['1', '2', '3'].indexOf(e.key)
|
||||
if (index >= 0) {
|
||||
e.preventDefault()
|
||||
navigate(PRIMARY_ROUTES[index])
|
||||
} else if (e.key === ',') {
|
||||
e.preventDefault()
|
||||
navigate('settings')
|
||||
}
|
||||
}
|
||||
window.addEventListener('keydown', onKeyDown)
|
||||
return () => window.removeEventListener('keydown', onKeyDown)
|
||||
}, [navigate])
|
||||
|
||||
const openSettingsTab = useCallback(
|
||||
(tab: SettingsTabId) => {
|
||||
setSettingsTab(tab)
|
||||
navigate('settings', { settingsTab: tab })
|
||||
},
|
||||
[navigate],
|
||||
)
|
||||
|
||||
return (
|
||||
<Box sx={{ display: 'flex', height: '100vh', flexDirection: 'column', bgcolor: d3roPalette.bg.app }}>
|
||||
<TitleBar />
|
||||
<Box sx={{ display: 'flex', flex: 1, overflow: 'hidden' }}>
|
||||
{/* ── Sidebar: Floating Island Aesthetic ─── */}
|
||||
<Box
|
||||
sx={{
|
||||
width: 184,
|
||||
flexShrink: 0,
|
||||
bgcolor: d3roPalette.bg.sidebar,
|
||||
borderRight: `1px solid ${d3roPalette.glass.hairline}`,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
px: 1.75,
|
||||
pt: 2,
|
||||
pb: 2,
|
||||
gap: 0.6,
|
||||
}}
|
||||
>
|
||||
{/* Brand Logo & Tier Badge */}
|
||||
<Box sx={{ px: 1.25, mb: 3.5, display: 'flex', flexDirection: 'column', gap: 0.5 }}>
|
||||
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
|
||||
<Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>
|
||||
<Led color={tierToLedColor(currentTier)} pulse={currentTier !== 'free'} size={8} />
|
||||
<Typography
|
||||
sx={{
|
||||
fontFamily: d3roFontSans,
|
||||
fontSize: '20px',
|
||||
fontWeight: 600,
|
||||
letterSpacing: '-0.02em',
|
||||
backgroundImage: d3roPalette.gradient.logo,
|
||||
backgroundClip: 'text',
|
||||
WebkitBackgroundClip: 'text',
|
||||
color: 'transparent',
|
||||
lineHeight: 1.1,
|
||||
}}
|
||||
>
|
||||
D3RO
|
||||
</Typography>
|
||||
</Box>
|
||||
<Typography
|
||||
sx={{
|
||||
fontFamily: d3roFontMono,
|
||||
fontSize: '10px',
|
||||
fontWeight: 500,
|
||||
letterSpacing: '0.08em',
|
||||
color: d3roPalette.text.dimLabel,
|
||||
textTransform: 'uppercase',
|
||||
}}
|
||||
>
|
||||
VOICE
|
||||
</Typography>
|
||||
</Box>
|
||||
<AppSidebar
|
||||
tier={currentTier}
|
||||
onOpenSupport={() => setSupportModalOpen(true)}
|
||||
onOpenOllamaGuide={() => setOllamaGuideOpen(true)}
|
||||
/>
|
||||
|
||||
{currentTier !== 'free' && (
|
||||
<Box sx={{ pl: 2, mt: 0.25 }}>
|
||||
<TactileBadge mono tone="accent">
|
||||
{currentTier.toUpperCase()}
|
||||
</TactileBadge>
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
|
||||
{/* Navigation Items */}
|
||||
{NAV_ITEMS.map((item) => {
|
||||
const isActive = currentRoute === item.route
|
||||
return (
|
||||
<Box
|
||||
key={item.route}
|
||||
onClick={() => setCurrentRoute(item.route)}
|
||||
sx={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: 1.25,
|
||||
px: 1.5,
|
||||
py: 1.15,
|
||||
borderRadius: d3roRadius.inner,
|
||||
cursor: 'pointer',
|
||||
color: isActive ? d3roPalette.text.primary : d3roPalette.text.inactive,
|
||||
border: '1px solid transparent',
|
||||
background: isActive
|
||||
? `linear-gradient(${d3roPalette.glass.raised}, ${d3roPalette.glass.raised}) padding-box, ${d3roPalette.gradient.accent} border-box`
|
||||
: 'transparent',
|
||||
boxShadow: isActive ? d3roShadow.glowSoft : 'none',
|
||||
transition: 'all 0.18s cubic-bezier(0.16, 1, 0.3, 1)',
|
||||
'&:hover': {
|
||||
color: d3roPalette.text.primary,
|
||||
bgcolor: isActive ? undefined : d3roPalette.glass.raised,
|
||||
transform: 'translateX(2px)',
|
||||
},
|
||||
'&:active': {
|
||||
transform: 'translateX(1px) scale(0.99)',
|
||||
},
|
||||
'& svg': {
|
||||
color: isActive ? d3roPalette.accent.light : 'inherit',
|
||||
flexShrink: 0,
|
||||
},
|
||||
}}
|
||||
>
|
||||
{item.icon}
|
||||
<Typography
|
||||
sx={{
|
||||
fontFamily: d3roFontSans,
|
||||
fontSize: d3roTypo.compact.size,
|
||||
fontWeight: isActive ? 600 : 500,
|
||||
lineHeight: 1,
|
||||
}}
|
||||
>
|
||||
{t(item.labelKey)}
|
||||
</Typography>
|
||||
</Box>
|
||||
)
|
||||
})}
|
||||
|
||||
{/* Customer Support Trigger */}
|
||||
<Box
|
||||
onClick={() => setSupportModalOpen(true)}
|
||||
sx={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: 1.25,
|
||||
px: 1.5,
|
||||
py: 1.15,
|
||||
borderRadius: d3roRadius.inner,
|
||||
cursor: 'pointer',
|
||||
color: d3roPalette.text.inactive,
|
||||
border: `1px solid ${d3roPalette.glass.hairline}`,
|
||||
bgcolor: d3roPalette.glass.surface,
|
||||
transition: 'all 0.18s ease',
|
||||
'&:hover': {
|
||||
color: d3roPalette.tag.purple,
|
||||
bgcolor: d3roPalette.glass.raised,
|
||||
borderColor: d3roPalette.tag.purple,
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Headphones size={ICON_SIZE} />
|
||||
<Typography
|
||||
sx={{
|
||||
fontFamily: d3roFontSans,
|
||||
fontSize: d3roTypo.compact.size,
|
||||
fontWeight: 500,
|
||||
lineHeight: 1,
|
||||
}}
|
||||
>
|
||||
Customer Support
|
||||
</Typography>
|
||||
</Box>
|
||||
|
||||
{/* Settings Trigger */}
|
||||
<Box
|
||||
onClick={() => setSettingsOpen(true)}
|
||||
sx={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: 1.25,
|
||||
px: 1.5,
|
||||
py: 1.15,
|
||||
borderRadius: d3roRadius.inner,
|
||||
cursor: 'pointer',
|
||||
color: d3roPalette.text.inactive,
|
||||
border: `1px solid ${d3roPalette.glass.hairline}`,
|
||||
bgcolor: d3roPalette.glass.surface,
|
||||
transition: 'all 0.18s ease',
|
||||
'&:hover': {
|
||||
color: d3roPalette.text.primary,
|
||||
bgcolor: d3roPalette.glass.raised,
|
||||
borderColor: d3roPalette.glass.hairlineStrong,
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Settings size={ICON_SIZE} />
|
||||
<Typography
|
||||
sx={{
|
||||
fontFamily: d3roFontSans,
|
||||
fontSize: d3roTypo.compact.size,
|
||||
fontWeight: 500,
|
||||
lineHeight: 1,
|
||||
}}
|
||||
>
|
||||
{t('nav.settings')}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
{/* ── Content Viewport: Ambient Mesh Background + Overlay Scrollbars ── */}
|
||||
<Box
|
||||
component="main"
|
||||
sx={{
|
||||
flexGrow: 1,
|
||||
minWidth: 0,
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
position: 'relative',
|
||||
bgcolor: d3roPalette.bg.app,
|
||||
background: `
|
||||
radial-gradient(ellipse 60% 45% at 15% -5%, ${d3roPalette.accent.dim} 0%, transparent 65%),
|
||||
radial-gradient(ellipse 55% 40% at 95% 105%, ${d3roPalette.tag.purpleBg} 0%, transparent 65%),
|
||||
${d3roPalette.bg.app}
|
||||
`,
|
||||
}}
|
||||
sx={{ flexGrow: 1, minWidth: 0, display: 'flex', flexDirection: 'column', bgcolor: d3roPalette.bg.app }}
|
||||
>
|
||||
<Box sx={{ flex: 1, overflow: 'hidden' }}>
|
||||
<OverlayScrollbarsComponent
|
||||
ref={scrollRef}
|
||||
defer
|
||||
options={{
|
||||
scrollbars: {
|
||||
|
|
@ -363,17 +185,17 @@ export function AppLayout(): React.ReactElement {
|
|||
}}
|
||||
style={{ height: '100%', width: '100%' }}
|
||||
>
|
||||
{currentRoute === 'dashboard' && <DashboardPage />}
|
||||
{currentRoute === 'history' && <HistoryPage />}
|
||||
{currentRoute === 'dictionary' && <DictionaryPage />}
|
||||
{currentRoute === 'commands' && <CommandsPage />}
|
||||
{currentRoute === 'conversation' && <VoiceConversationPage />}
|
||||
{currentRoute === 'knowledge' && <KnowledgeBasePage />}
|
||||
{currentRoute === 'meeting' && <MeetingModePage />}
|
||||
{route === 'home' && <HomePage />}
|
||||
{route === 'records' && <HistoryPage />}
|
||||
{route === 'meetings' && <MeetingModePage />}
|
||||
{route === 'conversation' && <VoiceConversationPage />}
|
||||
{route === 'commands' && <CommandsPage />}
|
||||
{route === 'dictionary' && <DictionaryPage />}
|
||||
{route === 'knowledge' && <KnowledgeBasePage />}
|
||||
{route === 'settings' && <SettingsModal open initialTab={settingsTab} onClose={back} />}
|
||||
</OverlayScrollbarsComponent>
|
||||
</Box>
|
||||
|
||||
{/* Free Tier Subtle Dock Banner */}
|
||||
{currentTier === 'free' && (
|
||||
<Box sx={{ px: 2, pb: 1, pt: 0.5, flexShrink: 0 }}>
|
||||
<AdBanner
|
||||
|
|
@ -385,43 +207,58 @@ export function AppLayout(): React.ReactElement {
|
|||
</Box>
|
||||
</Box>
|
||||
|
||||
<StatusBar />
|
||||
<SettingsModal open={settingsOpen} initialTab={settingsInitialTab} onClose={() => setSettingsOpen(false)} />
|
||||
<LicenseModal open={licenseModalOpen} onClose={() => setLicenseModalOpen(false)} />
|
||||
<OnboardingModal open={onboardingOpen} onClose={() => setOnboardingOpen(false)} />
|
||||
<SupportModal open={supportModalOpen} onClose={() => setSupportModalOpen(false)} />
|
||||
<OllamaGuideModal open={ollamaGuideOpen} onClose={() => setOllamaGuideOpen(false)} />
|
||||
<RewardedQuotaModal
|
||||
open={rewardedModalOpen}
|
||||
onClose={() => setRewardedModalOpen(false)}
|
||||
onRewardClaimed={(tokens) => {
|
||||
alert(`🎉 ${tokens}개의 무료 클라우드 AI 정제 토큰이 충전되었습니다!`)
|
||||
}}
|
||||
onRewardClaimed={(tokens) => notify({ message: t('shell.rewardClaimed', { tokens }), severity: 'success' })}
|
||||
/>
|
||||
|
||||
{/* Fallback Banner */}
|
||||
<Snackbar
|
||||
open={fallbackMsg !== null}
|
||||
autoHideDuration={8000}
|
||||
onClose={() => setFallbackMsg(null)}
|
||||
anchorOrigin={{ vertical: 'top', horizontal: 'center' }}
|
||||
anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
|
||||
>
|
||||
<Alert severity="warning" variant="filled" onClose={() => setFallbackMsg(null)} sx={{ width: '100%' }}>
|
||||
<Alert severity="warning" variant="outlined" onClose={() => setFallbackMsg(null)} sx={{ width: '100%', bgcolor: d3roPalette.bg.elevated }}>
|
||||
{fallbackMsg}
|
||||
</Alert>
|
||||
</Snackbar>
|
||||
|
||||
{/* Voice Alert Banner */}
|
||||
<Snackbar
|
||||
open={voiceAlert !== null}
|
||||
autoHideDuration={6000}
|
||||
onClose={() => setVoiceAlert(null)}
|
||||
anchorOrigin={{ vertical: 'top', horizontal: 'center' }}
|
||||
anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
|
||||
>
|
||||
<Alert
|
||||
severity={voiceAlert?.severity ?? 'error'}
|
||||
variant="filled"
|
||||
variant="outlined"
|
||||
onClose={() => setVoiceAlert(null)}
|
||||
sx={{ width: '100%' }}
|
||||
action={
|
||||
voiceAlert?.settingsTab ? (
|
||||
<>
|
||||
<Button
|
||||
color="inherit"
|
||||
size="small"
|
||||
onClick={() => {
|
||||
const tab = voiceAlert.settingsTab
|
||||
setVoiceAlert(null)
|
||||
if (tab) openSettingsTab(tab)
|
||||
}}
|
||||
>
|
||||
{t('nav.settings')}
|
||||
</Button>
|
||||
<IconButton color="inherit" size="small" aria-label={t('common.close')} onClick={() => setVoiceAlert(null)}>
|
||||
<X size={16} />
|
||||
</IconButton>
|
||||
</>
|
||||
) : undefined
|
||||
}
|
||||
sx={{ width: '100%', bgcolor: d3roPalette.bg.elevated }}
|
||||
>
|
||||
{voiceAlert?.message ?? ''}
|
||||
</Alert>
|
||||
|
|
@ -429,3 +266,13 @@ export function AppLayout(): React.ReactElement {
|
|||
</Box>
|
||||
)
|
||||
}
|
||||
|
||||
export function AppLayout(): React.ReactElement {
|
||||
return (
|
||||
<AppNavigationProvider initialRoute="home">
|
||||
<NotifyProvider>
|
||||
<Shell />
|
||||
</NotifyProvider>
|
||||
</AppNavigationProvider>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue