diff --git a/preload.js b/preload.js index 074afd14c..84478fe43 100644 --- a/preload.js +++ b/preload.js @@ -59,6 +59,13 @@ window.isBeforeVersion = (toCheck, baseVersion) => { } }; +window.versionInfo = { + environment: window.getEnvironment(), + version: window.getVersion(), + commitHash: window.getCommitHash(), + appInstance: window.getAppInstance(), +}; + // temporary clearnet fix process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; window.getSelfSignedCert = () => { diff --git a/stylesheets/_session.scss b/stylesheets/_session.scss index 01ac68502..b64ba3f2c 100644 --- a/stylesheets/_session.scss +++ b/stylesheets/_session.scss @@ -1130,6 +1130,22 @@ label { } } + &-view { + flex-grow: 1; + display: flex; + flex-direction: column; + justify-content: space-between; + } + + &__version-info { + display: flex; + justify-content: space-between; + opacity: 0.4; + padding: $session-margin-sm $session-margin-md; + background-color: $session-shade-5; + font-size: $session-font-xs; + } + &__password-lock { display: flex; align-items: center; @@ -1272,7 +1288,6 @@ label { background-color: $session-color-white; border-color: $session-color-white; } - } .user-details-dialog { .session-id-editable { diff --git a/ts/components/EditProfileDialog.tsx b/ts/components/EditProfileDialog.tsx index e213bc2bd..0d9a43d66 100644 --- a/ts/components/EditProfileDialog.tsx +++ b/ts/components/EditProfileDialog.tsx @@ -157,15 +157,14 @@ export class EditProfileDialog extends React.Component {
{ - this.setState({ mode: 'qr' }); - }} > { + this.setState({ mode: 'qr' }); + }} />
diff --git a/ts/components/session/settings/SessionSettings.tsx b/ts/components/session/settings/SessionSettings.tsx index dd96a1d74..f7ca1d6d6 100644 --- a/ts/components/session/settings/SessionSettings.tsx +++ b/ts/components/session/settings/SessionSettings.tsx @@ -220,13 +220,25 @@ export class SettingsView extends React.Component { showLinkDeviceButton={!shouldRenderPasswordLock} category={category} /> - {shouldRenderPasswordLock ? ( - this.renderPasswordLock() - ) : ( -
- {this.renderSettingInCategory()} -
- )} +
+ {shouldRenderPasswordLock ? ( + this.renderPasswordLock() + ) : ( +
+ {this.renderSettingInCategory()} +
+ )} + {this.renderSessionInfo()} +
+ + ); + } + + public renderSessionInfo(): JSX.Element { + return ( +
+ v{window.versionInfo.version} + {window.versionInfo.commitHash}
); } diff --git a/ts/global.d.ts b/ts/global.d.ts index d1f16e980..997a55148 100644 --- a/ts/global.d.ts +++ b/ts/global.d.ts @@ -1,4 +1,6 @@ interface Window { + versionInfo: any; + Events: any; deleteAllData: any; getAccountManager: any;