diff options
| -rw-r--r-- | README.md | 7 | ||||
| -rw-r--r-- | frontend/api/crud.reducer.js | 16 | ||||
| -rw-r--r-- | frontend/views/page/components/tile.handle.js | 15 |
3 files changed, 23 insertions, 15 deletions
@@ -47,3 +47,10 @@ Generate a new migration if you've modified the database: ./cli.py db revision --autogenerate -m 'describe the changes' ./cli.py db upgrade head ``` + +## building the site + +``` +./cli.py site export --graph swimmer +``` + diff --git a/frontend/api/crud.reducer.js b/frontend/api/crud.reducer.js index dd1fe48..2a7e4c4 100644 --- a/frontend/api/crud.reducer.js +++ b/frontend/api/crud.reducer.js @@ -1,6 +1,6 @@ -import * as types from '../types' -import { getOrderedIds, getOrderedIdsFromLookup } from '../util' -import { session } from '../session' +import * as types from 'app/types' +import { getOrderedIds, getOrderedIdsFromLookup } from 'app/utils' +import { session } from 'app/session' export const crudState = (type, options) => ({ index: {}, @@ -115,14 +115,14 @@ export const crudReducer = (type) => { ...state, update: action.data, index: addToIndex(state.index, action.data.res, state.options.sort), - show: (state.show && state.show.res) ? { - res: (state.show.res.id === action.data.res.id ? { + show: (state.show.res && state.show.res.id === action.data.res.id) ? { + res: { ...state.show.res, ...action.data.res, - } : state.show.res), - } : {} + } + } : state.show } - case crud_type.index_error: + case crud_type.update_error: return { ...state, update: { loading: false, error: true }, diff --git a/frontend/views/page/components/tile.handle.js b/frontend/views/page/components/tile.handle.js index 9212dbb..e91f0b1 100644 --- a/frontend/views/page/components/tile.handle.js +++ b/frontend/views/page/components/tile.handle.js @@ -70,13 +70,14 @@ const TileHandle = ({ tile, bounds, box, viewing, onMouseDown, onDoubleClick }) if (viewing && tile.href) { if (tile.href.indexOf('http') === 0) { return ( - <div - className={className} - style={style} - onClick={() => window.open(tile.href, '_blank')} - > - {content} - </div> + <a href={tile.href} rel='noopener'> + <div + className={className} + style={style} + > + {content} + </div> + </a> ) } else { return ( |
