Skip to content

Commit

Permalink
add button for map validation tool
Browse files Browse the repository at this point in the history
add button for map validation tool
partial fix for prepares FAForever#1565
  • Loading branch information
Geosearchef authored and Chris Haggan committed Apr 15, 2022
1 parent 8348a8c commit 08783b9
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public static class Server {
public static class Vault {
private String baseUrl;
private String rulesUrl;
private String mapValidationUrl;
private String mapDownloadUrlFormat;
private String mapPreviewUrlFormat;
private String replayDownloadUrlFormat;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,8 @@ void setOnCancelButtonClickedListener(Runnable cancelButtonClickedListener) {
public void onShowRulesClicked() {
platformService.showDocument(clientProperties.getVault().getRulesUrl());
}

public void onShowValidationClicked() {
platformService.showDocument(clientProperties.getVault().getMapValidationUrl());
}
}
1 change: 1 addition & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ faf-client:

vault:
rules_url: https://forums.faforever.com/viewtopic.php?f=2&t=17873
map_validation_url: ${faf-client.api.base-url}/maps/validate
mapDownloadUrlFormat: ${faf-client.vault.base-url}/faf/vault/maps/%s.zip
mapPreviewUrlFormat: ${faf-client.vault.base-url}/faf/vault/map_previews/%s/%s.png
replayDownloadUrlFormat: ${faf-client.vault.base-url}/faf/vault/replay_vault/replay.php?id=%s
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ mapVault.upload.playersFormat={0,number,#}
mapVault.upload.rankedConfirm=I confirm that this map is properly balanced and does not contain prohibited code. I'm aware that a violation results in a ban. Unchecking this results in an unranked map.
mapVault.upload.rules=I confirm that I have read the rules concerning map upload.
mapVault.upload.openRules=Show rules
mapVault.upload.openValidation=Validate metadata
mapVault.upload.retry=Retry
mapVault.loadingMaps=Loading maps…
mapVault.recommended=M&M Team Top Picks
Expand Down
8 changes: 7 additions & 1 deletion src/main/resources/theme/vault/map/map_upload.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<?import java.lang.String?>
Expand Down Expand Up @@ -63,7 +64,12 @@
<JFXCheckBox fx:id="rulesCheckBox" mnemonicParsing="false"/>
</graphic>
</Label>
<JFXButton text="%mapVault.upload.openRules" onMouseClicked="#onShowRulesClicked"/>
<HBox spacing="10.0">
<children>
<JFXButton text="%mapVault.upload.openRules" onMouseClicked="#onShowRulesClicked"/>
<JFXButton text="%mapVault.upload.openValidation" onMouseClicked="#onShowValidationClicked"/>
</children>
</HBox>
<ButtonBar prefHeight="40.0" prefWidth="200.0">
<buttons>
<JFXButton defaultButton="true" mnemonicParsing="false" onAction="#onUploadClicked" text="%mapVault.upload.uploadNow" />
Expand Down

0 comments on commit 08783b9

Please sign in to comment.