diff --git a/module/webui/index.html b/module/webui/index.html index 8c08e71..2fd8add 100644 --- a/module/webui/index.html +++ b/module/webui/index.html @@ -243,7 +243,7 @@

-

+
diff --git a/module/webui/scripts/update.js b/module/webui/scripts/update.js index 2ed2fb6..232ca6d 100644 --- a/module/webui/scripts/update.js +++ b/module/webui/scripts/update.js @@ -46,26 +46,29 @@ function setupUpdateMenu() { }, 200); } updateCard.addEventListener('click', async () => { - try { - const module = await execCommand(`[ -f ${basePath}common/tmp/module.zip ] || echo "false"`); - if (module.trim() === "false") { - showPrompt("prompt.downloading"); - await new Promise(resolve => setTimeout(resolve, 200)); - await execCommand(`sh ${basePath}common/get_extra.sh --get-update`); - showPrompt("prompt.downloaded"); - } - const changelog = await execCommand(`sh ${basePath}common/get_extra.sh --release-note`); - const lines = changelog.split('\n'); - const formattedChangelog = ` - ${lines[0]}
- ${lines.slice(1).join('
')} - `; - releaseNotes.innerHTML = formattedChangelog; - openUpdateMenu(); - } catch (error) { - showPrompt("prompt.download_fail", false); - console.error('Error download module update:', error); - } + try { + const module = await execCommand(`[ -f ${basePath}common/tmp/module.zip ] || echo "false"`); + if (module.trim() === "false") { + showPrompt("prompt.downloading"); + await new Promise(resolve => setTimeout(resolve, 200)); + await execCommand(`sh ${basePath}common/get_extra.sh --get-update`); + showPrompt("prompt.downloaded"); + } + const changelog = await execCommand(`sh ${basePath}common/get_extra.sh --release-note`); + const lines = changelog + .split('\n') + .filter(line => line.trim() !== '') + .map(line => line.startsWith('- ') ? line.slice(2) : line); + const formattedChangelog = ` +
  • ${lines[0]}
  • + ${lines.slice(1).map(line => `
  • ${line}
  • `).join('')} + `; + releaseNotes.innerHTML = formattedChangelog; + openUpdateMenu(); + } catch (error) { + showPrompt("prompt.download_fail", false); + console.error('Error download module update:', error); + } }); closeUpdate.addEventListener("click", closeUpdateMenu); UpdateMenu.addEventListener("click", (event) => { diff --git a/module/webui/styles/applist.css b/module/webui/styles/applist.css index 265f974..5d8e4b7 100644 --- a/module/webui/styles/applist.css +++ b/module/webui/styles/applist.css @@ -83,11 +83,32 @@ max-height: 85vh; padding: 0 30px; overflow-y: auto; - user-select: none; +} + +.update-content ul { + padding-left: 0; + margin: 0; +} + +.changelog-title { + font-weight: bold; + font-size: 22px; + list-style-type: none; + padding-left: 0; +} + +.update-content ul li { + margin-bottom: 5px; +} + +.update-content ul li:not(:first-child) { + list-style-type: disc; + margin-left: 15px; } .update-button-container { width: 100%; + padding: 0; display: flex; justify-content: flex-end; } @@ -95,6 +116,7 @@ .install, .reboot { margin-left: 0; + margin-top: 10px; margin-bottom: 15px; color: #3B3B3B; background-color: #fff;