Element-R: Add current version of the rust-sdk and vodozemac (#11785)
* Add current version of the rust-sdk and vodozemac * Use `CryptoAPI#getVersion` for old crypto * Update i18n * Fix test * Remove wrong comment
This commit is contained in:
parent
5e8d2748e0
commit
48a89a236a
4 changed files with 11 additions and 11 deletions
|
@ -69,17 +69,14 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
|
|||
});
|
||||
}
|
||||
|
||||
private getVersionInfo(): { appVersion: string; olmVersion: string } {
|
||||
private getVersionInfo(): { appVersion: string; cryptoVersion: string } {
|
||||
const brand = SdkConfig.get().brand;
|
||||
const appVersion = this.state.appVersion || "unknown";
|
||||
const olmVersionTuple = this.context.olmVersion;
|
||||
const olmVersion = olmVersionTuple
|
||||
? `${olmVersionTuple[0]}.${olmVersionTuple[1]}.${olmVersionTuple[2]}`
|
||||
: "<not-enabled>";
|
||||
const cryptoVersion = this.context.getCrypto()?.getVersion() ?? "<not-enabled>";
|
||||
|
||||
return {
|
||||
appVersion: `${_t("setting|help_about|brand_version", { brand })} ${appVersion}`,
|
||||
olmVersion: `${_t("setting|help_about|olm_version")} ${olmVersion}`,
|
||||
cryptoVersion: `${_t("setting|help_about|crypto_version")} ${cryptoVersion}`,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -220,8 +217,8 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
|
|||
}
|
||||
|
||||
private getVersionTextToCopy = (): string => {
|
||||
const { appVersion, olmVersion } = this.getVersionInfo();
|
||||
return `${appVersion}\n${olmVersion}`;
|
||||
const { appVersion, cryptoVersion } = this.getVersionInfo();
|
||||
return `${appVersion}\n${cryptoVersion}`;
|
||||
};
|
||||
|
||||
public render(): React.ReactNode {
|
||||
|
@ -302,7 +299,7 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
|
|||
);
|
||||
}
|
||||
|
||||
const { appVersion, olmVersion } = this.getVersionInfo();
|
||||
const { appVersion, cryptoVersion } = this.getVersionInfo();
|
||||
|
||||
return (
|
||||
<SettingsTab>
|
||||
|
@ -314,7 +311,7 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
|
|||
<CopyableText getTextToCopy={this.getVersionTextToCopy}>
|
||||
{appVersion}
|
||||
<br />
|
||||
{olmVersion}
|
||||
{cryptoVersion}
|
||||
<br />
|
||||
</CopyableText>
|
||||
{updateButton}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue