Browse Source

Create a stub view

master
Red Forks 8 years ago
parent
commit
34bc6ae4b1
7 changed files with 492 additions and 348 deletions
  1. +362
    -346
      package-lock.json
  2. +3
    -1
      package.json
  3. +2
    -1
      src/index.tsx
  4. +0
    -0
      src/main-view/action.ts
  5. +116
    -0
      src/main-view/container.tsx
  6. +9
    -0
      src/main-view/index.ts
  7. +0
    -0
      src/main-view/reducer.ts

+ 362
- 346
package-lock.json
File diff suppressed because it is too large
View File


+ 3
- 1
package.json View File

@ -10,7 +10,9 @@
"author": "redforks@gmail.com",
"license": "ISC",
"dependencies": {
"mammoth": "git+ssh://git@192.168.1.5:forks/mammoth-lib.git"
"@types/react-router-redux": "^5.0.10",
"electron": "^1.7.10",
"mammoth": "git+file:///home/forks/work/mammoth-lib.git"
},
"devDependencies": {
"typescript": "^2.6.2"


+ 2
- 1
src/index.tsx View File

@ -4,6 +4,7 @@ import * as React from "react";
import { ConnectedRouter } from "react-router-redux";
import { Provider } from "react-redux";
import { Route } from "react-router";
import { MainView } from "./main-view";
const store = createStore({
@ -13,7 +14,7 @@ ReactDOM.render(
<Provider store={store}>
<ConnectedRouter history={history}>
<>
<Route exact path="/" component={Root} />
<Route exact path="/" component={MainView} />
<Route exact path="/login" component={Login} />
</>
</ConnectedRouter>


+ 0
- 0
src/main-view/action.ts View File


+ 116
- 0
src/main-view/container.tsx View File

@ -0,0 +1,116 @@
import * as React from "react";
import { connect, Dispatch } from "react-redux";
import { StMainView, StAppWithMainView } from ".";
import { Grid, Row, Col, Table, ButtonToolbar, Button, Panel, FormControl, Checkbox } from "react-bootstrap";
interface Props { };
interface Callbacks { };
function mainView(props: Props & Callbacks) {
return <Grid>
<Row style={{ height: "calc(20vh - 50px)" }}>
<Col xs={3}>
<div>0.00</div>
<ButtonToolbar>
<Button></Button>
<Button disabled></Button>
</ButtonToolbar>
<div><input /></div>
</Col>
<Col xs={5} style={{ height: "15vh", flexWrap: "wrap", display: "flex", flexDirection: "column", alignItems: "center" }}>
<Checkbox></Checkbox>
<Button></Button>
<Button></Button>
<Button></Button>
<Button></Button>
<div>屠宰顺序: 0 已宰头数: 0</div>
</Col>
<Col xs={4}>
<ButtonToolbar>
<Button bsSize="large"></Button>
<Button bsSize="large"></Button>
<Button bsSize="large"></Button>
</ButtonToolbar>
</Col>
</Row>
<Row>
<Col xs={8}>
<Row>
<Panel style={{ height: "40vh" }} header="烫褪">
<Col xs={6} >
<Table >
<thead>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
</Table>
</Col>
<Col xs={6}>
<ButtonToolbar>
<Button bsStyle="info"></Button>
<Button bsStyle="info"></Button>
<Button bsStyle="info"></Button>
</ButtonToolbar>
</Col>
</Panel>
</Row>
<Row>
<Panel style={{ height: "40vh" }} header="毛剥">
<Col xs={6}>
<Table>
<thead>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
</Table>
</Col>
<Col xs={6}>
<ButtonToolbar>
<Button></Button>
<Button></Button>
<Button></Button>
</ButtonToolbar>
</Col>
</Panel>
</Row>
</Col>
<Col xs={4}>
<Panel style={{ height: "calc(80vh + 20px)" }} header="记录">
<Table>
<thead>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
</Table>
</Panel>
</Col>
</Row>
</Grid>;
}
function mapStateToProps(st: StAppWithMainView): Props {
return {
};
}
function mapDispatchToProps(dispatch: Dispatch<StAppWithMainView>): Callbacks {
return {
};
}
export const MainView = connect(mapStateToProps, mapDispatchToProps)(mainView);

+ 9
- 0
src/main-view/index.ts View File

@ -0,0 +1,9 @@
export { MainView } from "./container";
export interface StMainView {
}
export interface StAppWithMainView {
mainView: StMainView;
}

+ 0
- 0
src/main-view/reducer.ts View File


Loading…
Cancel
Save