implemented a 'Share Vault' button in vault_detail_locked and added a new window for vault sharing options

This commit is contained in:
Jan-Peter Klein
2024-01-16 17:21:07 +01:00
parent 8f32b46b30
commit 4ca190cfb9
15 changed files with 283 additions and 2 deletions
+64
View File
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ButtonBar?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.Region?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.shape.Circle?>
<?import org.cryptomator.ui.controls.FontAwesome5IconView?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.image.Image?>
<VBox xmlns:fx="http://javafx.com/fxml"
xmlns="http://javafx.com/javafx"
fx:controller="org.cryptomator.ui.sharevault.ShareVaultController"
prefWidth="600"
spacing="12"
alignment="CENTER_LEFT">
<padding>
<Insets topRightBottomLeft="24"/>
</padding>
<HBox spacing="12" VBox.vgrow="NEVER">
<StackPane HBox.hgrow="NEVER">
<Circle styleClass="glyph-icon-primary" radius="24"/>
<FontAwesome5IconView styleClass="glyph-icon-white" glyph="INFO" glyphSize="24"/>
</StackPane>
<VBox spacing="6" HBox.hgrow="ALWAYS" visible="${controller.hubVault}" managed="${controller.hubVault}">
<Label text="%shareVault.hub.message" styleClass="label-extra-large" wrapText="true"/>
<Label text="%shareVault.hub.instruction.0" wrapText="true"/>
<Label text="%shareVault.hub.instruction.1" wrapText="true"/>
<Label text="%shareVault.hub.instruction.2" wrapText="true"/>
</VBox>
<VBox spacing="12" HBox.hgrow="ALWAYS" visible="${!controller.hubVault}" managed="${!controller.hubVault}">
<Label text="%shareVault.message" styleClass="label-extra-large" wrapText="true"/>
<Label text="%shareVault.description" wrapText="true"/>
<Label text="%shareVault.instruction.0" wrapText="true"/>
<Label text="%shareVault.instruction.1" wrapText="true"/>
<Label text="%shareVault.more" wrapText="true"/>
<HBox spacing="6" style="-fx-padding: 10px; -fx-background-color: white; -fx-border-color: #dddddd; -fx-border-width: 2px; -fx-border-radius: 5px;">
<VBox spacing="6" alignment="CENTER_LEFT">
<Label text="%shareVault.info.1" style="-fx-font-weight: bold;" wrapText="true"/>
<Label text="%shareVault.info.2" wrapText="true"/>
<Label text="%shareVault.info.3" wrapText="true"/>
<Label text="%shareVault.info.4" wrapText="true"/>
<Label text="%shareVault.info.5" wrapText="true"/>
</VBox>
<Region HBox.hgrow="ALWAYS"/>
<ImageView HBox.hgrow="ALWAYS" fitWidth="200" preserveRatio="true" cache="true">
<Image url="@../img/share-hub-logo.png"/>
</ImageView>
</HBox>
</VBox>
</HBox>
<Region VBox.vgrow="ALWAYS"/>
<ButtonBar buttonMinWidth="120" buttonOrder="+CX">
<buttons>
<Button text="%generic.button.close" ButtonBar.buttonData="CANCEL_CLOSE" onAction="#close"/>
<Button text="%shareVault.hub.openHub" ButtonBar.buttonData="NEXT_FORWARD" defaultButton="true" onAction="#openHub" visible="${controller.hubVault}" managed="${controller.hubVault}"/>
<Button text="%shareVault.visitHub" ButtonBar.buttonData="NEXT_FORWARD" defaultButton="true" onAction="#visitHub" visible="${!controller.hubVault}" managed="${!controller.hubVault}"/>
</buttons>
</ButtonBar>
</VBox>
@@ -24,6 +24,11 @@
<FontAwesome5IconView glyph="KEY" glyphSize="15"/>
</graphic>
</Button>
<Button text="%main.vaultDetail.share" minWidth="120" onAction="#share">
<graphic>
<FontAwesome5IconView glyph="SHARE" glyphSize="15"/>
</graphic>
</Button>
<Hyperlink text="%main.vaultDetail.passwordSavedInKeychain" visible="${controller.passwordSaved}" onAction="#showKeyVaultOptions">
<graphic>
<FontAwesome5IconView glyph="LOCK"/>
+22 -1
View File
@@ -387,6 +387,7 @@ main.vaultDetail.unlockBtn=Unlock…
main.vaultDetail.unlockNowBtn=Unlock Now
main.vaultDetail.optionsBtn=Vault Options
main.vaultDetail.passwordSavedInKeychain=Password saved
main.vaultDetail.share=Share...
### Unlocked
main.vaultDetail.unlockedStatus=UNLOCKED
main.vaultDetail.accessLocation=Your vault's contents are accessible here:
@@ -524,4 +525,24 @@ updateReminder.message=Check for Updates?
updateReminder.description=Stay updated with new features, bug fixes, and security improvements. We recommend to automatically check for updates.
updateReminder.notNow=Not Now
updateReminder.yesOnce=Yes, Once
updateReminder.yesAutomatically=Yes, Automatically
updateReminder.yesAutomatically=Yes, Automatically
# Share Vault
shareVault.title=Share Vault
shareVault.message=Would you like to share your vault with others?
shareVault.description=Always be careful when sharing your vault with other people. In short, follow these steps:
shareVault.instruction.0=To encrypt files, follow these steps:
shareVault.instruction.1=1. Share access of the encrypted vault folder via cloud storage.\n2. Share vault password in a secure way.
shareVault.more=For more information, check out our best practices.
shareVault.info.1=The secure way to work in teams
shareVault.info.2=Use Cryptomator Hub!
shareVault.info.3=• Zero-knowledge key management
shareVault.info.4=• Strong authentication
shareVault.info.5=• ...
shareVault.visitHub=Visit Cryptomator Hub
shareVault.hub.message=How to share a Hub vault
shareVault.hub.instruction.0=In order to share the vault content with another team member, you have to perform two steps:
shareVault.hub.instruction.1=1. Share access of the encrypted vault folder via cloud storage.
shareVault.hub.instruction.2=2. Grant access to team member in Cryptomator Hub.
shareVault.hub.openHub=Open Cryptomator Hub
Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB