From 7ab803d4caebd651e0ec366bf7883a42f0846e04 Mon Sep 17 00:00:00 2001 From: leukipp Date: Tue, 9 Sep 2025 20:50:56 +0200 Subject: [PATCH] ref: app update summary --- js/integration.js | 5 +++-- js/webview.js | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/js/integration.js b/js/integration.js index ffeede3..6bac5ca 100644 --- a/js/integration.js +++ b/js/integration.js @@ -226,14 +226,15 @@ const initApp = () => { */ const updateApp = async (progress = 0) => { const latest = APP.releases.latest; - if (!latest) { + if (!latest || !latest.summary) { return; } + const summary = latest.summary.length > 250 ? latest.summary.slice(0, 250) + "..." : latest.summary; const version = { title: latest.title, latest_version: latest.version, installed_version: APP.version, - release_summary: latest.summary.slice(0, 250) + "...", + release_summary: summary, release_url: latest.url, update_percentage: progress || null, in_progress: progress && progress > 0 && progress < 100, diff --git a/js/webview.js b/js/webview.js index c04a213..3e122d5 100644 --- a/js/webview.js +++ b/js/webview.js @@ -821,9 +821,9 @@ const latestRelease = async () => { } APP.releases.latest = { title: APP.title, - version: (data.tag_name || data.name || "").replace(/^v/i, ""), - summary: data.body || "", - url: data.html_url || "", + version: (data.tag_name || data.name || " ").replace(/^v/i, ""), + summary: data.body || " ", + url: data.html_url || " ", }; } catch (error) { console.warn("Github Error:", error.message);