mirror of
https://github.com/siyuan-note/siyuan
synced 2026-04-21 13:37:52 +00:00
🎨 Update system version retrieval in error.html to use process.getSystemVersion for better accuracy (#17449)
This commit is contained in:
parent
3247c43564
commit
2e4c49151f
1 changed files with 3 additions and 2 deletions
|
|
@ -240,9 +240,10 @@
|
|||
'win32': 'Windows',
|
||||
'linux': 'Linux'
|
||||
}[process.platform] || process.platform;
|
||||
|
||||
const release = typeof process.getSystemVersion === 'function'
|
||||
? process.getSystemVersion() // Electron 提供,系统版本
|
||||
: os.release(); // Node.js 提供,内核版本
|
||||
// Windows 系统版本判断
|
||||
const release = os.release();
|
||||
if (process.platform === 'win32') {
|
||||
const versionParts = release.split('.'); // 10.0.22000
|
||||
if (versionParts.length >= 3) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue