모의투자 로직 변경

This commit is contained in:
Macbook
2026-05-31 14:05:46 +09:00
parent ead97dad5d
commit d6eedf19bb
33 changed files with 1456 additions and 330 deletions
+35
View File
@@ -0,0 +1,35 @@
import type { AuthSession } from './auth';
/** 정식 로그인(회원 세션) — 게스트 입장은 제외 */
export function isFormalLogin(authUser: AuthSession | null, guestMode: boolean): boolean {
return authUser != null && !guestMode;
}
export const FORMAL_LOGIN_REQUIRED_MSG =
'매매·모의투자·투자전략·자동매매 기능은 정식 로그인 후 이용할 수 있습니다.';
/** 매매·모의·전략·알림 관련 상단 메뉴 */
export const TRADING_MENU_PAGES = new Set([
'paper',
'virtual',
'notifications',
'strategy',
'strategy-editor',
'backtest',
]);
export function isTradingMenuPage(page: string): boolean {
return TRADING_MENU_PAGES.has(page);
}
export const TRADING_SETTINGS_CATEGORIES = new Set([
'strategy',
'paper',
'virtual',
'live',
'backtest',
]);
export function isTradingSettingsCategory(cat: string): boolean {
return TRADING_SETTINGS_CATEGORIES.has(cat);
}