hub_receive_key.fxml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?import org.cryptomator.ui.controls.FontAwesome5Spinner?>
  3. <?import org.cryptomator.ui.keyloading.hub.ReceiveKeyState?>
  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.TextField?>
  9. <?import javafx.scene.image.Image?>
  10. <?import javafx.scene.image.ImageView?>
  11. <?import javafx.scene.layout.HBox?>
  12. <?import javafx.scene.layout.VBox?>
  13. <VBox xmlns:fx="http://javafx.com/fxml"
  14. xmlns="http://javafx.com/javafx"
  15. fx:controller="org.cryptomator.ui.keyloading.hub.ReceiveKeyController"
  16. minWidth="400"
  17. maxWidth="400"
  18. minHeight="145"
  19. spacing="12">
  20. <fx:define>
  21. <ReceiveKeyState fx:id="loading" fx:constant="LOADING" />
  22. <ReceiveKeyState fx:id="needsRegistration" fx:constant="NEEDS_REGISTRATION"/>
  23. </fx:define>
  24. <padding>
  25. <Insets topRightBottomLeft="12"/>
  26. </padding>
  27. <children>
  28. <HBox spacing="12" VBox.vgrow="ALWAYS">
  29. <ImageView VBox.vgrow="ALWAYS" fitWidth="64" preserveRatio="true" cache="true">
  30. <Image url="@../img/bot/bot.png"/>
  31. </ImageView>
  32. <FontAwesome5Spinner glyphSize="12" visible="${controller.state == loading}" managed="${controller.state == loading}"/>
  33. <VBox spacing="6" visible="${controller.state == needsRegistration}" managed="${controller.state == needsRegistration}">
  34. <Label text="TODO: register device" labelFor="$locationTextField"/>
  35. <TextField fx:id="deviceName" promptText="TODO: device name" VBox.vgrow="ALWAYS"/>
  36. </VBox>
  37. </HBox>
  38. <VBox alignment="BOTTOM_CENTER" VBox.vgrow="ALWAYS">
  39. <ButtonBar buttonMinWidth="120" buttonOrder="+CX">
  40. <buttons>
  41. <Button text="%generic.button.cancel" ButtonBar.buttonData="CANCEL_CLOSE" cancelButton="true" onAction="#cancel"/>
  42. <Button text="TODO: register device" ButtonBar.buttonData="NEXT_FORWARD" visible="${controller.state == needsRegistration}" managed="${controller.state == needsRegistration}" defaultButton="true" onAction="#register"/>
  43. </buttons>
  44. </ButtonBar>
  45. </VBox>
  46. </children>
  47. </VBox>