addvault_new_location.fxml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?import org.cryptomator.ui.controls.FontAwesome5IconView?>
  3. <?import org.cryptomator.ui.controls.FontAwesome5Spinner?>
  4. <?import javafx.geometry.Insets?>
  5. <?import javafx.scene.control.Button?>
  6. <?import javafx.scene.control.ButtonBar?>
  7. <?import javafx.scene.control.Label?>
  8. <?import javafx.scene.control.RadioButton?>
  9. <?import javafx.scene.control.ScrollPane?>
  10. <?import javafx.scene.control.TextField?>
  11. <?import javafx.scene.control.ToggleGroup?>
  12. <?import javafx.scene.layout.HBox?>
  13. <?import javafx.scene.layout.Region?>
  14. <?import javafx.scene.layout.VBox?>
  15. <VBox xmlns:fx="http://javafx.com/fxml"
  16. xmlns="http://javafx.com/javafx"
  17. fx:controller="org.cryptomator.ui.addvaultwizard.CreateNewVaultLocationController"
  18. prefWidth="450"
  19. prefHeight="450"
  20. spacing="12"
  21. alignment="CENTER_LEFT">
  22. <fx:define>
  23. <ToggleGroup fx:id="locationPresetsToggler"/>
  24. <FontAwesome5IconView fx:id="badLocation" styleClass="glyph-icon-red" glyph="TIMES"/>
  25. <FontAwesome5IconView fx:id="goodLocation" styleClass="glyph-icon-primary" glyph="CHECK"/>
  26. </fx:define>
  27. <padding>
  28. <Insets topRightBottomLeft="24"/>
  29. </padding>
  30. <children>
  31. <Region VBox.vgrow="ALWAYS"/>
  32. <Label wrapText="true" text="%addvaultwizard.new.locationInstruction"/>
  33. <ScrollPane hbarPolicy="NEVER">
  34. <VBox fx:id="radioButtonVBox" spacing="6">
  35. <!-- PLACEHOLDER, more radio buttons are added programmatically via controller -->
  36. <HBox fx:id="customLocationRadioBtn" spacing="12" alignment="CENTER_LEFT">
  37. <RadioButton fx:id="customRadioButton" toggleGroup="${locationPresetsToggler}" text="%addvaultwizard.new.directoryPickerLabel"/>
  38. <Button contentDisplay="LEFT" text="%addvaultwizard.new.directoryPickerButton" onAction="#chooseCustomVaultPath" disable="${controller.usePresetPath}">
  39. <graphic>
  40. <FontAwesome5IconView glyph="FOLDER_OPEN"/>
  41. </graphic>
  42. </Button>
  43. </HBox>
  44. </VBox>
  45. </ScrollPane>
  46. <Region prefHeight="2"/>
  47. <Label wrapText="true" text="%addvaultwizard.new.locationLoading" visible="${controller.loadingPresetLocations}" managed="${controller.loadingPresetLocations}" graphicTextGap="8">
  48. <graphic>
  49. <FontAwesome5Spinner/>
  50. </graphic>
  51. </Label>
  52. <Region prefHeight="12" VBox.vgrow="NEVER"/>
  53. <VBox spacing="6">
  54. <Label text="%addvaultwizard.new.locationLabel" labelFor="$locationTextField"/>
  55. <TextField fx:id="locationTextField" promptText="%addvaultwizard.new.locationPrompt" text="${controller.vaultPath}" editable="false" disable="${!controller.anyRadioButtonSelected}" HBox.hgrow="ALWAYS"/>
  56. <Label fx:id="locationStatusLabel" alignment="CENTER_RIGHT" wrapText="true" visible="${controller.anyRadioButtonSelected}" maxWidth="Infinity" graphicTextGap="6"/>
  57. </VBox>
  58. <Region VBox.vgrow="ALWAYS"/>
  59. <ButtonBar buttonMinWidth="120" buttonOrder="B+X">
  60. <buttons>
  61. <Button text="%generic.button.back" ButtonBar.buttonData="BACK_PREVIOUS" onAction="#back"/>
  62. <Button text="%generic.button.next" ButtonBar.buttonData="NEXT_FORWARD" onAction="#next" defaultButton="true" disable="${!controller.validVaultPath}"/>
  63. </buttons>
  64. </ButtonBar>
  65. </children>
  66. </VBox>