This commit is contained in:
2026-06-12 17:52:26 +02:00
parent 20722d4365
commit 94b00e69da
@@ -4,6 +4,7 @@ import java.math.BigDecimal;
import java.math.RoundingMode;
import java.nio.file.Path;
import java.time.Instant;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.HashSet;
@@ -73,6 +74,9 @@ public final class GuiModelPricesTab {
/** V3.3-Whitelist der unterstuetzten Provider. */
public static final List<String> SUPPORTED_PROVIDERS = List.of("openai-compatible", "claude");
private static final DateTimeFormatter GERMAN_DATE_TIME =
DateTimeFormatter.ofPattern("dd.MM.yyyy HH:mm");
private static final BigDecimal NANO_TO_USD_PER_MILLION = new BigDecimal("1000000000")
.divide(new BigDecimal("1000000"));
@@ -193,11 +197,11 @@ public final class GuiModelPricesTab {
outCol.setPrefWidth(120);
outCol.setCellFactory(col -> new PriceEditCell(false));
TableColumn<EditableEntry, String> currencyCol = new TableColumn<>("Waehrung");
TableColumn<EditableEntry, String> currencyCol = new TableColumn<>("Währung");
currencyCol.setCellValueFactory(c -> c.getValue().currencyProperty);
currencyCol.setPrefWidth(80);
TableColumn<EditableEntry, String> updatedCol = new TableColumn<>("Letzte Aenderung");
TableColumn<EditableEntry, String> updatedCol = new TableColumn<>("Letzte Änderung");
updatedCol.setCellValueFactory(c -> c.getValue().updatedAtTextProperty);
updatedCol.setPrefWidth(180);
@@ -446,7 +450,7 @@ public final class GuiModelPricesTab {
this.currencyProperty = new SimpleStringProperty(currency);
this.updatedAtTextProperty = new SimpleStringProperty(
invalidUpdatedAt ? "ungueltig"
: updatedAt == null ? "" : DateTimeFormatter.ISO_INSTANT.format(updatedAt));
: updatedAt == null ? "" : GERMAN_DATE_TIME.format(updatedAt.atZone(ZoneId.systemDefault())));
this.invalidUpdatedAtProperty = new SimpleObjectProperty<>(invalidUpdatedAt);
this.editable = editable;
this.dirty = false;