diff --git a/src/css/styles.css b/src/css/styles.css index 552b2d1..597a921 100644 --- a/src/css/styles.css +++ b/src/css/styles.css @@ -6,4 +6,8 @@ a { pointer-events: none; cursor: default; opacity: 0.6; -} \ No newline at end of file +} + +.btn-round { + border-radius: 24px; +} diff --git a/src/javascript/components/AppLogo.jsx b/src/javascript/components/AppLogo.jsx index 3b7aa34..ce84211 100644 --- a/src/javascript/components/AppLogo.jsx +++ b/src/javascript/components/AppLogo.jsx @@ -1,7 +1,7 @@ -import React, { Component } from 'react'; +import React from 'react'; import FaFilePdfO from 'react-icons/lib/fa/file-pdf-o' -export default class AppLogo extends Component { +export default class AppLogo extends React.Component { static propTypes = { onClick: React.PropTypes.func, diff --git a/src/javascript/components/PdfPageView.jsx b/src/javascript/components/PdfPageView.jsx index fa6e20d..5d9e11e 100644 --- a/src/javascript/components/PdfPageView.jsx +++ b/src/javascript/components/PdfPageView.jsx @@ -9,7 +9,7 @@ export default class PdfPageView extends React.Component { }; render() { - const header = "Page " + this.props.pdfPage.index; + const header = "Page " + (this.props.pdfPage.index + 1); return (

{ header }

diff --git a/src/javascript/components/PdfView.jsx b/src/javascript/components/PdfView.jsx index f092857..d88e31e 100644 --- a/src/javascript/components/PdfView.jsx +++ b/src/javascript/components/PdfView.jsx @@ -1,6 +1,11 @@ import React from 'react'; import Badge from 'react-bootstrap/lib/Badge' +import ButtonToolbar from 'react-bootstrap/lib/ButtonToolbar' +import ButtonGroup from 'react-bootstrap/lib/ButtonGroup' +import Button from 'react-bootstrap/lib/Button' +import DropdownButton from 'react-bootstrap/lib/DropdownButton' +import MenuItem from 'react-bootstrap/lib/MenuItem' import PdfPageView from './PdfPageView.jsx'; @@ -24,7 +29,12 @@ export default class PdfView extends React.Component { this.setState({ pageNr: pageNr }); + } + selectTransformation(currentTransformation) { + this.setState({ + currentTransformation: currentTransformation + }); } nextTransformation() { @@ -46,19 +56,7 @@ export default class PdfView extends React.Component { const header = "Parsed " + pdfPages.length + " pages!" - var pageLinks = []; - pageLinks.push(All); - pdfPages.forEach((pdfPage, i) => pageLinks.push( - { " " + i } - )); - const currentTransformationName = transformations[currentTransformation].name; - const prevLink = 0 ? '' : 'disabled' }> - { '<==' } - ; - const nextLink = - { '==>' } - ; const transformedPdfPages = pdfPages.filter((elem, i) => pageNr == -1 || i == pageNr).map(pdfPage => { for (var i = 0; i <= currentTransformation; i++) { @@ -72,25 +70,56 @@ export default class PdfView extends React.Component { return (
- - { pdfPages.length } - pages! -
-
-
- Pages: -
-
- { pageLinks } -
-
- Current Transformation: -
-
- { prevLink } - { " " + currentTransformationName + " " } - { nextLink } -
+ + + + + + + +
+ Pages +
+ + + + { pdfPages.map((pdfPage, i) => ) } + + +
+
+ + + + + + + + + + +
+ Current Transformation +
+ + { transformations.map((transformation, i) => + { transformation.name } + ) } + +
+
+ + { ' ' } + +

{ pageComponents }