diff --git a/CHANGELOG.md b/CHANGELOG.md index 0205f30..53d9688 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,4 +4,5 @@ - Start tracking changes in `CHANGELOG.md` - Aggregate over connection types in the cred explorer (#502) - Support hosting SourceCred instances at arbitrary gateways, not just the root of a domain (#643) +- Display version string in the app's footer diff --git a/src/app/Page.js b/src/app/Page.js index 24c2602..eed2f35 100644 --- a/src/app/Page.js +++ b/src/app/Page.js @@ -9,6 +9,7 @@ import GithubLogo from "./GithubLogo"; import TwitterLogo from "./TwitterLogo"; import {routeData} from "./routeData"; import * as NullUtil from "../util/null"; +import {VERSION} from "./version"; export default class Page extends React.Component<{| +assets: Assets, @@ -16,59 +17,88 @@ export default class Page extends React.Component<{| |}> { render() { return ( -
-
- +
+
{this.props.children}
+
+ + ); } } +const footerHeight = 30; const style = StyleSheet.create({ + footer: { + color: "#666", + height: footerHeight, + fontSize: 14, + position: "relative", + }, + footerWrapper: { + textAlign: "right", + position: "absolute", + bottom: 5, + width: "100%", + }, + footerText: { + marginRight: 5, + }, + nonFooter: { + minHeight: `calc(100vh - ${footerHeight}px)`, + }, nav: { height: 60, padding: "20px 100px", diff --git a/src/app/version.js b/src/app/version.js new file mode 100644 index 0000000..37fcc07 --- /dev/null +++ b/src/app/version.js @@ -0,0 +1,19 @@ +// @flow + +export type VersionInfo = {| + +major: number, + +minor: number, + +patch: number, +|}; + +export const VERSION_INFO = Object.freeze({ + major: 0, + minor: 0, + patch: 0, +}); + +export function format(info: VersionInfo): string { + return `v${info.major}.${info.minor}.${info.patch}`; +} + +export const VERSION = format(VERSION_INFO);