From cdaceafd4dfa34eabd27af467e8fa1266fddb419 Mon Sep 17 00:00:00 2001 From: insanity Date: Fri, 21 Jul 2017 15:22:06 +0900 Subject: [PATCH] temporary router --- src/ts/@overflow/app/views/App.tsx | 3 + .../@overflow/app/views/layout/LeftMenu.tsx | 2 +- .../@overflow/app/views/layout/TempLayout.tsx | 48 +++++++++++++ .../commons/react/component/Notification.tsx | 68 +++++++++++++++++++ 4 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 src/ts/@overflow/app/views/layout/TempLayout.tsx create mode 100644 src/ts/@overflow/commons/react/component/Notification.tsx diff --git a/src/ts/@overflow/app/views/App.tsx b/src/ts/@overflow/app/views/App.tsx index 13a26b9..d47513d 100644 --- a/src/ts/@overflow/app/views/App.tsx +++ b/src/ts/@overflow/app/views/App.tsx @@ -7,6 +7,8 @@ import { ConnectedRouter } from 'react-router-redux'; import AccountLayout from './layout/AccountLayout'; import AppLayout from './layout/AppLayout'; +import TempLayout from './layout/TempLayout'; + export interface Props { store: Store; history: History; @@ -25,6 +27,7 @@ class App extends React.Component { + diff --git a/src/ts/@overflow/app/views/layout/LeftMenu.tsx b/src/ts/@overflow/app/views/layout/LeftMenu.tsx index 5a491e6..8e29530 100644 --- a/src/ts/@overflow/app/views/layout/LeftMenu.tsx +++ b/src/ts/@overflow/app/views/layout/LeftMenu.tsx @@ -36,7 +36,7 @@ export class LeftMenu extends React.Component {
- Probe + Probe Sensors diff --git a/src/ts/@overflow/app/views/layout/TempLayout.tsx b/src/ts/@overflow/app/views/layout/TempLayout.tsx new file mode 100644 index 0000000..1cd3bc2 --- /dev/null +++ b/src/ts/@overflow/app/views/layout/TempLayout.tsx @@ -0,0 +1,48 @@ +import * as React from 'react'; +import { RouteComponentProps, RouteProps, Route } from 'react-router-dom'; +import { Container, Menu, Sidebar, Segment, Icon, Breadcrumb, Grid, Dropdown } from 'semantic-ui-react'; +import { Header } from './Header'; +import { Footer } from './Footer'; +import { LeftMenu } from './LeftMenu'; + +import ProbeList from '../monitoring/probe/List'; + +export interface Props extends RouteComponentProps { +} +export interface State { + sidebar_visible: boolean; + notification_visible: boolean; +} + +export class AppLayout extends React.Component { + + constructor(props: Props, context: State) { + super(props, context); + this.state = { + sidebar_visible: true, + notification_visible: false, + }; + } + + public onSidebar = () => { + this.setState({ notification_visible: !this.state.notification_visible, sidebar_visible: !this.state.sidebar_visible }); + } + + public render(): JSX.Element { + return ( + + + +
+ + + +