mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-09 07:20:04 -04:00
update: wrap release notes in scroll panel, show if update unavailable for downloading
Fixes GH-31
This commit is contained in:
parent
c9795c4451
commit
3c93f7cc45
@ -30,6 +30,7 @@ import de.bixilon.minosoft.util.logging.LogMessageType
|
|||||||
import de.bixilon.minosoft.util.system.SystemUtil
|
import de.bixilon.minosoft.util.system.SystemUtil
|
||||||
import javafx.fxml.FXML
|
import javafx.fxml.FXML
|
||||||
import javafx.scene.control.Button
|
import javafx.scene.control.Button
|
||||||
|
import javafx.scene.control.Tooltip
|
||||||
import javafx.scene.input.KeyCode
|
import javafx.scene.input.KeyCode
|
||||||
import javafx.scene.input.KeyEvent
|
import javafx.scene.input.KeyEvent
|
||||||
import javafx.scene.text.TextFlow
|
import javafx.scene.text.TextFlow
|
||||||
@ -62,6 +63,11 @@ class UpdateAvailableDialog(
|
|||||||
|
|
||||||
openButtonFX.isDisable = update.page === null
|
openButtonFX.isDisable = update.page === null
|
||||||
updateButtonFX.isDisable = update.download === null
|
updateButtonFX.isDisable = update.download === null
|
||||||
|
|
||||||
|
if (update.download == null) {
|
||||||
|
val tooltip = Tooltip().apply { ctext = UNAVAILABLE; styleClass += "tooltip-error" }
|
||||||
|
Tooltip.install(updateButtonFX.parent, tooltip) // can not add to the button, because java fx sucks. disabled nodes don't get click/hover events
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun postInit() {
|
override fun postInit() {
|
||||||
@ -107,5 +113,7 @@ class UpdateAvailableDialog(
|
|||||||
private val LATER = i18n("updater.available.later")
|
private val LATER = i18n("updater.available.later")
|
||||||
private val OPEN = i18n("updater.available.open")
|
private val OPEN = i18n("updater.available.open")
|
||||||
private val UPDATE = i18n("updater.available.update")
|
private val UPDATE = i18n("updater.available.update")
|
||||||
|
|
||||||
|
private val UNAVAILABLE = i18n("updater.available.unavailable")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<?import javafx.geometry.*?>
|
<?import javafx.geometry.*?>
|
||||||
<?import javafx.scene.control.Button?>
|
<?import javafx.scene.control.*?>
|
||||||
<?import javafx.scene.layout.*?>
|
<?import javafx.scene.layout.*?>
|
||||||
<?import javafx.scene.text.Text?>
|
<?import javafx.scene.text.Text?>
|
||||||
<?import javafx.scene.text.TextFlow?>
|
<?import javafx.scene.text.TextFlow?>
|
||||||
@ -37,12 +37,14 @@
|
|||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
<Text text="New update available: whatever"/>
|
<Text text="New update available: whatever"/>
|
||||||
</TextFlow>
|
</TextFlow>
|
||||||
<TextFlow fx:id="releaseNotesFX" GridPane.rowIndex="1">
|
<ScrollPane GridPane.rowIndex="1">
|
||||||
<GridPane.margin>
|
<TextFlow fx:id="releaseNotesFX">
|
||||||
<Insets bottom="20.0" left="5.0" right="5.0" top="40.0"/>
|
<GridPane.margin>
|
||||||
</GridPane.margin>
|
<Insets bottom="20.0" left="5.0" right="5.0" top="40.0"/>
|
||||||
<Text text="Long notes on what is cool about the update"/>
|
</GridPane.margin>
|
||||||
</TextFlow>
|
<Text text="Long notes on what is cool about the update"/>
|
||||||
|
</TextFlow>
|
||||||
|
</ScrollPane>
|
||||||
<GridPane GridPane.rowIndex="2">
|
<GridPane GridPane.rowIndex="2">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="NEVER"/>
|
<ColumnConstraints hgrow="NEVER"/>
|
||||||
|
@ -174,6 +174,11 @@
|
|||||||
-fx-padding: 0;
|
-fx-padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scroll-pane,
|
||||||
|
.scroll-pane > .viewport {
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* General panes */
|
/* General panes */
|
||||||
|
|
||||||
|
@ -230,6 +230,7 @@ minosoft:updater.available.dismiss=Dismiss
|
|||||||
minosoft:updater.available.later=Update later
|
minosoft:updater.available.later=Update later
|
||||||
minosoft:updater.available.open=Open in browser
|
minosoft:updater.available.open=Open in browser
|
||||||
minosoft:updater.available.update=Update now
|
minosoft:updater.available.update=Update now
|
||||||
|
updater.available.unavailable=The update is not available for downloading.\nThe update is only built for linux (64bit) at the moment.\nIf you need it for a different platform, feel free to download it from github actions or build it yourself.\nSorry :(
|
||||||
|
|
||||||
|
|
||||||
minosoft:updater.ask.title=Update checking
|
minosoft:updater.ask.title=Update checking
|
||||||
|
Loading…
x
Reference in New Issue
Block a user