diff --git a/app/src/main/java/io/xpipe/app/core/AppI18n.java b/app/src/main/java/io/xpipe/app/core/AppI18n.java index e6c1b66cd..2d3f634b9 100644 --- a/app/src/main/java/io/xpipe/app/core/AppI18n.java +++ b/app/src/main/java/io/xpipe/app/core/AppI18n.java @@ -90,6 +90,10 @@ public class AppI18n { private static String getCallerModuleName() { var callers = CallingClass.INSTANCE.getCallingClasses(); for (Class caller : callers) { + if (caller.isSynthetic()) { + continue; + } + if (caller.equals(CallingClass.class) || caller.equals(ModuleHelper.class) || caller.equals(ModalOverlayComp.class) diff --git a/app/src/main/java/io/xpipe/app/issue/ErrorEvent.java b/app/src/main/java/io/xpipe/app/issue/ErrorEvent.java index 50accbeb5..b6c983abe 100644 --- a/app/src/main/java/io/xpipe/app/issue/ErrorEvent.java +++ b/app/src/main/java/io/xpipe/app/issue/ErrorEvent.java @@ -23,6 +23,9 @@ public class ErrorEvent { @Builder.Default private final boolean reportable = true; + @Setter + private boolean disableDefaultActions; + private final Throwable throwable; @Singular @@ -153,6 +156,10 @@ public class ErrorEvent { return omit().expected(); } + public ErrorEventBuilder noDefaultActions() { + return disableDefaultActions(true); + } + public void handle() { build().handle(); } diff --git a/app/src/main/java/io/xpipe/app/issue/ErrorHandlerComp.java b/app/src/main/java/io/xpipe/app/issue/ErrorHandlerComp.java index 4086586b3..ac7d58929 100644 --- a/app/src/main/java/io/xpipe/app/issue/ErrorHandlerComp.java +++ b/app/src/main/java/io/xpipe/app/issue/ErrorHandlerComp.java @@ -11,7 +11,6 @@ import io.xpipe.app.fxcomps.SimpleComp; import io.xpipe.app.fxcomps.augment.GrowAugment; import io.xpipe.app.util.LicenseRequiredException; import io.xpipe.app.util.PlatformState; - import javafx.application.Platform; import javafx.beans.property.Property; import javafx.beans.property.SimpleObjectProperty; @@ -25,7 +24,6 @@ import javafx.scene.layout.Region; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.stage.Stage; - import org.kordamp.ikonli.javafx.FontIcon; import java.util.List; @@ -243,25 +241,24 @@ public class ErrorHandlerComp extends SimpleComp { return true; } }); + event.setDisableDefaultActions(true); } var custom = event.getCustomActions(); for (var c : custom) { var ac = createActionComp(c); + ac.getStyleClass().addAll(BUTTON_OUTLINED, ACCENT); actionBox.getChildren().add(ac); } - for (var action : List.of(ErrorAction.automaticallyReport(), ErrorAction.reportOnGithub())) { - var ac = createActionComp(action); - actionBox.getChildren().add(ac); + if (!event.isDisableDefaultActions() || event.getCustomActions().isEmpty()) { + for (var action : List.of(ErrorAction.automaticallyReport(), ErrorAction.reportOnGithub(), ErrorAction.ignore())) { + var ac = createActionComp(action); + actionBox.getChildren().add(ac); + } + actionBox.getChildren().get(1).getStyleClass().addAll(BUTTON_OUTLINED, ACCENT); } - for (var action : List.of(ErrorAction.ignore())) { - var ac = createActionComp(action); - actionBox.getChildren().add(ac); - } - actionBox.getChildren().get(1).getStyleClass().addAll(BUTTON_OUTLINED, ACCENT); - content.getChildren().addAll(actionBox, new Separator(Orientation.HORIZONTAL)); var details = createDetails(); diff --git a/app/src/main/java/io/xpipe/app/util/PlatformState.java b/app/src/main/java/io/xpipe/app/util/PlatformState.java index 178baf0e1..bcb82e869 100644 --- a/app/src/main/java/io/xpipe/app/util/PlatformState.java +++ b/app/src/main/java/io/xpipe/app/util/PlatformState.java @@ -71,7 +71,6 @@ public enum PlatformState { try { // Weird fix to ensure that macOS quit operation works while in tray. // Maybe related to https://bugs.openjdk.org/browse/JDK-8318129 as it prints the same error if not called - // The headless check is not needed though but still done GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices(); // Catch more than just the headless exception in case the graphics environment initialization completely @@ -84,9 +83,9 @@ public enum PlatformState { + " You don't have to install XPipe on any system like a server, a WSL distribution, a hypervisor, etc.," + " to have full access to that system, a shell connection to it is enough for XPipe to work from your local machine." : h.getMessage(); - TrackEvent.warn(h.getMessage()); + TrackEvent.warn(msg); PlatformState.setCurrent(PlatformState.EXITED); - return Optional.of(ErrorEvent.expected(new HeadlessException(msg))); + return Optional.of(ErrorEvent.expected(new UnsupportedOperationException(msg))); } catch (Throwable t) { TrackEvent.warn(t.getMessage()); PlatformState.setCurrent(PlatformState.EXITED); diff --git a/app/src/main/java/io/xpipe/app/util/SecretRetrievalStrategyHelper.java b/app/src/main/java/io/xpipe/app/util/SecretRetrievalStrategyHelper.java index abd5f50fc..6cc64defe 100644 --- a/app/src/main/java/io/xpipe/app/util/SecretRetrievalStrategyHelper.java +++ b/app/src/main/java/io/xpipe/app/util/SecretRetrievalStrategyHelper.java @@ -90,12 +90,12 @@ public class SecretRetrievalStrategyHelper { new SimpleObjectProperty<>(strat instanceof SecretRetrievalStrategy.CustomCommand i ? i : null); var map = new LinkedHashMap(); if (allowNone) { - map.put("none", new OptionsBuilder()); + map.put("app.none", new OptionsBuilder()); } - map.put("password", inPlace(inPlace)); - map.put("passwordManager", passwordManager(passwordManager)); - map.put("customCommand", customCommand(customCommand)); - map.put("prompt", new OptionsBuilder()); + map.put("app.password", inPlace(inPlace)); + map.put("app.passwordManager", passwordManager(passwordManager)); + map.put("app.customCommand", customCommand(customCommand)); + map.put("app.prompt", new OptionsBuilder()); int offset = allowNone ? 0 : -1; var selected = new SimpleIntegerProperty( diff --git a/lang/proc/strings/translations_da.properties b/lang/proc/strings/translations_da.properties index cb8377eef..c67f59c8d 100644 --- a/lang/proc/strings/translations_da.properties +++ b/lang/proc/strings/translations_da.properties @@ -327,3 +327,8 @@ vncSystem=VNC-målsystem vncSystemDescription=Det faktiske system, der skal interageres med. Dette er normalt det samme som tunnelværten vncHost=Fjerntliggende tunnelvært vncHostDescription=Det system, som VNC-serveren kører på +gitVaultTitle=Git-hvælving +gitVaultForcePushHeader=Vil du tvinge push til fjernlageret? +gitVaultForcePushContent=Dette vil helt erstatte alt indhold i fjernarkivet med dit lokale, inklusive historikken. +gitVaultOverwriteLocalHeader=Vil du tilsidesætte din lokale boks? +gitVaultOverwriteLocalContent=Dette vil erstatte alt lokalt indhold med fjernlageret, inklusive historikken. diff --git a/lang/proc/strings/translations_de.properties b/lang/proc/strings/translations_de.properties index edfca15c4..ae5664acf 100644 --- a/lang/proc/strings/translations_de.properties +++ b/lang/proc/strings/translations_de.properties @@ -317,3 +317,8 @@ vncSystem=VNC-Zielsystem vncSystemDescription=Das eigentliche System, mit dem interagiert werden soll. Dies ist normalerweise dasselbe wie der Tunnel-Host vncHost=Entfernter Tunnel-Host vncHostDescription=Das System, auf dem der VNC-Server läuft +gitVaultTitle=Git-Tresor +gitVaultForcePushHeader=Willst du den Push zum entfernten Repository erzwingen? +gitVaultForcePushContent=Dadurch werden alle Inhalte des entfernten Repositorys vollständig durch dein lokales Repository ersetzt, einschließlich des Verlaufs. +gitVaultOverwriteLocalHeader=Willst du deinen lokalen Tresor außer Kraft setzen? +gitVaultOverwriteLocalContent=Dadurch werden alle lokalen Inhalte vollständig durch das entfernte Repository ersetzt, einschließlich des Verlaufs. diff --git a/lang/proc/strings/translations_en.properties b/lang/proc/strings/translations_en.properties index 21264927e..a7a630324 100644 --- a/lang/proc/strings/translations_en.properties +++ b/lang/proc/strings/translations_en.properties @@ -315,3 +315,8 @@ vncSystem=VNC target system vncSystemDescription=The actual system to interact with. This is usually the same as the tunnel host vncHost=Remote tunnel host vncHostDescription=The system on which the VNC server is running on +gitVaultTitle=Git vault +gitVaultForcePushHeader=Do you want to force push to the remote repository? +gitVaultForcePushContent=This will completely replace all remote repository contents with your local one, including the history. +gitVaultOverwriteLocalHeader=Do you want to override your local vault? +gitVaultOverwriteLocalContent=This will completely replace all local contents with the remote repository, including the history. diff --git a/lang/proc/strings/translations_es.properties b/lang/proc/strings/translations_es.properties index e2d18f969..0bb828688 100644 --- a/lang/proc/strings/translations_es.properties +++ b/lang/proc/strings/translations_es.properties @@ -313,3 +313,8 @@ vncSystem=Sistema de destino VNC vncSystemDescription=El sistema real con el que interactuar. Suele ser el mismo que el host del túnel vncHost=Host de túnel remoto vncHostDescription=El sistema en el que se ejecuta el servidor VNC +gitVaultTitle=Bóveda Git +gitVaultForcePushHeader=¿Quieres forzar el push al repositorio remoto? +gitVaultForcePushContent=Esto sustituirá completamente todo el contenido del repositorio remoto por el local, incluido el historial. +gitVaultOverwriteLocalHeader=¿Quieres anular tu bóveda local? +gitVaultOverwriteLocalContent=Esto sustituirá completamente todos los contenidos locales por el repositorio remoto, incluido el historial. diff --git a/lang/proc/strings/translations_fr.properties b/lang/proc/strings/translations_fr.properties index 4cc77b143..95e02be9e 100644 --- a/lang/proc/strings/translations_fr.properties +++ b/lang/proc/strings/translations_fr.properties @@ -313,3 +313,8 @@ vncSystem=Système cible VNC vncSystemDescription=Le système réel avec lequel interagir. Il s'agit généralement du même que l'hôte du tunnel vncHost=Hôte du tunnel à distance vncHostDescription=Le système sur lequel le serveur VNC fonctionne +gitVaultTitle=Coffre-fort Git +gitVaultForcePushHeader=Veux-tu forcer la poussée vers le dépôt distant ? +gitVaultForcePushContent=Cela remplacera complètement tout le contenu du dépôt distant par ton dépôt local, y compris l'historique. +gitVaultOverwriteLocalHeader=Veux-tu remplacer ton coffre-fort local ? +gitVaultOverwriteLocalContent=Cela remplacera complètement tous les contenus locaux par le référentiel distant, y compris l'historique. diff --git a/lang/proc/strings/translations_it.properties b/lang/proc/strings/translations_it.properties index e3fa8a12b..e45784dac 100644 --- a/lang/proc/strings/translations_it.properties +++ b/lang/proc/strings/translations_it.properties @@ -313,3 +313,8 @@ vncSystem=Sistema di destinazione VNC vncSystemDescription=Il sistema effettivo con cui interagire. Di solito coincide con l'host del tunnel vncHost=Tunnel host remoto vncHostDescription=Il sistema su cui viene eseguito il server VNC +gitVaultTitle=Git vault +gitVaultForcePushHeader=Vuoi forzare il push al repository remoto? +gitVaultForcePushContent=Questo sostituirà completamente tutti i contenuti del repository remoto con quello locale, compresa la cronologia. +gitVaultOverwriteLocalHeader=Vuoi ignorare il tuo vault locale? +gitVaultOverwriteLocalContent=Questo sostituirà completamente tutti i contenuti locali con quelli del repository remoto, compresa la cronologia. diff --git a/lang/proc/strings/translations_ja.properties b/lang/proc/strings/translations_ja.properties index 24f9affbd..4fd4d0358 100644 --- a/lang/proc/strings/translations_ja.properties +++ b/lang/proc/strings/translations_ja.properties @@ -313,3 +313,8 @@ vncSystem=VNCターゲットシステム vncSystemDescription=実際にやりとりするシステム。これは通常トンネルホストと同じである。 vncHost=リモートトンネルホスト vncHostDescription=VNCサーバーが動作しているシステム +gitVaultTitle=Git保管庫 +gitVaultForcePushHeader=リモートリポジトリに強制プッシュするか? +gitVaultForcePushContent=これは、履歴を含め、すべてのリモートリポジトリの内容をローカルリポジトリに完全に置き換える。 +gitVaultOverwriteLocalHeader=ローカル金庫を上書きするか? +gitVaultOverwriteLocalContent=これにより、履歴を含むすべてのローカルコンテンツがリモートリポジトリに完全に置き換えられる。 diff --git a/lang/proc/strings/translations_nl.properties b/lang/proc/strings/translations_nl.properties index 13d80e8c2..f2c11c650 100644 --- a/lang/proc/strings/translations_nl.properties +++ b/lang/proc/strings/translations_nl.properties @@ -313,3 +313,8 @@ vncSystem=VNC doelsysteem vncSystemDescription=Het eigenlijke systeem om mee te communiceren. Dit is meestal hetzelfde als de tunnelhost vncHost=Remote tunnel host vncHostDescription=Het systeem waarop de VNC-server draait +gitVaultTitle=Git kluis +gitVaultForcePushHeader=Wil je een push naar het archief op afstand forceren? +gitVaultForcePushContent=Dit zal alle inhoud van het externe archief volledig vervangen door je lokale archief, inclusief de geschiedenis. +gitVaultOverwriteLocalHeader=Wil je je lokale kluis overschrijven? +gitVaultOverwriteLocalContent=Dit zal alle lokale inhoud volledig vervangen door het externe archief, inclusief de geschiedenis. diff --git a/lang/proc/strings/translations_pt.properties b/lang/proc/strings/translations_pt.properties index da6d4dbab..497be2edf 100644 --- a/lang/proc/strings/translations_pt.properties +++ b/lang/proc/strings/translations_pt.properties @@ -313,3 +313,8 @@ vncSystem=Sistema de destino VNC vncSystemDescription=O sistema real com o qual interage. Geralmente é o mesmo que o host do túnel vncHost=Anfitrião de túnel remoto vncHostDescription=O sistema no qual o servidor VNC está sendo executado +gitVaultTitle=Cofre do Git +gitVaultForcePushHeader=Queres forçar o envio para o repositório remoto? +gitVaultForcePushContent=Isto irá substituir completamente todos os conteúdos do repositório remoto pelo teu repositório local, incluindo o histórico. +gitVaultOverwriteLocalHeader=Queres substituir o teu cofre local? +gitVaultOverwriteLocalContent=Isto irá substituir completamente todos os conteúdos locais pelo repositório remoto, incluindo o histórico. diff --git a/lang/proc/strings/translations_ru.properties b/lang/proc/strings/translations_ru.properties index 0d7ee6cc5..403092bce 100644 --- a/lang/proc/strings/translations_ru.properties +++ b/lang/proc/strings/translations_ru.properties @@ -313,3 +313,8 @@ vncSystem=Целевая система VNC vncSystemDescription=Фактическая система, с которой нужно взаимодействовать. Обычно это то же самое, что и туннельный хост vncHost=Удаленный туннельный хост vncHostDescription=Система, на которой работает VNC-сервер +gitVaultTitle=Git vault +gitVaultForcePushHeader=Хочешь ли ты принудительно запустить push в удаленное хранилище? +gitVaultForcePushContent=Это полностью заменит все содержимое удаленного хранилища на ваше локальное, включая историю. +gitVaultOverwriteLocalHeader=Хочешь переопределить свое локальное хранилище? +gitVaultOverwriteLocalContent=Это полностью заменит всё локальное содержимое на удалённое хранилище, включая историю. diff --git a/lang/proc/strings/translations_tr.properties b/lang/proc/strings/translations_tr.properties index 956526c44..f8c69328f 100644 --- a/lang/proc/strings/translations_tr.properties +++ b/lang/proc/strings/translations_tr.properties @@ -313,3 +313,8 @@ vncSystem=VNC hedef sistemi vncSystemDescription=Etkileşim kurulacak asıl sistem. Bu genellikle tünel ana bilgisayarıyla aynıdır vncHost=Uzak tünel ana bilgisayarı vncHostDescription=VNC sunucusunun üzerinde çalıştığı sistem +gitVaultTitle=Git kasası +gitVaultForcePushHeader=Uzak depoya itmeye zorlamak istiyor musunuz? +gitVaultForcePushContent=Bu, geçmiş de dahil olmak üzere tüm uzak depo içeriğini yerel deponuzla tamamen değiştirecektir. +gitVaultOverwriteLocalHeader=Yerel kasanızı geçersiz kılmak mı istiyorsunuz? +gitVaultOverwriteLocalContent=Bu, geçmiş de dahil olmak üzere tüm yerel içerikleri uzak depo ile tamamen değiştirecektir. diff --git a/lang/proc/strings/translations_zh.properties b/lang/proc/strings/translations_zh.properties index 43209dfe9..68d6d06b1 100644 --- a/lang/proc/strings/translations_zh.properties +++ b/lang/proc/strings/translations_zh.properties @@ -313,3 +313,8 @@ vncSystem=VNC 目标系统 vncSystemDescription=实际交互系统。通常与隧道主机相同 vncHost=远程隧道主机 vncHostDescription=运行 VNC 服务器的系统 +gitVaultTitle=Git 数据库 +gitVaultForcePushHeader=您想强制推送到远程存储库吗? +gitVaultForcePushContent=这将用本地存储库完全替换所有远程存储库的内容,包括历史记录。 +gitVaultOverwriteLocalHeader=您想覆盖本地保险库吗? +gitVaultOverwriteLocalContent=这将用远程存储库完全替换所有本地内容,包括历史记录。