fix: unify client confirmations and inline rename UX

This commit is contained in:
2026-02-19 19:36:52 +08:00
parent d604b8dc7b
commit 5082a5ed04
2 changed files with 283 additions and 26 deletions

View File

@@ -172,6 +172,14 @@ function compareLooseVersion(left, right) {
return 0;
}
function normalizeReleaseNotes(rawValue) {
return String(rawValue || '')
.replace(/\\r\\n/g, '\n')
.replace(/\\n/g, '\n')
.replace(/\\r/g, '\n')
.trim();
}
function getDesktopUpdateConfig() {
const latestVersion = normalizeVersion(
SettingsDB.get('desktop_latest_version') || DEFAULT_DESKTOP_VERSION,
@@ -183,11 +191,11 @@ function getDesktopUpdateConfig() {
DEFAULT_DESKTOP_INSTALLER_URL ||
''
).trim();
const releaseNotes = String(
const releaseNotes = normalizeReleaseNotes(
SettingsDB.get('desktop_release_notes') ||
DEFAULT_DESKTOP_RELEASE_NOTES ||
''
).trim();
);
const mandatory = SettingsDB.get('desktop_force_update') === 'true';
return {
latestVersion,