diff --git a/client/src/main/kotlin/org/hso/texturesyncclient/app/Main.kt b/client/src/main/kotlin/org/hso/texturesyncclient/app/Main.kt index 4616f87..00475f8 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/app/Main.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/app/Main.kt @@ -8,7 +8,8 @@ import tornadofx.App class Main: App(StartupView::class){ //start first controller - private val svc = StartupViewController() + private val svc = StartupViewController() + override fun start(stage: Stage) { super.start(stage) diff --git a/client/src/main/kotlin/org/hso/texturesyncclient/controller/RootController.kt b/client/src/main/kotlin/org/hso/texturesyncclient/controller/RootController.kt index 6f8ecd1..657a7d1 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/controller/RootController.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/controller/RootController.kt @@ -26,6 +26,10 @@ import javax.imageio.ImageIO import java.util.UUID import java.nio.file.Files import java.io.FileOutputStream +import java.text.SimpleDateFormat +import java.text.DateFormat + + class RootController : Controller() { @@ -190,7 +194,13 @@ class RootController : Controller() { */ fun showDetail(data: Texture) { mvc.setPreview3DTexture(con.getTexturePreview(data.textureHash)) - mvc.setMeta(data.name, data.resolution.toString(), "") + + val sdf = SimpleDateFormat("dd.MM.yyyy") + + + + + mvc.setMeta(data.name, "${data.resolution.first.toString()}px x ${data.resolution.second.toString()}px", data.format.toString(), sdf.format(data.addedOn.time)) mvc.setTags(data.tags.toList().observable()) selectedTexture = data } diff --git a/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/DetailView.kt b/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/DetailView.kt index d586886..5f05336 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/DetailView.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/DetailView.kt @@ -39,7 +39,7 @@ class DetailView: View() { } } - field("Meta") { + field { add(metaLabel) } diff --git a/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/MainViewController.kt b/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/MainViewController.kt index bd8ff50..24492df 100644 --- a/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/MainViewController.kt +++ b/client/src/main/kotlin/org/hso/texturesyncclient/view/mainView/MainViewController.kt @@ -36,8 +36,8 @@ class MainViewController : Controller() { preview.setTexture(img) } - fun setMeta(name: String, res: String, etc: String) { - metaLabel.text = "Name: $name\nAuflösung: $res\nAnderes: $etc" + fun setMeta(name: String, res: String, format: String, date: String) { + metaLabel.text = "Name: $name\nAuflösung: $res\nFormat: $format\nEinfügedatum: $date" } fun setTags(chips: ObservableList) {