mirror of
https://github.com/cryptomator/cryptomator.git
synced 2024-11-23 03:59:51 +00:00
changed dialog prefix
This commit is contained in:
parent
1ba401b8e6
commit
1ac017e3ab
@ -12,7 +12,7 @@ public enum FxmlFile {
|
||||
CONVERTVAULT_HUBTOPASSWORD_START("/fxml/convertvault_hubtopassword_start.fxml"), //
|
||||
CONVERTVAULT_HUBTOPASSWORD_CONVERT("/fxml/convertvault_hubtopassword_convert.fxml"), //
|
||||
CONVERTVAULT_HUBTOPASSWORD_SUCCESS("/fxml/convertvault_hubtopassword_success.fxml"), //
|
||||
DOKANY_INFO_DIALOG("/fxml/dokany_info.fxml"), //
|
||||
DOKANY_SUPPORT_END_DIALOG("/fxml/dokany_support_end.fxml"), //
|
||||
ERROR("/fxml/error.fxml"), //
|
||||
FORGET_PASSWORD("/fxml/forget_password.fxml"), //
|
||||
HEALTH_START("/fxml/health_start.fxml"), //
|
||||
|
@ -1,34 +0,0 @@
|
||||
package org.cryptomator.ui.dokanyinfodialog;
|
||||
|
||||
import dagger.Lazy;
|
||||
import dagger.Subcomponent;
|
||||
import org.cryptomator.ui.common.FxmlFile;
|
||||
import org.cryptomator.ui.common.FxmlScene;
|
||||
|
||||
import javafx.scene.Scene;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
@DokanyInfoDialogScoped
|
||||
@Subcomponent(modules = {DokanyInfoDialogModule.class})
|
||||
public interface DokanyInfoDialogComponent {
|
||||
|
||||
@DokanyInfoDialogWindow
|
||||
Stage window();
|
||||
|
||||
@FxmlScene(FxmlFile.DOKANY_INFO_DIALOG)
|
||||
Lazy<Scene> dokanyInfoScene();
|
||||
|
||||
|
||||
default void showDokanyInfoWindow() {
|
||||
Stage stage = window();
|
||||
stage.setScene(dokanyInfoScene().get());
|
||||
stage.sizeToScene();
|
||||
stage.show();
|
||||
}
|
||||
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
|
||||
DokanyInfoDialogComponent create();
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package org.cryptomator.ui.dokanysupportenddialog;
|
||||
|
||||
import dagger.Lazy;
|
||||
import dagger.Subcomponent;
|
||||
import org.cryptomator.ui.common.FxmlFile;
|
||||
import org.cryptomator.ui.common.FxmlScene;
|
||||
|
||||
import javafx.scene.Scene;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
@DokanySupportEndDialogScoped
|
||||
@Subcomponent(modules = {DokanySupportEndDialogModule.class})
|
||||
public interface DokanySupportEndDialogComponent {
|
||||
|
||||
@DokanySupportEndDialogWindow
|
||||
Stage window();
|
||||
|
||||
@FxmlScene(FxmlFile.DOKANY_SUPPORT_END_DIALOG)
|
||||
Lazy<Scene> dokanySupportEndScene();
|
||||
|
||||
|
||||
default void showDokanySupportEndWindow() {
|
||||
Stage stage = window();
|
||||
stage.setScene(dokanySupportEndScene().get());
|
||||
stage.sizeToScene();
|
||||
stage.show();
|
||||
}
|
||||
|
||||
@Subcomponent.Factory
|
||||
interface Factory {
|
||||
|
||||
DokanySupportEndDialogComponent create();
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package org.cryptomator.ui.dokanyinfodialog;
|
||||
package org.cryptomator.ui.dokanysupportenddialog;
|
||||
|
||||
import org.cryptomator.ui.common.FxController;
|
||||
import org.cryptomator.ui.fxapp.FxApplicationWindows;
|
||||
@ -9,14 +9,14 @@ import javafx.fxml.FXML;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
|
||||
@DokanyInfoDialogScoped
|
||||
public class DokanyInfoDialogController implements FxController {
|
||||
@DokanySupportEndDialogScoped
|
||||
public class DokanySupportEndDialogController implements FxController {
|
||||
|
||||
private final Stage window;
|
||||
private final FxApplicationWindows applicationWindows;
|
||||
|
||||
@Inject
|
||||
DokanyInfoDialogController(@DokanyInfoDialogWindow Stage window, FxApplicationWindows applicationWindows) {
|
||||
DokanySupportEndDialogController(@DokanySupportEndDialogWindow Stage window, FxApplicationWindows applicationWindows) {
|
||||
this.window = window;
|
||||
this.applicationWindows = applicationWindows;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package org.cryptomator.ui.dokanyinfodialog;
|
||||
package org.cryptomator.ui.dokanysupportenddialog;
|
||||
|
||||
import dagger.Binds;
|
||||
import dagger.Module;
|
||||
@ -20,21 +20,21 @@ import java.util.Map;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
@Module
|
||||
abstract class DokanyInfoDialogModule {
|
||||
abstract class DokanySupportEndDialogModule {
|
||||
|
||||
@Provides
|
||||
@DokanyInfoDialogWindow
|
||||
@DokanyInfoDialogScoped
|
||||
@DokanySupportEndDialogWindow
|
||||
@DokanySupportEndDialogScoped
|
||||
static FxmlLoaderFactory provideFxmlLoaderFactory(Map<Class<? extends FxController>, Provider<FxController>> factories, DefaultSceneFactory sceneFactory, ResourceBundle resourceBundle) {
|
||||
return new FxmlLoaderFactory(factories, sceneFactory, resourceBundle);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@DokanyInfoDialogWindow
|
||||
@DokanyInfoDialogScoped
|
||||
@DokanySupportEndDialogWindow
|
||||
@DokanySupportEndDialogScoped
|
||||
static Stage provideStage(StageFactory factory, ResourceBundle resourceBundle) {
|
||||
Stage stage = factory.create();
|
||||
stage.setTitle(resourceBundle.getString("dokanyInfo.title"));
|
||||
stage.setTitle(resourceBundle.getString("dokanySupportEnd.title"));
|
||||
stage.setMinWidth(500);
|
||||
stage.setMinHeight(100);
|
||||
stage.initModality(Modality.APPLICATION_MODAL);
|
||||
@ -42,16 +42,16 @@ abstract class DokanyInfoDialogModule {
|
||||
}
|
||||
|
||||
@Provides
|
||||
@FxmlScene(FxmlFile.DOKANY_INFO_DIALOG)
|
||||
@DokanyInfoDialogScoped
|
||||
static Scene provideDokanyInfoDialogScene(@DokanyInfoDialogWindow FxmlLoaderFactory fxmlLoaders) {
|
||||
return fxmlLoaders.createScene(FxmlFile.DOKANY_INFO_DIALOG);
|
||||
@FxmlScene(FxmlFile.DOKANY_SUPPORT_END_DIALOG)
|
||||
@DokanySupportEndDialogScoped
|
||||
static Scene provideDokanySupportEndDialogScene(@DokanySupportEndDialogWindow FxmlLoaderFactory fxmlLoaders) {
|
||||
return fxmlLoaders.createScene(FxmlFile.DOKANY_SUPPORT_END_DIALOG);
|
||||
}
|
||||
|
||||
|
||||
@Binds
|
||||
@IntoMap
|
||||
@FxControllerKey(DokanyInfoDialogController.class)
|
||||
abstract FxController bindDokanyInfoDialogController(DokanyInfoDialogController controller);
|
||||
@FxControllerKey(DokanySupportEndDialogController.class)
|
||||
abstract FxController bindDokanySupportEndDialogController(DokanySupportEndDialogController controller);
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package org.cryptomator.ui.dokanyinfodialog;
|
||||
package org.cryptomator.ui.dokanysupportenddialog;
|
||||
|
||||
import javax.inject.Scope;
|
||||
import java.lang.annotation.Documented;
|
||||
@ -8,6 +8,6 @@ import java.lang.annotation.RetentionPolicy;
|
||||
@Scope
|
||||
@Documented
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@interface DokanyInfoDialogScoped {
|
||||
@interface DokanySupportEndDialogScoped {
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package org.cryptomator.ui.dokanyinfodialog;
|
||||
package org.cryptomator.ui.dokanysupportenddialog;
|
||||
|
||||
import javax.inject.Qualifier;
|
||||
import java.lang.annotation.Documented;
|
||||
@ -9,6 +9,6 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
@Qualifier
|
||||
@Documented
|
||||
@Retention(RUNTIME)
|
||||
@interface DokanyInfoDialogWindow {
|
||||
@interface DokanySupportEndDialogWindow {
|
||||
|
||||
}
|
@ -77,17 +77,17 @@ public class FxApplication {
|
||||
}
|
||||
|
||||
var dokany = "org.cryptomator.frontend.dokany.mount.DokanyMountProvider";
|
||||
boolean dokanyInfoWindowShown = false;
|
||||
boolean dokanySupportEndWindowShown = false;
|
||||
if (settings.mountService.getValueSafe().equals(dokany)) {
|
||||
appWindows.showDokanyInfoWindow();
|
||||
dokanyInfoWindowShown = true;
|
||||
appWindows.showDokanySupportEndWindow();
|
||||
dokanySupportEndWindowShown = true;
|
||||
settings.mountService.set(null);
|
||||
}
|
||||
for (VaultSettings vaultSettings : settings.directories) {
|
||||
if (vaultSettings.mountService.getValueSafe().equals(dokany)) {
|
||||
if (!dokanyInfoWindowShown) {
|
||||
appWindows.showDokanyInfoWindow();
|
||||
dokanyInfoWindowShown = true;
|
||||
if (!dokanySupportEndWindowShown) {
|
||||
appWindows.showDokanySupportEndWindow();
|
||||
dokanySupportEndWindowShown = true;
|
||||
}
|
||||
vaultSettings.mountService.set(null);
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ package org.cryptomator.ui.fxapp;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import org.cryptomator.ui.dokanyinfodialog.DokanyInfoDialogComponent;
|
||||
import org.cryptomator.ui.dokanysupportenddialog.DokanySupportEndDialogComponent;
|
||||
import org.cryptomator.ui.error.ErrorComponent;
|
||||
import org.cryptomator.ui.health.HealthCheckComponent;
|
||||
import org.cryptomator.ui.lock.LockComponent;
|
||||
@ -34,7 +34,7 @@ import java.io.InputStream;
|
||||
ErrorComponent.class, //
|
||||
HealthCheckComponent.class, //
|
||||
UpdateReminderComponent.class, //
|
||||
DokanyInfoDialogComponent.class, //
|
||||
DokanySupportEndDialogComponent.class, //
|
||||
ShareVaultComponent.class})
|
||||
abstract class FxApplicationModule {
|
||||
|
||||
|
@ -5,7 +5,7 @@ import dagger.Lazy;
|
||||
import org.cryptomator.common.vaults.Vault;
|
||||
import org.cryptomator.common.vaults.VaultState;
|
||||
import org.cryptomator.integrations.tray.TrayIntegrationProvider;
|
||||
import org.cryptomator.ui.dokanyinfodialog.DokanyInfoDialogComponent;
|
||||
import org.cryptomator.ui.dokanysupportenddialog.DokanySupportEndDialogComponent;
|
||||
import org.cryptomator.ui.error.ErrorComponent;
|
||||
import org.cryptomator.ui.lock.LockComponent;
|
||||
import org.cryptomator.ui.mainwindow.MainWindowComponent;
|
||||
@ -49,7 +49,7 @@ public class FxApplicationWindows {
|
||||
private final QuitComponent.Builder quitWindowBuilder;
|
||||
private final UnlockComponent.Factory unlockWorkflowFactory;
|
||||
private final UpdateReminderComponent.Factory updateReminderWindowBuilder;
|
||||
private final DokanyInfoDialogComponent.Factory dokanyInfoWindowBuilder;
|
||||
private final DokanySupportEndDialogComponent.Factory dokanySupportEndWindowBuilder;
|
||||
private final LockComponent.Factory lockWorkflowFactory;
|
||||
private final ErrorComponent.Factory errorWindowFactory;
|
||||
private final ExecutorService executor;
|
||||
@ -65,7 +65,7 @@ public class FxApplicationWindows {
|
||||
QuitComponent.Builder quitWindowBuilder, //
|
||||
UnlockComponent.Factory unlockWorkflowFactory, //
|
||||
UpdateReminderComponent.Factory updateReminderWindowBuilder, //
|
||||
DokanyInfoDialogComponent.Factory dokanyInfoWindowBuilder, //
|
||||
DokanySupportEndDialogComponent.Factory dokanySupportEndWindowBuilder, //
|
||||
LockComponent.Factory lockWorkflowFactory, //
|
||||
ErrorComponent.Factory errorWindowFactory, //
|
||||
VaultOptionsComponent.Factory vaultOptionsWindow, //
|
||||
@ -78,7 +78,7 @@ public class FxApplicationWindows {
|
||||
this.quitWindowBuilder = quitWindowBuilder;
|
||||
this.unlockWorkflowFactory = unlockWorkflowFactory;
|
||||
this.updateReminderWindowBuilder = updateReminderWindowBuilder;
|
||||
this.dokanyInfoWindowBuilder = dokanyInfoWindowBuilder;
|
||||
this.dokanySupportEndWindowBuilder = dokanySupportEndWindowBuilder;
|
||||
this.lockWorkflowFactory = lockWorkflowFactory;
|
||||
this.errorWindowFactory = errorWindowFactory;
|
||||
this.executor = executor;
|
||||
@ -146,8 +146,8 @@ public class FxApplicationWindows {
|
||||
CompletableFuture.runAsync(() -> updateReminderWindowBuilder.create().checkAndShowUpdateReminderWindow(), Platform::runLater);
|
||||
}
|
||||
|
||||
public void showDokanyInfoWindow() {
|
||||
CompletableFuture.runAsync(() -> dokanyInfoWindowBuilder.create().showDokanyInfoWindow(), Platform::runLater);
|
||||
public void showDokanySupportEndWindow() {
|
||||
CompletableFuture.runAsync(() -> dokanySupportEndWindowBuilder.create().showDokanySupportEndWindow(), Platform::runLater);
|
||||
}
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
<?import javafx.scene.shape.Circle?>
|
||||
<HBox xmlns:fx="http://javafx.com/fxml"
|
||||
xmlns="http://javafx.com/javafx"
|
||||
fx:controller="org.cryptomator.ui.dokanyinfodialog.DokanyInfoDialogController"
|
||||
fx:controller="org.cryptomator.ui.dokanysupportenddialog.DokanySupportEndDialogController"
|
||||
minWidth="500"
|
||||
prefWidth="500"
|
||||
minHeight="145"
|
||||
@ -34,16 +34,16 @@
|
||||
</Group>
|
||||
|
||||
<VBox HBox.hgrow="ALWAYS">
|
||||
<Label styleClass="label-large" text="%dokanyInfo.message" wrapText="true">
|
||||
<Label styleClass="label-large" text="%dokanySupportEnd.message" wrapText="true">
|
||||
<padding>
|
||||
<Insets bottom="6" top="6"/>
|
||||
</padding>
|
||||
</Label>
|
||||
<Label text="%dokanyInfo.description" wrapText="true"/>
|
||||
<Label text="%dokanySupportEnd.description" wrapText="true"/>
|
||||
<Region VBox.vgrow="ALWAYS" minHeight="18"/>
|
||||
<ButtonBar buttonMinWidth="120" buttonOrder="+UC">
|
||||
<buttons>
|
||||
<Button text="%dokanyInfo.preferencesBtn" ButtonBar.buttonData="OTHER" cancelButton="true" onAction="#openVolumePreferences"/>
|
||||
<Button text="%dokanySupportEnd.preferencesBtn" ButtonBar.buttonData="OTHER" cancelButton="true" onAction="#openVolumePreferences"/>
|
||||
<Button text="%generic.button.close" ButtonBar.buttonData="CANCEL_CLOSE" cancelButton="true" onAction="#close" defaultButton="true"/>
|
||||
</buttons>
|
||||
</ButtonBar>
|
@ -541,11 +541,11 @@ updateReminder.notNow=Not Now
|
||||
updateReminder.yesOnce=Yes, Once
|
||||
updateReminder.yesAutomatically=Yes, Automatically
|
||||
|
||||
#Dokany Info
|
||||
dokanyInfo.title=Deprecation notice
|
||||
dokanyInfo.message=Support end for Dokany
|
||||
dokanyInfo.description=The volume type Dokany is no longer supported by Cryptomator. Your settings are adjusted to use the default volume type now. You can view the current volume type in the preferences.
|
||||
dokanyInfo.preferencesBtn=Open Preferences
|
||||
#Dokany Support End
|
||||
dokanySupportEnd.title=Deprecation notice
|
||||
dokanySupportEnd.message=Support end for Dokany
|
||||
dokanySupportEnd.description=The volume type Dokany is no longer supported by Cryptomator. Your settings are adjusted to use the default volume type now. You can view the current volume type in the preferences.
|
||||
dokanySupportEnd.preferencesBtn=Open Preferences
|
||||
|
||||
# Share Vault
|
||||
shareVault.title=Share Vault
|
||||
|
Loading…
Reference in New Issue
Block a user