diff --git a/app/src/main/java/io/xpipe/app/comp/base/AppMainWindowContentComp.java b/app/src/main/java/io/xpipe/app/comp/base/AppMainWindowContentComp.java index df359bad5..3aed448a7 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/AppMainWindowContentComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/AppMainWindowContentComp.java @@ -10,8 +10,12 @@ import io.xpipe.app.platform.ColorHelper; import io.xpipe.app.platform.PlatformThread; import io.xpipe.app.prefs.AppPrefs; +import io.xpipe.app.util.GlobalTimer; import javafx.animation.*; +import javafx.beans.binding.Bindings; import javafx.beans.property.SimpleBooleanProperty; +import javafx.beans.property.SimpleIntegerProperty; +import javafx.beans.property.SimpleStringProperty; import javafx.collections.ListChangeListener; import javafx.css.PseudoClass; import javafx.geometry.Pos; @@ -24,6 +28,8 @@ import javafx.scene.paint.Color; import javafx.stage.Stage; import javafx.stage.Window; +import java.time.Duration; + public class AppMainWindowContentComp extends SimpleComp { private final Stage stage; @@ -93,7 +99,22 @@ public class AppMainWindowContentComp extends SimpleComp { struc.get().setOpacity(0.65); }); - var text = new LabelComp(AppMainWindow.getLoadingText()); + var loadingTextCounter = new SimpleIntegerProperty(); + GlobalTimer.scheduleUntil(Duration.ofMillis(300), false, () -> { + if (loaded.getValue() != null) { + return true; + } + + loadingTextCounter.set((loadingTextCounter.get() + 1) % 4); + return false; + }); + var loadingTextAnimated = Bindings.createStringBinding(() -> { + return AppMainWindow.getLoadingText().getValue() + " " + + (".".repeat(loadingTextCounter.get() + 1)) + + (" ".repeat(3 - loadingTextCounter.get())); + }, AppMainWindow.getLoadingText(), loadingTextCounter); + var text = new LabelComp(loadingTextAnimated); + text.styleClass("loading-text"); text.apply(struc -> { struc.get().setOpacity(0.8); }); diff --git a/app/src/main/resources/io/xpipe/app/resources/style/style.css b/app/src/main/resources/io/xpipe/app/resources/style/style.css index 79b9301e4..9ba493f87 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/style.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/style.css @@ -187,3 +187,8 @@ .creation-menu.menu-button .separator { -fx-padding: 2 0; } + +.loading-text { + -fx-font-family: Roboto; +} + diff --git a/lang/strings/translations_en.properties b/lang/strings/translations_en.properties index bb92878d7..2cfaa0945 100644 --- a/lang/strings/translations_en.properties +++ b/lang/strings/translations_en.properties @@ -598,13 +598,20 @@ browseVaultButton=Browse vault vaultUsers=Vault users createHeapDump=Create heap dump createHeapDumpDescription=Dump memory contents to file to troubleshoot memory usage -initializingApp=Loading connections ... -checkingLicense=Checking license ... -loadingGit=Syncing with git repo ... -loadingGpg=Starting GnuPG daemon for git ... -loadingSettings=Loading settings ... -loadingConnections=Loading connections ... -loadingUserInterface=Loading user interface ... +#force +initializingApp=Loading connections +#force +checkingLicense=Checking license +#force +loadingGit=Syncing with git repo +#force +loadingGpg=Starting GnuPG daemon for git +#force +loadingSettings=Loading settings +#force +loadingConnections=Loading connections +#force +loadingUserInterface=Loading user interface ptbNotice=Notice for the public test build userDeletionTitle=User deletion userDeletionContent=Do you want to delete this vault user? This will reencrypt all your personal identities and connection secrets using the vault key that is available to all users. XPipe will restart to apply the user changes.