summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--frontend/common/form.css9
-rw-r--r--frontend/store.js2
-rw-r--r--frontend/views/index/components/graph.form.js4
-rw-r--r--frontend/views/index/containers/graph.edit.js2
-rw-r--r--frontend/views/index/containers/graph.index.js16
-rw-r--r--frontend/views/index/containers/graph.new.js2
-rw-r--r--frontend/views/index/graph.reducer.js20
-rwxr-xr-xstatic/fonts/Roboto-Black.ttfbin0 -> 171480 bytes
-rwxr-xr-xstatic/fonts/Roboto-BlackItalic.ttfbin0 -> 177552 bytes
-rw-r--r--static/fonts/Roboto-Bold.ttfbin0 -> 170760 bytes
-rw-r--r--static/fonts/Roboto-BoldItalic.ttfbin0 -> 174952 bytes
-rwxr-xr-xstatic/fonts/Roboto-Light.ttfbin0 -> 170420 bytes
-rwxr-xr-xstatic/fonts/Roboto-LightItalic.ttfbin0 -> 176616 bytes
-rwxr-xr-xstatic/fonts/Roboto-Medium.ttfbin0 -> 172064 bytes
-rwxr-xr-xstatic/fonts/Roboto-MediumItalic.ttfbin0 -> 176864 bytes
-rwxr-xr-xstatic/fonts/Roboto-Regular.ttfbin0 -> 171676 bytes
-rwxr-xr-xstatic/fonts/Roboto-Thin.ttfbin0 -> 171904 bytes
-rwxr-xr-xstatic/fonts/Roboto-ThinItalic.ttfbin0 -> 176300 bytes
-rw-r--r--static/index.html14
19 files changed, 55 insertions, 14 deletions
diff --git a/frontend/common/form.css b/frontend/common/form.css
index 5b8f1e3..8643065 100644
--- a/frontend/common/form.css
+++ b/frontend/common/form.css
@@ -56,6 +56,9 @@ form label.description {
font-size: small;
color: #ddd;
}
+form label.description span {
+ padding-top: 0;
+}
/* text input */
@@ -68,7 +71,7 @@ input[type=password] {
background: #111;
font-family: 'Roboto', sans-serif;
font-size: 0.875rem;
- width: 20rem;
+ width: 15rem;
border-radius: 0.125rem;
}
@@ -80,8 +83,8 @@ input[type=password]:focus {
}
textarea {
- width: 35rem;
- height: 20rem;
+ width: 20rem;
+ height: 10rem;
padding: 0.5rem;
border: 1px solid #ddd;
font-family: 'Roboto', sans-serif;
diff --git a/frontend/store.js b/frontend/store.js
index 445125b..d21dffb 100644
--- a/frontend/store.js
+++ b/frontend/store.js
@@ -5,12 +5,14 @@ import thunk from 'redux-thunk'
// import { login } from './util'
import uploadReducer from './views/upload/upload.reducer'
+import graphReducer from './views/index/graph.reducer'
// import collectionReducer from './views/collection/collection.reducer'
const createRootReducer = history => (
combineReducers({
auth: (state = {}) => state,
router: connectRouter(history),
+ graph: graphReducer,
upload: uploadReducer,
// collection: collectionReducer,
})
diff --git a/frontend/views/index/components/graph.form.js b/frontend/views/index/components/graph.form.js
index ef546ec..a6a0dd6 100644
--- a/frontend/views/index/components/graph.form.js
+++ b/frontend/views/index/components/graph.form.js
@@ -68,8 +68,8 @@ export default class GraphForm extends Component {
e.preventDefault()
const { isNew, onSubmit } = this.props
const { data } = this.state
- const requiredKeys = "title username".split(" ")
- const validKeys = "title username notes archived".split(" ")
+ const requiredKeys = "title username path description".split(" ")
+ const validKeys = "title username path description".split(" ")
const validData = validKeys.reduce((a,b) => { a[b] = data[b]; return a }, {})
const errorFields = requiredKeys.filter(key => !validData[key])
if (errorFields.length) {
diff --git a/frontend/views/index/containers/graph.edit.js b/frontend/views/index/containers/graph.edit.js
index 2f8c7fb..fadcabc 100644
--- a/frontend/views/index/containers/graph.edit.js
+++ b/frontend/views/index/containers/graph.edit.js
@@ -19,7 +19,7 @@ class GraphEdit extends Component {
.then(response => {
// response
console.log(response)
- history.push('/graph/' + data.id + '/show/')
+ history.push('/' + data.path)
})
}
diff --git a/frontend/views/index/containers/graph.index.js b/frontend/views/index/containers/graph.index.js
index b18c768..7ac31da 100644
--- a/frontend/views/index/containers/graph.index.js
+++ b/frontend/views/index/containers/graph.index.js
@@ -3,11 +3,23 @@ import { Link } from 'react-router-dom'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
-// import actions from '../../actions'
+import { Loader } from '../../../common'
+import actions from '../../../actions'
// import * as uploadActions from './upload.actions'
class GraphIndex extends Component {
+ componentDidMount() {
+ actions.graph.index()
+ }
render() {
+ const { index } = this.props
+ if (index.loading) {
+ return (
+ <div className='graphIndex'>
+ <Loader />
+ </div>
+ )
+ }
return (
<div className='graphIndex'>
<b>welcome, swimmer</b>
@@ -18,7 +30,7 @@ class GraphIndex extends Component {
}
const mapStateToProps = state => ({
- // upload: state.upload,
+ index: state.graph.index,
})
const mapDispatchToProps = dispatch => ({
diff --git a/frontend/views/index/containers/graph.new.js b/frontend/views/index/containers/graph.new.js
index 186f8f7..be96bf5 100644
--- a/frontend/views/index/containers/graph.new.js
+++ b/frontend/views/index/containers/graph.new.js
@@ -14,7 +14,7 @@ class GraphNew extends Component {
.then(res => {
console.log(res)
if (res.res && res.res.id) {
- history.push('/graph/' + res.res.name)
+ history.push('/' + res.res.path)
}
})
.catch(err => {
diff --git a/frontend/views/index/graph.reducer.js b/frontend/views/index/graph.reducer.js
new file mode 100644
index 0000000..612ac14
--- /dev/null
+++ b/frontend/views/index/graph.reducer.js
@@ -0,0 +1,20 @@
+import * as types from '../../types'
+// import { session, getDefault, getDefaultInt } from '../../session'
+
+import { crudState, crudReducer } from '../../api/crud.reducer'
+
+const initialState = crudState('graph', {
+ options: {
+ }
+})
+
+const reducer = crudReducer('graph')
+
+export default function graphReducer(state = initialState, action) {
+ // console.log(action.type, action)
+ state = reducer(state, action)
+ switch (action.type) {
+ default:
+ return state
+ }
+}
diff --git a/static/fonts/Roboto-Black.ttf b/static/fonts/Roboto-Black.ttf
new file mode 100755
index 0000000..689fe5c
--- /dev/null
+++ b/static/fonts/Roboto-Black.ttf
Binary files differ
diff --git a/static/fonts/Roboto-BlackItalic.ttf b/static/fonts/Roboto-BlackItalic.ttf
new file mode 100755
index 0000000..0b4e0ee
--- /dev/null
+++ b/static/fonts/Roboto-BlackItalic.ttf
Binary files differ
diff --git a/static/fonts/Roboto-Bold.ttf b/static/fonts/Roboto-Bold.ttf
new file mode 100644
index 0000000..d3f01ad
--- /dev/null
+++ b/static/fonts/Roboto-Bold.ttf
Binary files differ
diff --git a/static/fonts/Roboto-BoldItalic.ttf b/static/fonts/Roboto-BoldItalic.ttf
new file mode 100644
index 0000000..41cc1e7
--- /dev/null
+++ b/static/fonts/Roboto-BoldItalic.ttf
Binary files differ
diff --git a/static/fonts/Roboto-Light.ttf b/static/fonts/Roboto-Light.ttf
new file mode 100755
index 0000000..219063a
--- /dev/null
+++ b/static/fonts/Roboto-Light.ttf
Binary files differ
diff --git a/static/fonts/Roboto-LightItalic.ttf b/static/fonts/Roboto-LightItalic.ttf
new file mode 100755
index 0000000..0e81e87
--- /dev/null
+++ b/static/fonts/Roboto-LightItalic.ttf
Binary files differ
diff --git a/static/fonts/Roboto-Medium.ttf b/static/fonts/Roboto-Medium.ttf
new file mode 100755
index 0000000..1a7f3b0
--- /dev/null
+++ b/static/fonts/Roboto-Medium.ttf
Binary files differ
diff --git a/static/fonts/Roboto-MediumItalic.ttf b/static/fonts/Roboto-MediumItalic.ttf
new file mode 100755
index 0000000..0030295
--- /dev/null
+++ b/static/fonts/Roboto-MediumItalic.ttf
Binary files differ
diff --git a/static/fonts/Roboto-Regular.ttf b/static/fonts/Roboto-Regular.ttf
new file mode 100755
index 0000000..2c97eea
--- /dev/null
+++ b/static/fonts/Roboto-Regular.ttf
Binary files differ
diff --git a/static/fonts/Roboto-Thin.ttf b/static/fonts/Roboto-Thin.ttf
new file mode 100755
index 0000000..b74a4fd
--- /dev/null
+++ b/static/fonts/Roboto-Thin.ttf
Binary files differ
diff --git a/static/fonts/Roboto-ThinItalic.ttf b/static/fonts/Roboto-ThinItalic.ttf
new file mode 100755
index 0000000..dd0ddb8
--- /dev/null
+++ b/static/fonts/Roboto-ThinItalic.ttf
Binary files differ
diff --git a/static/index.html b/static/index.html
index 47eae19..7c26d05 100644
--- a/static/index.html
+++ b/static/index.html
@@ -1,10 +1,14 @@
<!DOCTYPE html>
<html>
- <head>
- <meta charset="UTF-8">
- <title>Swimmer</title>
- <meta name="viewport" content="width=device-width,initial-scale=1.0"></head>
- <body>
+<head>
+ <meta charset="UTF-8">
+ <title>Swimmer</title>
+ <meta name="viewport" content="width=device-width,initial-scale=1.0">
+ <style>
+ html { background: #000; }
+ </style>
+</head>
+<body>
<script>
var s = document.createElement('script');
s.setAttribute('src', '/static/js/dist/bundle.js?' + Date.now())