UI: settings show/hide update display (#1072)

* UI: settings show/hide update display

This PR replaces the PR #1003

In this PR, the visual for available update is added to the foreground.

There are new settings to generally show/hide the update display, and only administrators receive the update display.

* change to `Bean`

* Update AppUpdateShowService.java

* add update message

* revision service

* change shouldShow

* Update githubVersion.js

* rm folder

* Update AppUpdateService.java
This commit is contained in:
Ludy
2024-04-21 13:15:18 +02:00
committed by GitHub
parent e74a8e434b
commit a5000fbbc5
41 changed files with 210 additions and 5 deletions

View File

@@ -23,6 +23,15 @@
<br>
<input type="text" id="searchBar" onkeyup="filterCards()" th:placeholder="#{home.searchBar}" autofocus>
<div class="features-container">
<div th:if="${@shouldShow}" class="feature-card favorite" id="update-link" style="display: none;">
<a href="https://github.com/Stirling-Tools/Stirling-PDF/releases" target="_blank" class="nav-link text-body-secondary px-2" rel="noopener">
<div class="d-flex align-items-center">
<img class="card-icon home-card-icon home-card-icon-colour" src="images/update.svg" alt="Icon" width="30" height="30">
<h5 class="card-title lookatme ms-2" th:text="#{settings.update}" th:data-lookatme-text="#{settings.update}"></h5>
</div>
<p class="card-text" id="app-update"></p>
</a>
</div>
<div th:replace="~{fragments/card :: card(id='pipeline', cardTitle=#{home.pipeline.title}, cardText=#{home.pipeline.desc}, cardLink='pipeline', svgPath='images/pipeline.svg', tags=#{pipeline.tags})}"></div>
<div th:replace="~{fragments/card :: card(id='view-pdf', cardTitle=#{home.viewPdf.title}, cardText=#{home.viewPdf.desc}, cardLink='view-pdf', svgPath='images/book-opened.svg', tags=#{viewPdf.tags})}"></div>