Commit a01456db authored by Alexandros Georgantas's avatar Alexandros Georgantas
Browse files

feat(app): template manager feature

parent ba5eabbc
...@@ -21,6 +21,8 @@ import UnlockModal from 'pubsweet-component-bookbuilder/src/ui/src/modals/Unlock ...@@ -21,6 +21,8 @@ import UnlockModal from 'pubsweet-component-bookbuilder/src/ui/src/modals/Unlock
import MetadataModal from 'pubsweet-component-bookbuilder/src/ui/src/modals/MetadataModal' import MetadataModal from 'pubsweet-component-bookbuilder/src/ui/src/modals/MetadataModal'
import WorkflowModal from 'pubsweet-component-bookbuilder/src/ui/src/modals/WorkflowModal' import WorkflowModal from 'pubsweet-component-bookbuilder/src/ui/src/modals/WorkflowModal'
import UnlockedModal from 'pubsweet-component-wax/src/modals/UnlockedModal' import UnlockedModal from 'pubsweet-component-wax/src/modals/UnlockedModal'
import CreateTemplateModal from 'pubsweet-component-editoria-templates/src/ui/src/modals/CreateTemplateModal'
import DeleteTemplateModal from 'pubsweet-component-editoria-templates/src/ui/src/modals/DeleteTemplateModal'
import theme from './theme' import theme from './theme'
...@@ -39,9 +41,12 @@ const modals = { ...@@ -39,9 +41,12 @@ const modals = {
workflowModal: WorkflowModal, workflowModal: WorkflowModal,
errorModal: ErrorModal, errorModal: ErrorModal,
unlockedModal: UnlockedModal, unlockedModal: UnlockedModal,
createTemplateModal: CreateTemplateModal,
deleteTemplateModal: DeleteTemplateModal,
} }
const rootEl = document.getElementById('root') const rootEl = document.getElementById('root')
console.log('theme', theme)
ReactDOM.render( ReactDOM.render(
<ModalProvider modals={modals}> <ModalProvider modals={modals}>
<Root history={history} routes={routes} theme={theme} /> <Root history={history} routes={routes} theme={theme} />
......
...@@ -18,6 +18,7 @@ import WithConfig from 'pubsweet-component-wax/src/WithConfig' ...@@ -18,6 +18,7 @@ import WithConfig from 'pubsweet-component-wax/src/WithConfig'
// Editoria // Editoria
import BookBuilder from 'pubsweet-component-bookbuilder/src/ConnectedBookBuilder' import BookBuilder from 'pubsweet-component-bookbuilder/src/ConnectedBookBuilder'
import Dashboard from 'pubsweet-component-editoria-dashboard/src/ConnectedDashboard' import Dashboard from 'pubsweet-component-editoria-dashboard/src/ConnectedDashboard'
import Templates from 'pubsweet-component-editoria-templates/src/ConnectedTemplates'
import PagedStyler from 'pubsweet-component-bookbuilder/src/PagedStyler/PagedStyler' import PagedStyler from 'pubsweet-component-bookbuilder/src/PagedStyler/PagedStyler'
import Navigation from 'pubsweet-component-editoria-navigation/src/Navigation' import Navigation from 'pubsweet-component-editoria-navigation/src/Navigation'
...@@ -40,7 +41,8 @@ const Editor = WithConfig(Wax, { ...@@ -40,7 +41,8 @@ const Editor = WithConfig(Wax, {
}, },
}) })
// //
// debugger;
// console.log('temp', Templates)
const ConnectedNavigation = Connected(Navigation) const ConnectedNavigation = Connected(Navigation)
const GlobalStyle = createGlobalStyle` const GlobalStyle = createGlobalStyle`
...@@ -84,6 +86,7 @@ export default ( ...@@ -84,6 +86,7 @@ export default (
<Page> <Page>
<Switch> <Switch>
<PrivateRoute component={Dashboard} exact path="/books" /> <PrivateRoute component={Dashboard} exact path="/books" />
<PrivateRoute component={Templates} exact path="/templates" />
<PrivateRoute <PrivateRoute
component={PagedStyler} component={PagedStyler}
path="/books/:id/pagedPreviewer/paged/:hashed" path="/books/:id/pagedPreviewer/paged/:hashed"
......
...@@ -24,8 +24,12 @@ ...@@ -24,8 +24,12 @@
"editoria-data-model/src/bookTranslation", "editoria-data-model/src/bookTranslation",
"editoria-data-model/src/customTag", "editoria-data-model/src/customTag",
"editoria-data-model/src/division", "editoria-data-model/src/division",
"editoria-data-model/src/template",
"editoria-data-model/src/file",
"editoria-data-model/src/fileTranslation",
"editoria-data-model/src/team", "editoria-data-model/src/team",
"editoria-data-model/src/user", "editoria-data-model/src/user",
"editoria-data-model/src/dataloader", "editoria-data-model/src/dataloader",
"pubsweet-component-editoria-templates",
"editoria-api" "editoria-api"
] ]
\ No newline at end of file
{
"ignoreRoot":[".git"]
}
\ No newline at end of file
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
"highlight.js": "^9.13.1", "highlight.js": "^9.13.1",
"history": "^4.7.2", "history": "^4.7.2",
"lodash": "4.17.4", "lodash": "4.17.4",
"nodemon": "^1.19.1",
"path-to-regexp": "^2.4.0", "path-to-regexp": "^2.4.0",
"prop-types": "^15.6.0", "prop-types": "^15.6.0",
"pubsweet": "^4.1.2", "pubsweet": "^4.1.2",
...@@ -177,6 +178,7 @@ ...@@ -177,6 +178,7 @@
"setupdb": "pubsweet setupdb && npm run seed", "setupdb": "pubsweet setupdb && npm run seed",
"start": "pubsweet start", "start": "pubsweet start",
"server": "pubsweet start", "server": "pubsweet start",
"watch": "DEBUG=knex:query nodemon --exec 'pubsweet server' --watch node_modules/editoria-api",
"cypress": "cypress open", "cypress": "cypress open",
"resetdb": "pubsweet setupdb --clobber && npm run seed", "resetdb": "pubsweet setupdb --clobber && npm run seed",
"start:services": "docker-compose up postgres", "start:services": "docker-compose up postgres",
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment