hub_register_device.fxml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?import org.cryptomator.ui.controls.FontAwesome5IconView?>
  3. <?import javafx.geometry.Insets?>
  4. <?import javafx.scene.control.Button?>
  5. <?import javafx.scene.control.ButtonBar?>
  6. <?import javafx.scene.control.Label?>
  7. <?import javafx.scene.control.TextField?>
  8. <?import javafx.scene.Group?>
  9. <?import javafx.scene.layout.HBox?>
  10. <?import javafx.scene.layout.Region?>
  11. <?import javafx.scene.layout.StackPane?>
  12. <?import javafx.scene.layout.VBox?>
  13. <?import javafx.scene.shape.Circle?>
  14. <?import org.cryptomator.ui.controls.FontAwesome5Spinner?>
  15. <HBox xmlns:fx="http://javafx.com/fxml"
  16. xmlns="http://javafx.com/javafx"
  17. fx:controller="org.cryptomator.ui.keyloading.hub.RegisterDeviceController"
  18. minWidth="400"
  19. maxWidth="400"
  20. minHeight="145"
  21. spacing="12"
  22. alignment="TOP_LEFT">
  23. <padding>
  24. <Insets topRightBottomLeft="12"/>
  25. </padding>
  26. <children>
  27. <Group>
  28. <StackPane>
  29. <padding>
  30. <Insets topRightBottomLeft="6"/>
  31. </padding>
  32. <Circle styleClass="glyph-icon-primary" radius="24"/>
  33. <FontAwesome5IconView styleClass="glyph-icon-white" glyph="INFO" glyphSize="24"/>
  34. </StackPane>
  35. </Group>
  36. <VBox HBox.hgrow="ALWAYS">
  37. <Label styleClass="label-large" text="%hub.register.message" wrapText="true" textAlignment="LEFT">
  38. <padding>
  39. <Insets bottom="6" top="6"/>
  40. </padding>
  41. </Label>
  42. <Label text="%hub.register.description" wrapText="true"/>
  43. <HBox spacing="6" alignment="CENTER_LEFT">
  44. <padding>
  45. <Insets top="12"/>
  46. </padding>
  47. <Label text="Account Key" labelFor="$setupCodeField"/>
  48. <TextField fx:id="setupCodeField" HBox.hgrow="ALWAYS"/>
  49. </HBox>
  50. <HBox spacing="6" alignment="CENTER_LEFT">
  51. <padding>
  52. <Insets top="12"/>
  53. </padding>
  54. <Label text="%hub.register.nameLabel" labelFor="$deviceNameField"/>
  55. <TextField fx:id="deviceNameField" HBox.hgrow="ALWAYS"/>
  56. </HBox>
  57. <HBox alignment="TOP_RIGHT">
  58. <Label text="%hub.register.occupiedMsg" textAlignment="RIGHT" alignment="CENTER_RIGHT" visible="${controller.deviceNameAlreadyExists}" managed="${controller.deviceNameAlreadyExists}" graphicTextGap="6">
  59. <padding>
  60. <Insets top="6"/>
  61. </padding>
  62. <graphic>
  63. <FontAwesome5IconView glyph="TIMES" styleClass="glyph-icon-red"/>
  64. </graphic>
  65. </Label>
  66. <Label text="%hub.register.invalidAccountKeyLabel" textAlignment="RIGHT" alignment="CENTER_RIGHT" visible="${controller.invalidSetupCode}" managed="${controller.invalidSetupCode}" graphicTextGap="6">
  67. <padding>
  68. <Insets top="6"/>
  69. </padding>
  70. <graphic>
  71. <FontAwesome5IconView glyph="TIMES" styleClass="glyph-icon-red"/>
  72. </graphic>
  73. </Label>
  74. </HBox>
  75. <Region VBox.vgrow="ALWAYS" minHeight="18"/>
  76. <ButtonBar buttonMinWidth="120" buttonOrder="+CU">
  77. <buttons>
  78. <Button text="%generic.button.cancel" ButtonBar.buttonData="CANCEL_CLOSE" cancelButton="true" onAction="#close"/>
  79. <Button fx:id="registerBtn" text="%hub.register.registerBtn" ButtonBar.buttonData="OTHER" defaultButton="true" onAction="#register" contentDisplay="TEXT_ONLY" >
  80. <graphic>
  81. <FontAwesome5Spinner glyphSize="12" />
  82. </graphic>
  83. </Button>
  84. </buttons>
  85. </ButtonBar>
  86. </VBox>
  87. </children>
  88. </HBox>