모바일에서 튜토리얼 버튼 위치 변경
This commit is contained in:
1 parent
7f1e2b83a9
commit
b18dd7aa4d
4 files changed
+81
-4
No files matched your search
@@ -38,9 +38,12 @@ interface SidebarProps {
|
||||
userInfo?: UserMeResponse | null;
|
||||
onLogout?: () => void;
|
||||
credits?: number | null;
|
||||
tutorialAvailable?: boolean;
|
||||
tutorialEnabled?: boolean;
|
||||
onToggleTutorial?: () => void;
|
||||
}
|
||||
|
||||
const Sidebar: React.FC<SidebarProps> = ({ activeItem, onNavigate, onHome, userInfo, onLogout, credits }) => {
|
||||
const Sidebar: React.FC<SidebarProps> = ({ activeItem, onNavigate, onHome, userInfo, onLogout, credits, tutorialAvailable, tutorialEnabled, onToggleTutorial }) => {
|
||||
const { t } = useTranslation();
|
||||
const [isCollapsed, setIsCollapsed] = useState(false);
|
||||
const [isMobileOpen, setIsMobileOpen] = useState(false);
|
||||
@@ -159,6 +162,24 @@ const Sidebar: React.FC<SidebarProps> = ({ activeItem, onNavigate, onHome, userI
|
||||
</div>
|
||||
|
||||
<div className="sidebar-footer">
|
||||
{/* 모바일 전용 튜토리얼 토글 */}
|
||||
{tutorialAvailable && (
|
||||
<button
|
||||
className={`sidebar-tutorial-btn ${tutorialEnabled ? 'active' : ''}`}
|
||||
onClick={() => onToggleTutorial?.()}
|
||||
title={tutorialEnabled ? t('sidebar.tutorialOff') : t('sidebar.tutorialOn')}
|
||||
>
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5">
|
||||
<circle cx="12" cy="12" r="10"/>
|
||||
<path d="M12 8v4l3 3"/>
|
||||
</svg>
|
||||
<span className="sidebar-tutorial-label">{t('sidebar.tutorial')}</span>
|
||||
<span className={`sidebar-tutorial-badge ${tutorialEnabled ? 'on' : 'off'}`}>
|
||||
{tutorialEnabled ? 'ON' : 'OFF'}
|
||||
</span>
|
||||
</button>
|
||||
)}
|
||||
|
||||
<div className="sidebar-language-switch">
|
||||
<LanguageSwitch isCollapsed={isCollapsed} />
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user