diff --git a/CHANGELOG.md b/CHANGELOG.md
index f0f41659..6574158c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,6 +19,10 @@ The following log documentes the history of the server project.
- `WebURL`: the URL to your Dnote server, without the trailing slash. (e.g. `https://my-server.com`) (Please see #290)
- `SmtpPort`: the SMTP port. (e.g. `465`) optional - required *if you want to configure email*
+#### Added
+
+- Display version number in the settings (#293)
+
#### Fixed
- Allow to customize the app URL in the emails (#290)
diff --git a/Makefile b/Makefile
index d32d03ef..a43ed24b 100644
--- a/Makefile
+++ b/Makefile
@@ -87,13 +87,16 @@ endif
# development
dev-server:
@echo "==> running dev environment"
- @(cd ${GOPATH}/src/github.com/dnote/dnote/web && ./scripts/dev.sh)
+ @(cd ${GOPATH}/src/github.com/dnote/dnote/web && VERSION=master ./scripts/dev.sh)
.PHONY: dev-server
## build
build-web:
+ifndef version
+ $(error version is required. Usage: make version=0.1.0 build-web)
+endif
@echo "==> building web"
- @(cd ${GOPATH}/src/github.com/dnote/dnote/web && ./scripts/build-prod.sh)
+ @(cd ${GOPATH}/src/github.com/dnote/dnote/web && VERSION=$(version) ./scripts/build-prod.sh)
.PHONY: build-web
build-server: build-web
diff --git a/web/declrations.d.ts b/web/declrations.d.ts
index 84e2a8ac..f222bf22 100644
--- a/web/declrations.d.ts
+++ b/web/declrations.d.ts
@@ -23,3 +23,4 @@ declare module '*.scss';
declare const __STRIPE_PUBLIC_KEY__: string;
declare const __ROOT_URL__: string;
declare const __CDN_URL__: string;
+declare const __VERSION__: string;
diff --git a/web/scripts/build-prod.sh b/web/scripts/build-prod.sh
index 8505e8bc..1ce40be7 100755
--- a/web/scripts/build-prod.sh
+++ b/web/scripts/build-prod.sh
@@ -15,4 +15,5 @@ ASSET_BASE_URL="$assetBaseUrl" \
ROOT_URL="$rootUrl" \
PUBLIC_PATH="$publicPath" \
COMPILED_PATH="$compiledPath" \
+VERSION="$VERSION" \
"$basePath"/web/scripts/build.sh
diff --git a/web/scripts/build.sh b/web/scripts/build.sh
index a44185ee..1b88ef3f 100755
--- a/web/scripts/build.sh
+++ b/web/scripts/build.sh
@@ -17,6 +17,7 @@ pushd "$basePath/web"
OUTPUT_PATH="$COMPILED_PATH" \
ROOT_URL="$ROOT_URL" \
+ VERSION="$VERSION" \
"$basePath"/web/node_modules/.bin/webpack\
--colors\
--display-error-details\
diff --git a/web/scripts/dev.sh b/web/scripts/dev.sh
index 595bce88..e3755430 100755
--- a/web/scripts/dev.sh
+++ b/web/scripts/dev.sh
@@ -31,6 +31,7 @@ set +a
PUBLIC_PATH="$appPath"/public \
COMPILED_PATH="$basePath/web/compiled" \
IS_TEST=true \
+ VERSION="$VERSION" \
"$appPath"/scripts/webpack-dev.sh
) &
devServerPID=$!
diff --git a/web/scripts/webpack-dev.sh b/web/scripts/webpack-dev.sh
index 602ff9ee..5b3332c6 100755
--- a/web/scripts/webpack-dev.sh
+++ b/web/scripts/webpack-dev.sh
@@ -19,6 +19,7 @@ appPath="$basePath"/web
node "$appPath"/scripts/placeholder.js &&
ROOT_URL=$ROOT_URL \
+ VERSION="$VERSION" \
"$appPath"/node_modules/.bin/webpack-dev-server\
--env.isTest="$IS_TEST"\
--config "$appPath"/webpack/dev.config.js
diff --git a/web/src/components/Settings/About/index.tsx b/web/src/components/Settings/About/index.tsx
new file mode 100644
index 00000000..a030fbf6
--- /dev/null
+++ b/web/src/components/Settings/About/index.tsx
@@ -0,0 +1,62 @@
+/* Copyright (C) 2019 Monomax Software Pty Ltd
+ *
+ * This file is part of Dnote.
+ *
+ * Dnote is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Dnote is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Dnote. If not, see .
+ */
+
+import React, { useState } from 'react';
+import Helmet from 'react-helmet';
+import classnames from 'classnames';
+
+import SettingRow from '../SettingRow';
+import styles from '../Settings.scss';
+import { useSelector } from '../../../store';
+import config from '../../../libs/config';
+
+interface Props {}
+
+const About: React.FunctionComponent = () => {
+ const { user } = useSelector(state => {
+ return {
+ user: state.auth.user.data
+ };
+ });
+
+ return (
+
+ );
+};
+
+export default About;
diff --git a/web/src/components/Settings/Billing/CancelPlanModal.tsx b/web/src/components/Settings/Billing/CancelPlanModal.tsx
index 757028b6..e2489f8e 100644
--- a/web/src/components/Settings/Billing/CancelPlanModal.tsx
+++ b/web/src/components/Settings/Billing/CancelPlanModal.tsx
@@ -83,7 +83,7 @@ const CancelPlanModal: React.FunctionComponent = ({
+ }
+ />
+ );
+};
+
+export default CancelRow;
diff --git a/web/src/components/Settings/Billing/PlanSection/Placeholder.scss b/web/src/components/Settings/Billing/PlanSection/Placeholder.scss
new file mode 100644
index 00000000..1acd357b
--- /dev/null
+++ b/web/src/components/Settings/Billing/PlanSection/Placeholder.scss
@@ -0,0 +1,41 @@
+/* Copyright (C) 2019 Monomax Software Pty Ltd
+ *
+ * This file is part of Dnote.
+ *
+ * Dnote is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Dnote is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Dnote. If not, see .
+ */
+
+@import '../../../App/rem';
+@import '../../../App/font';
+@import '../../../App/theme';
+
+.content1 {
+ position: relative;
+ padding: rem(48px) rem(12px);
+}
+
+.content1-line1 {
+ width: rem(140px);
+ height: rem(16px);
+}
+.content1-line2 {
+ width: rem(240px);
+ height: rem(16px);
+ margin-top: rem(8px);
+}
+.content1-line3 {
+ width: rem(80px);
+ height: rem(16px);
+ margin-top: rem(8px);
+}
diff --git a/web/src/components/Settings/Billing/Placeholder.tsx b/web/src/components/Settings/Billing/PlanSection/Placeholder.tsx
similarity index 71%
rename from web/src/components/Settings/Billing/Placeholder.tsx
rename to web/src/components/Settings/Billing/PlanSection/Placeholder.tsx
index 78fb6b86..d61f1e71 100644
--- a/web/src/components/Settings/Billing/Placeholder.tsx
+++ b/web/src/components/Settings/Billing/PlanSection/Placeholder.tsx
@@ -19,7 +19,7 @@
import React from 'react';
import classnames from 'classnames';
-import settingsStyles from '../Settings.scss';
+import settingsStyles from '../../Settings.scss';
import styles from './Placeholder.scss';
const Placeholder: React.FunctionComponent = () => {
@@ -28,10 +28,6 @@ const Placeholder: React.FunctionComponent = () => {