Display M1/Intel in About screen

This commit is contained in:
Fedor Indutny 2021-12-14 00:04:29 +01:00 committed by GitHub
parent 73c702515b
commit e60773cdf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -18,10 +18,19 @@ contextBridge.exposeInMainWorld('SignalContext', {
environmentText.push(appInstance);
}
let platform = '';
if (process.platform === 'darwin') {
if (process.arch === 'arm64') {
platform = ' (M1)';
} else {
platform = ' (Intel)';
}
}
ReactDOM.render(
React.createElement(About, {
closeAbout: () => ipcRenderer.send('close-about'),
environment: environmentText.join(' - '),
environment: `${environmentText.join(' - ')}${platform}`,
i18n: SignalContext.i18n,
version: SignalContext.getVersion(),
}),