adjust remove vault dialog

This commit is contained in:
Armin Schrenk
2022-06-27 18:24:54 +02:00
parent fd3c8d7f78
commit 677607d210
3 changed files with 26 additions and 12 deletions

View File

@@ -4,6 +4,7 @@ import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import dagger.multibindings.IntoMap;
import org.cryptomator.common.vaults.Vault;
import org.cryptomator.ui.common.DefaultSceneFactory;
import org.cryptomator.ui.common.FxController;
import org.cryptomator.ui.common.FxControllerKey;
@@ -33,9 +34,9 @@ abstract class RemoveVaultModule {
@Provides
@RemoveVaultWindow
@RemoveVaultScoped
static Stage provideStage(StageFactory factory, @PrimaryStage Stage primaryStage, ResourceBundle resourceBundle) {
static Stage provideStage(StageFactory factory, @PrimaryStage Stage primaryStage, @RemoveVaultWindow Vault v) {
Stage stage = factory.create();
stage.setTitle(resourceBundle.getString("removeVault.title"));
stage.setTitle(v.getDisplayName());
stage.setResizable(false);
stage.initModality(Modality.WINDOW_MODAL);
stage.initOwner(primaryStage);

View File

@@ -9,26 +9,39 @@
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Circle?>
<VBox xmlns:fx="http://javafx.com/fxml"
<?import javafx.scene.Group?>
<?import javafx.scene.layout.Region?>
<HBox xmlns:fx="http://javafx.com/fxml"
xmlns="http://javafx.com/javafx"
fx:controller="org.cryptomator.ui.removevault.RemoveVaultController"
minWidth="400"
maxWidth="400"
minHeight="145"
spacing="12">
spacing="12"
alignment="TOP_LEFT">
<padding>
<Insets topRightBottomLeft="12"/>
</padding>
<children>
<HBox spacing="12" alignment="CENTER_LEFT" VBox.vgrow="ALWAYS">
<StackPane alignment="CENTER" HBox.hgrow="NEVER">
<Group>
<StackPane>
<padding>
<Insets topRightBottomLeft="6"/>
</padding>
<Circle styleClass="glyph-icon-primary" radius="24"/>
<FontAwesome5IconView styleClass="glyph-icon-white" glyph="QUESTION" glyphSize="24"/>
</StackPane>
<Label text="%removeVault.information" wrapText="true" textAlignment="LEFT" HBox.hgrow="ALWAYS"/>
</HBox>
</Group>
<VBox HBox.hgrow="ALWAYS">
<!-- TODO: migrate translations -->
<Label styleClass="label-large" text="%removeVault.title" wrapText="true" textAlignment="LEFT">
<padding>
<Insets bottom="6" top="6"/>
</padding>
</Label>
<Label text="%removeVault.description" wrapText="true" textAlignment="LEFT" HBox.hgrow="ALWAYS"/>
<VBox alignment="BOTTOM_CENTER" VBox.vgrow="ALWAYS">
<Region VBox.vgrow="ALWAYS" minHeight="18"/>
<ButtonBar buttonMinWidth="120" buttonOrder="+CI">
<buttons>
<Button text="%generic.button.cancel" ButtonBar.buttonData="CANCEL_CLOSE" defaultButton="true" cancelButton="true" onAction="#close"/>
@@ -37,4 +50,4 @@
</ButtonBar>
</VBox>
</children>
</VBox>
</HBox>

View File

@@ -85,8 +85,8 @@ addvaultwizard.success.nextStepsInstructions=Added vault "%s".\nYou need to unlo
addvaultwizard.success.unlockNow=Unlock Now
# Remove Vault
removeVault.title=Remove Vault
removeVault.information=This will only make Cryptomator forget about this vault. You can add it again later. No encrypted files will be deleted from your hard drive.
removeVault.title=Remove Vault?
removeVault.description=This will only make Cryptomator forget about this vault. You can add it again. No encrypted files will be deleted from your hard drive.
removeVault.confirmBtn=Remove Vault
# Change Password