mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 09:00:26 +00:00
Include release date in update changelog
This commit is contained in:
parent
809999394d
commit
f61bef8bc0
2 changed files with 11 additions and 2 deletions
|
@ -9,6 +9,10 @@ import javafx.scene.control.ButtonBar;
|
|||
import javafx.scene.control.ButtonType;
|
||||
import javafx.stage.Modality;
|
||||
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.format.FormatStyle;
|
||||
|
||||
public class UpdateChangelogAlert {
|
||||
|
||||
private static boolean shown = false;
|
||||
|
@ -35,8 +39,11 @@ public class UpdateChangelogAlert {
|
|||
alert.setAlertType(Alert.AlertType.NONE);
|
||||
alert.initModality(Modality.NONE);
|
||||
|
||||
var date = update.getReleaseDate() != null ?
|
||||
DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM)
|
||||
.format(update.getReleaseDate().atZone(ZoneId.systemDefault())) : "Latest";
|
||||
var markdown = new MarkdownComp(update.getRawDescription(), s -> {
|
||||
var header = " <h1>" + AppI18n.get("whatsNew", update.getName()) + "</h1>";
|
||||
var header = " <h1>" + AppI18n.get("whatsNew", update.getName(), date) + "</h1>";
|
||||
return header + s;
|
||||
})
|
||||
.createRegion();
|
||||
|
|
|
@ -227,7 +227,8 @@ public abstract class UpdateHandler {
|
|||
var performedUpdate = new PerformedUpdate(
|
||||
preparedUpdate.getValue().getVersion(),
|
||||
preparedUpdate.getValue().getBody(),
|
||||
preparedUpdate.getValue().getVersion());
|
||||
preparedUpdate.getValue().getVersion(),
|
||||
preparedUpdate.getValue().getReleaseDate());
|
||||
AppCache.update("performedUpdate", performedUpdate);
|
||||
}
|
||||
});
|
||||
|
@ -256,6 +257,7 @@ public abstract class UpdateHandler {
|
|||
String name;
|
||||
String rawDescription;
|
||||
String newVersion;
|
||||
Instant releaseDate;
|
||||
}
|
||||
|
||||
@Value
|
||||
|
|
Loading…
Reference in a new issue