From 8c2d050854519e4a17039718bdb45481dfefed05 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Tue, 18 Apr 2023 22:49:25 +0200 Subject: [PATCH] updated XML --- src/core/Global.ttslua | 27 +++++++++------------------ xml/UpdateNotification.xml | 29 +++++++---------------------- 2 files changed, 16 insertions(+), 40 deletions(-) diff --git a/src/core/Global.ttslua b/src/core/Global.ttslua index d2c4cc98..a035684a 100644 --- a/src/core/Global.ttslua +++ b/src/core/Global.ttslua @@ -1086,29 +1086,20 @@ function updateNotificationLoading() header.value = header.value .. modMeta["latestVersion"] -- update the release highlights - local releaseHighlightWrapper = find_tag_with_id(ui, 'releaseHighlightWrapper') - releaseHighlightWrapper.children = {} + local highlightText = "• " .. highlights[1] - for _, entry in pairs(highlights) do - table.insert(releaseHighlightWrapper.children, - { tag = 'Row', - attributes = { class="releaseHighlight" }, - children = - { tag = 'Cell', - attributes = { class="releaseHighlight" }, - children = - { tag = 'Text', - attributes = { class="releaseHighlight" }, - value = "• " .. entry, - } - } - } - ) + for i, entry in pairs(highlights) do + if i~=1 then + highlightText = highlightText .. "\n• " .. entry + end end + local releaseHighlightText = find_tag_with_id(ui, 'releaseHighlightText') + releaseHighlightText.value = highlightText + -- set height for amount of highlights local highlightRow = find_tag_with_id(ui, 'highlightRow') - highlightRow.attributes.preferredHeight = 50*#highlights + highlightRow.attributes.preferredHeight = 20*#highlights local window = find_tag_with_id(ui, 'updateNotification') window.attributes.height = highlightRow.attributes.preferredHeight + 100 diff --git a/xml/UpdateNotification.xml b/xml/UpdateNotification.xml index 0c0e6fc6..8b152977 100644 --- a/xml/UpdateNotification.xml +++ b/xml/UpdateNotification.xml @@ -1,15 +1,5 @@ - - - - - - - + - - + - - - - - Placeholder - - - + + + Placeholder +