diff --git a/app/src/main/java/io/xpipe/app/comp/base/ToggleGroupComp.java b/app/src/main/java/io/xpipe/app/comp/base/ToggleGroupComp.java index 14a2b781c..2684354b7 100644 --- a/app/src/main/java/io/xpipe/app/comp/base/ToggleGroupComp.java +++ b/app/src/main/java/io/xpipe/app/comp/base/ToggleGroupComp.java @@ -5,6 +5,7 @@ import io.xpipe.app.comp.CompStructure; import io.xpipe.app.comp.SimpleCompStructure; import io.xpipe.app.platform.PlatformThread; +import javafx.application.Platform; import javafx.beans.property.Property; import javafx.beans.value.ObservableValue; import javafx.scene.control.ToggleButton; @@ -14,6 +15,7 @@ import javafx.scene.layout.HBox; import atlantafx.base.theme.Styles; import java.util.Map; +import java.util.Objects; public class ToggleGroupComp extends Comp> { @@ -39,8 +41,11 @@ public class ToggleGroupComp extends Comp> { box.getChildren().clear(); for (var entry : val.entrySet()) { var b = new ToggleButton(entry.getValue().getValue()); + if (entry.getKey() == null) { + b.disableProperty().bind(b.selectedProperty()); + } b.setOnAction(e -> { - if (entry.getKey().equals(value.getValue())) { + if (Objects.equals(entry.getKey(), value.getValue())) { value.setValue(null); } else { value.setValue(entry.getKey()); @@ -49,9 +54,15 @@ public class ToggleGroupComp extends Comp> { }); group.getToggles().add(b); box.getChildren().add(b); - if (entry.getKey().equals(value.getValue())) { + if (Objects.equals(entry.getKey(), value.getValue())) { b.setSelected(true); } + + value.addListener((observable, oldValue, newValue) -> { + if (Objects.equals(newValue, entry.getKey())) { + b.setSelected(true); + } + }); } if (box.getChildren().size() > 0) { diff --git a/app/src/main/java/io/xpipe/app/platform/OptionsBuilder.java b/app/src/main/java/io/xpipe/app/platform/OptionsBuilder.java index 4f0a1bdd0..665767a40 100644 --- a/app/src/main/java/io/xpipe/app/platform/OptionsBuilder.java +++ b/app/src/main/java/io/xpipe/app/platform/OptionsBuilder.java @@ -281,8 +281,9 @@ public class OptionsBuilder { public OptionsBuilder addYesNoToggle(Property prop) { var map = new LinkedHashMap>(); - map.put(Boolean.FALSE, AppI18n.observable("app.no")); - map.put(Boolean.TRUE, AppI18n.observable("app.yes")); + map.put(Boolean.FALSE, AppI18n.observable("no")); + map.put(null, AppI18n.observable("inherit")); + map.put(Boolean.TRUE, AppI18n.observable("yes")); var comp = new ToggleGroupComp<>(prop, new SimpleObjectProperty<>(map)); pushComp(comp); props.add(prop); diff --git a/app/src/main/resources/io/xpipe/app/resources/style/browser.css b/app/src/main/resources/io/xpipe/app/resources/style/browser.css index 93262aaee..9edc5a91e 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/browser.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/browser.css @@ -359,7 +359,7 @@ -fx-background-color: -color-success-1; } -.browser .table-row-cell:folder:drag-over { +.browser .table-row-cell:drag-over { -fx-background-color: -color-success-muted; } 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 44248f5c1..79b9301e4 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 @@ -156,6 +156,7 @@ .toggle-group-comp .toggle-button { -fx-padding: 3 10; + -fx-opacity: 1.0; } .root .ikonli-font-icon.graphic.supported { diff --git a/lang/strings/translations_da.properties b/lang/strings/translations_da.properties index f620937db..423ba5986 100644 --- a/lang/strings/translations_da.properties +++ b/lang/strings/translations_da.properties @@ -1667,3 +1667,4 @@ addProfile=Tilføj profil netbirdProfileNameAsktext=Navn på ny netbird-profil openSftp=Åbn i SFTP-session capslockWarning=Du har aktiveret capslock +inherit=Arve diff --git a/lang/strings/translations_de.properties b/lang/strings/translations_de.properties index 56a999e8e..05d135894 100644 --- a/lang/strings/translations_de.properties +++ b/lang/strings/translations_de.properties @@ -1662,3 +1662,4 @@ addProfile=Profil hinzufügen netbirdProfileNameAsktext=Name des neuen Netbird-Profils openSftp=In SFTP-Sitzung öffnen capslockWarning=Du hast Capslock aktiviert +inherit=Erbe diff --git a/lang/strings/translations_en.properties b/lang/strings/translations_en.properties index f6cd4313f..0ea1e6ee5 100644 --- a/lang/strings/translations_en.properties +++ b/lang/strings/translations_en.properties @@ -1692,3 +1692,4 @@ addProfile=Add profile netbirdProfileNameAsktext=Name of new netbird profile openSftp=Open in SFTP session capslockWarning=You have capslock enabled +inherit=Inherit diff --git a/lang/strings/translations_es.properties b/lang/strings/translations_es.properties index 4dbabaafd..415a6f24e 100644 --- a/lang/strings/translations_es.properties +++ b/lang/strings/translations_es.properties @@ -1626,3 +1626,4 @@ addProfile=Añadir perfil netbirdProfileNameAsktext=Nombre del nuevo perfil netbird openSftp=Abrir en sesión SFTP capslockWarning=Tienes activado el bloqueo de mayúsculas +inherit=Hereda diff --git a/lang/strings/translations_fr.properties b/lang/strings/translations_fr.properties index 0868e701f..836b7dafc 100644 --- a/lang/strings/translations_fr.properties +++ b/lang/strings/translations_fr.properties @@ -1667,3 +1667,4 @@ addProfile=Ajouter un profil netbirdProfileNameAsktext=Nom du nouveau profil netbird openSftp=Ouvrir une session SFTP capslockWarning=Tu as activé le verrouillage des caps +inherit=Hériter diff --git a/lang/strings/translations_id.properties b/lang/strings/translations_id.properties index e7027e0cc..6eaa8d72f 100644 --- a/lang/strings/translations_id.properties +++ b/lang/strings/translations_id.properties @@ -1626,3 +1626,4 @@ addProfile=Menambahkan profil netbirdProfileNameAsktext=Nama profil netbird baru openSftp=Buka dalam sesi SFTP capslockWarning=Anda telah mengaktifkan capslock +inherit=Mewarisi diff --git a/lang/strings/translations_it.properties b/lang/strings/translations_it.properties index bf6bf7bb5..f9027f947 100644 --- a/lang/strings/translations_it.properties +++ b/lang/strings/translations_it.properties @@ -1626,3 +1626,4 @@ addProfile=Aggiungi profilo netbirdProfileNameAsktext=Nome del nuovo profilo Netbird openSftp=Aprire una sessione SFTP capslockWarning=Hai attivato il capslock +inherit=Eredita diff --git a/lang/strings/translations_ja.properties b/lang/strings/translations_ja.properties index 670668f49..ac52e1641 100644 --- a/lang/strings/translations_ja.properties +++ b/lang/strings/translations_ja.properties @@ -1626,3 +1626,4 @@ addProfile=プロファイルを追加する netbirdProfileNameAsktext=新しいネットバードプロファイルの名前 openSftp=SFTPセッションで開く capslockWarning=キャップロックを有効にしている +inherit=継承する diff --git a/lang/strings/translations_ko.properties b/lang/strings/translations_ko.properties index 2d0e7db43..40dd49e60 100644 --- a/lang/strings/translations_ko.properties +++ b/lang/strings/translations_ko.properties @@ -1626,3 +1626,4 @@ addProfile=프로필 추가 netbirdProfileNameAsktext=새 넷버드 프로필의 이름 openSftp=SFTP 세션에서 열기 capslockWarning=캡록이 활성화되어 있습니다 +inherit=Inherit diff --git a/lang/strings/translations_nl.properties b/lang/strings/translations_nl.properties index 214be6d10..35e132120 100644 --- a/lang/strings/translations_nl.properties +++ b/lang/strings/translations_nl.properties @@ -1626,3 +1626,4 @@ addProfile=Profiel toevoegen netbirdProfileNameAsktext=Naam van nieuw netbird profiel openSftp=Openen in SFTP-sessie capslockWarning=Je hebt capslock ingeschakeld +inherit=Erven diff --git a/lang/strings/translations_pl.properties b/lang/strings/translations_pl.properties index db02bc9f0..b03902209 100644 --- a/lang/strings/translations_pl.properties +++ b/lang/strings/translations_pl.properties @@ -1627,3 +1627,4 @@ addProfile=Dodaj profil netbirdProfileNameAsktext=Nazwa nowego profilu netbird openSftp=Otwórz w sesji SFTP capslockWarning=Masz włączony capslock +inherit=Dziedzicz diff --git a/lang/strings/translations_pt.properties b/lang/strings/translations_pt.properties index 856d4624a..ddbd8ba55 100644 --- a/lang/strings/translations_pt.properties +++ b/lang/strings/translations_pt.properties @@ -1626,3 +1626,4 @@ addProfile=Adicionar perfil netbirdProfileNameAsktext=Nome do novo perfil Netbird openSftp=Abre uma sessão SFTP capslockWarning=Tens o capslock ativado +inherit=Herdar diff --git a/lang/strings/translations_ru.properties b/lang/strings/translations_ru.properties index 7751ab2cc..172ab09bb 100644 --- a/lang/strings/translations_ru.properties +++ b/lang/strings/translations_ru.properties @@ -1739,3 +1739,4 @@ addProfile=Добавить профиль netbirdProfileNameAsktext=Имя нового профиля netbird openSftp=Открыть в SFTP-сессии capslockWarning=У тебя включен capslock +inherit=Наследуй diff --git a/lang/strings/translations_sv.properties b/lang/strings/translations_sv.properties index 8e04c31ba..1ff02e4e8 100644 --- a/lang/strings/translations_sv.properties +++ b/lang/strings/translations_sv.properties @@ -1626,3 +1626,4 @@ addProfile=Lägg till profil netbirdProfileNameAsktext=Namn på ny netbird-profil openSftp=Öppna i en SFTP-session capslockWarning=Du har aktiverat capslock +inherit=Ärva diff --git a/lang/strings/translations_tr.properties b/lang/strings/translations_tr.properties index 72ee972a2..994f377bd 100644 --- a/lang/strings/translations_tr.properties +++ b/lang/strings/translations_tr.properties @@ -1626,3 +1626,4 @@ addProfile=Profil ekle netbirdProfileNameAsktext=Yeni netbird profilinin adı openSftp=SFTP oturumunda açın capslockWarning=Capslock'u etkinleştirdiniz +inherit=Miras diff --git a/lang/strings/translations_vi.properties b/lang/strings/translations_vi.properties index bb69b34ec..cadcf67ae 100644 --- a/lang/strings/translations_vi.properties +++ b/lang/strings/translations_vi.properties @@ -1626,3 +1626,4 @@ addProfile=Thêm hồ sơ netbirdProfileNameAsktext=Tên của hồ sơ Netbird mới openSftp=Mở trong phiên SFTP capslockWarning=Cậu đã bật chế độ Caps Lock +inherit=Kế thừa diff --git a/lang/strings/translations_zh-Hans.properties b/lang/strings/translations_zh-Hans.properties index e8265ee05..96ce2b3e4 100644 --- a/lang/strings/translations_zh-Hans.properties +++ b/lang/strings/translations_zh-Hans.properties @@ -2261,3 +2261,4 @@ addProfile=添加配置文件 netbirdProfileNameAsktext=新网鸟配置文件的名称 openSftp=在 SFTP 会话中打开 capslockWarning=您已启用盖帽锁 +inherit=继承 diff --git a/lang/strings/translations_zh-Hant.properties b/lang/strings/translations_zh-Hant.properties index a3b1e3a45..64a778844 100644 --- a/lang/strings/translations_zh-Hant.properties +++ b/lang/strings/translations_zh-Hant.properties @@ -1626,3 +1626,4 @@ addProfile=新增設定檔 netbirdProfileNameAsktext=新 netbird 配置文件的名稱 openSftp=在 SFTP 會話中開啟 capslockWarning=您已啟用上限鎖定功能 +inherit=繼承