Version info

pull/740/head
Vincent 5 years ago
parent 13be2a7b7b
commit 4fe82d28d9

@ -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 // temporary clearnet fix
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
window.getSelfSignedCert = () => { window.getSelfSignedCert = () => {

@ -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 { &__password-lock {
display: flex; display: flex;
align-items: center; align-items: center;
@ -1272,7 +1288,6 @@ label {
background-color: $session-color-white; background-color: $session-color-white;
border-color: $session-color-white; border-color: $session-color-white;
} }
} }
.user-details-dialog { .user-details-dialog {
.session-id-editable { .session-id-editable {

@ -157,15 +157,14 @@ export class EditProfileDialog extends React.Component<Props, State> {
</div> </div>
<div <div
className="qr-view-button" className="qr-view-button"
role="button"
onClick={() => {
this.setState({ mode: 'qr' });
}}
> >
<SessionIconButton <SessionIconButton
iconType={SessionIconType.QR} iconType={SessionIconType.QR}
iconSize={SessionIconSize.Small} iconSize={SessionIconSize.Small}
iconColor={'#000000'} iconColor={'#000000'}
onClick={() => {
this.setState({ mode: 'qr' });
}}
/> />
</div> </div>
</div> </div>

@ -220,13 +220,25 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
showLinkDeviceButton={!shouldRenderPasswordLock} showLinkDeviceButton={!shouldRenderPasswordLock}
category={category} category={category}
/> />
{shouldRenderPasswordLock ? ( <div className="session-settings-view">
this.renderPasswordLock() {shouldRenderPasswordLock ? (
) : ( this.renderPasswordLock()
<div ref={this.settingsViewRef} className="session-settings-list"> ) : (
{this.renderSettingInCategory()} <div ref={this.settingsViewRef} className="session-settings-list">
</div> {this.renderSettingInCategory()}
)} </div>
)}
{this.renderSessionInfo()}
</div>
</div>
);
}
public renderSessionInfo(): JSX.Element {
return (
<div className="session-settings__version-info">
<span>v{window.versionInfo.version}</span>
<span>{window.versionInfo.commitHash}</span>
</div> </div>
); );
} }

2
ts/global.d.ts vendored

@ -1,4 +1,6 @@
interface Window { interface Window {
versionInfo: any;
Events: any; Events: any;
deleteAllData: any; deleteAllData: any;
getAccountManager: any; getAccountManager: any;

Loading…
Cancel
Save