Skip to content

Commit

Permalink
Added alert when using ${Name} without a selected device
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Merz committed Oct 6, 2023
1 parent fb08cb1 commit d0379ad
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/airsquared/blobsaver/app/Controller.java
Expand Up @@ -665,6 +665,13 @@ private TSS createTSS(String runningAlertTitle) {
.setIncludeBetas(betaCheckBox.isSelected())
.saveToTSSSaver(saveToTSSSaverCheckBox.isSelected())
.saveToSHSHHost(saveToSHSHHostCheckBox.isSelected());
if (pathField.getText().contains("${Name}") && deviceName == null) {
final Alert deviceNameAlert = new Alert(Alert.AlertType.WARNING);
deviceNameAlert.setTitle("Warning");
deviceNameAlert.setHeaderText("Warning");
deviceNameAlert.setContentText("You are using ${Name} variable but your device does not have a name yet. Maybe you forgot to save it or did not select it in the list first?");
deviceNameAlert.showAndWait();
}
if (!boardConfigField.isDisabled()) {
builder.setBoardConfig(boardConfigField.getText());
}
Expand Down

0 comments on commit d0379ad

Please sign in to comment.