1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-23 18:53:36 +02:00

Desktop: Regression: Fixed format of copied version info

This commit is contained in:
Laurent Cozic 2020-10-21 10:10:18 +01:00
parent d9e93cd6c4
commit 9d0bb4257f
2 changed files with 11 additions and 4 deletions

View File

@ -374,7 +374,7 @@ function useMenu(props:Props) {
});
if (copyToClipboard === 0) {
clipboard.writeText(v.message);
clipboard.writeText(v.body);
}
}

View File

@ -10,10 +10,14 @@ export default function versionInfo(packageInfo:any) {
}
const copyrightText = 'Copyright © 2016-YYYY Laurent Cozic';
const now = new Date();
const message = [
const header = [
p.description,
'',
copyrightText.replace('YYYY', `${now.getFullYear()}`),
];
const body = [
_('%s %s (%s, %s)', p.name, p.version, Setting.value('env'), process.platform),
'',
_('Client ID: %s', Setting.value('clientId')),
@ -21,12 +25,15 @@ export default function versionInfo(packageInfo:any) {
_('Profile Version: %s', reg.db().version()),
_('Keychain Supported: %s', Setting.value('keychain.supported') >= 1 ? _('Yes') : _('No')),
];
if (gitInfo) {
message.push(`\n${gitInfo}`);
body.push(`\n${gitInfo}`);
console.info(gitInfo);
}
return {
message: message.join('\n'),
header: header.join('\n'),
body: body.join('\n'),
message: header.concat(body).join('\n'),
};
}