goldenChat base source add

This commit is contained in:
aidev
2026-05-23 15:11:48 +09:00
commit a4ea7762b5
2081 changed files with 1155760 additions and 0 deletions
@@ -0,0 +1,62 @@
/**
* 알림 Context 연동 UI (Provider 하위에서만 사용)
*/
import React from 'react';
import TopMenuBar, { type MenuPage } from './TopMenuBar';
import type { Theme } from '../types';
import type { AuthSession } from '../utils/auth';
import type { TradeAlertPopupLayout, TradeAlertPopupPosition } from '../utils/tradeAlertPopupLayout';
import { useTradeNotification } from '../contexts/TradeNotificationContext';
interface NotifyTopMenuBarProps {
activePage: MenuPage;
theme: Theme;
onPage: (page: MenuPage) => void;
onTheme: () => void;
authUser?: AuthSession | null;
onLoginClick?: () => void;
onLogout?: () => void;
menuPermissions?: Record<string, boolean>;
guestMode?: boolean;
tradeAlertPopupPosition?: string;
tradeAlertPopupLayout?: string;
tradeAlertPopupGridCols?: number;
onTradeAlertPopupPosition?: (v: TradeAlertPopupPosition) => void;
onTradeAlertPopupLayout?: (v: TradeAlertPopupLayout) => void;
onTradeAlertPopupGridCols?: (v: number) => void;
}
export const NotifyTopMenuBar: React.FC<NotifyTopMenuBarProps> = props => {
const { unreadCount, toastNotifications, dismissAllToasts } = useTradeNotification();
return (
<TopMenuBar
{...props}
tradeNotifyUnread={unreadCount}
tradeNotifyToastCount={toastNotifications.length}
onOpenNotifications={() => props.onPage('notifications')}
onDismissAllNotifyPopups={dismissAllToasts}
tradeAlertPopupPosition={props.tradeAlertPopupPosition}
tradeAlertPopupLayout={props.tradeAlertPopupLayout}
tradeAlertPopupGridCols={props.tradeAlertPopupGridCols}
onTradeAlertPopupPosition={props.onTradeAlertPopupPosition}
onTradeAlertPopupLayout={props.onTradeAlertPopupLayout}
onTradeAlertPopupGridCols={props.onTradeAlertPopupGridCols}
/>
);
};
import Toolbar, { type ToolbarProps } from './Toolbar';
export const ChartToolbarNotify: React.FC<ToolbarProps & { onOpenNotifyList: () => void }> = ({
onOpenNotifyList,
...toolbarProps
}) => {
const { unreadCount } = useTradeNotification();
return (
<Toolbar
{...toolbarProps}
tradeNotifyUnread={unreadCount}
onOpenTradeNotifications={onOpenNotifyList}
/>
);
};