From 481c602f618888f48bd27aee2a766597acdd7376 Mon Sep 17 00:00:00 2001 From: insanity Date: Tue, 29 Aug 2017 16:16:36 +0900 Subject: [PATCH] notification --- src/ts/@overflow/app/config/index.ts | 2 + .../@overflow/app/views/layout/AppLayout.tsx | 3 + src/ts/@overflow/app/views/layout/LogoBar.tsx | 21 ++-- .../app/views/notification/Notification.tsx | 21 ++++ .../@overflow/commons/api/model/PageParams.ts | 4 +- .../notification/react/Notification.tsx | 10 +- .../notification/react/NotificationList.tsx | 29 +++++ .../react/components/Notification.tsx | 38 ++++-- .../react/components/NotificationList.tsx | 110 ++++++++++++++++++ .../notification/redux/action/read_all.ts | 7 ++ .../notification/redux/reducer/read_all.ts | 24 ++++ .../notification/redux/state/ReadAll.ts | 13 +++ 12 files changed, 261 insertions(+), 21 deletions(-) create mode 100644 src/ts/@overflow/notification/react/NotificationList.tsx create mode 100644 src/ts/@overflow/notification/react/components/NotificationList.tsx create mode 100644 src/ts/@overflow/notification/redux/action/read_all.ts create mode 100644 src/ts/@overflow/notification/redux/reducer/read_all.ts create mode 100644 src/ts/@overflow/notification/redux/state/ReadAll.ts diff --git a/src/ts/@overflow/app/config/index.ts b/src/ts/@overflow/app/config/index.ts index 4b387d6..ff74517 100644 --- a/src/ts/@overflow/app/config/index.ts +++ b/src/ts/@overflow/app/config/index.ts @@ -45,6 +45,7 @@ import HistoryReadAllByProbeReducer from '@overflow/history/redux/reducer/read_a import HistoryReadAllByProbeAndTypeReducer from '@overflow/history/redux/reducer/read_all_by_probe_and_type'; import HistoryTypeReadAllReducer from '@overflow/meta/redux/reducer/history_type_read_all'; import NotificationReadAllUnconfirmedReducer from '@overflow/notification/redux/reducer/read_all_unconfirmed'; +import NotificationReadAllReducer from '@overflow/notification/redux/reducer/read_all'; import AsyncRequest from '@overflow/app/redux/saga/AsyncRequest'; @@ -115,6 +116,7 @@ const reduxConfig: ReduxConfig = { HistoryTypeReadAllReducer, SensorRegistSensorConfigReducer, NotificationReadAllUnconfirmedReducer, + NotificationReadAllReducer, ], sagaWatchers: [ AsyncRequest, diff --git a/src/ts/@overflow/app/views/layout/AppLayout.tsx b/src/ts/@overflow/app/views/layout/AppLayout.tsx index 80c9be2..5312d3d 100644 --- a/src/ts/@overflow/app/views/layout/AppLayout.tsx +++ b/src/ts/@overflow/app/views/layout/AppLayout.tsx @@ -14,6 +14,8 @@ import ProbeSetup from '../../views/monitoring/probe/Setup'; import HistoryList from '../../views/history/List'; import TitleBarContainer from '@overflow/app/views/layout/TitleBarContainer'; import SensorSetup from '../../views/monitoring/sensor/Setup'; +import NotificationList from '../../views/notification/Notification'; + export interface Props extends RouteComponentProps { } @@ -47,6 +49,7 @@ export class AppLayout extends React.Component { + diff --git a/src/ts/@overflow/app/views/layout/LogoBar.tsx b/src/ts/@overflow/app/views/layout/LogoBar.tsx index c4c7aa0..3f7ffd3 100644 --- a/src/ts/@overflow/app/views/layout/LogoBar.tsx +++ b/src/ts/@overflow/app/views/layout/LogoBar.tsx @@ -5,6 +5,8 @@ import { Container, Popup, Image, + Label, + Button, } from 'semantic-ui-react'; import Notification from '@overflow/notification/react/Notification'; @@ -21,11 +23,16 @@ export class LogoBar extends React.Component { alert('handleLogoClick'); } - public handleNotiClick = () => { - alert('handleNotiClick'); - } - public render(): JSX.Element { + let icon = +