diff --git a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileListModel.java b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileListModel.java index ea1a023fd..c4cb612c1 100644 --- a/app/src/main/java/io/xpipe/app/browser/file/BrowserFileListModel.java +++ b/app/src/main/java/io/xpipe/app/browser/file/BrowserFileListModel.java @@ -11,7 +11,6 @@ import javafx.beans.property.Property; import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.property.SimpleObjectProperty; import javafx.collections.FXCollections; -import javafx.collections.ListChangeListener; import javafx.collections.ObservableList; import lombok.Getter; @@ -35,7 +34,6 @@ public final class BrowserFileListModel { new SimpleObjectProperty<>(FILE_TYPE_COMPARATOR); private final Property> all = new SimpleObjectProperty<>(new ArrayList<>()); private final Property> shown = new SimpleObjectProperty<>(new ArrayList<>()); - private final ObservableList previousSelection = FXCollections.observableArrayList(); private final ObservableList selection = FXCollections.observableArrayList(); private final Property draggedOverDirectory = new SimpleObjectProperty<>(); @@ -49,10 +47,6 @@ public final class BrowserFileListModel { fileSystemModel.getFilter().addListener((observable, oldValue, newValue) -> { refreshShown(); }); - - selection.addListener((ListChangeListener) c -> { - previousSelection.setAll(c.getList()); - }); } public void setAll(Stream newFiles) { diff --git a/ext/base/src/main/java/io/xpipe/ext/base/script/RunScriptAction.java b/ext/base/src/main/java/io/xpipe/ext/base/script/RunScriptAction.java index dda6b46ce..d68dd5b93 100644 --- a/ext/base/src/main/java/io/xpipe/ext/base/script/RunScriptAction.java +++ b/ext/base/src/main/java/io/xpipe/ext/base/script/RunScriptAction.java @@ -2,10 +2,13 @@ package io.xpipe.ext.base.script; import io.xpipe.app.browser.action.BranchAction; import io.xpipe.app.browser.action.BrowserAction; +import io.xpipe.app.browser.action.LeafAction; import io.xpipe.app.browser.file.BrowserEntry; import io.xpipe.app.browser.fs.OpenFileSystemModel; import io.xpipe.app.browser.session.BrowserSessionModel; +import io.xpipe.app.comp.store.StoreViewState; import io.xpipe.app.core.AppI18n; +import io.xpipe.app.core.AppLayoutModel; import io.xpipe.app.storage.DataStoreEntryRef; import io.xpipe.app.util.ScriptHelper; import io.xpipe.core.process.CommandBuilder; @@ -39,13 +42,26 @@ public class RunScriptAction implements BrowserAction, BranchAction { @Override public boolean isApplicable(OpenFileSystemModel model, List entries) { - return model.getBrowserModel() instanceof BrowserSessionModel - && !createActionForScriptHierarchy(model, entries).isEmpty(); + return model.getBrowserModel() instanceof BrowserSessionModel; } @Override public List getBranchingActions(OpenFileSystemModel model, List entries) { var actions = createActionForScriptHierarchy(model, entries); + if (actions.isEmpty()) { + actions = List.of(new LeafAction() { + @Override + public void execute(OpenFileSystemModel model, List entries) throws Exception { + StoreViewState.get().getAllScriptsCategory().select(); + AppLayoutModel.get().selectConnections(); + } + + @Override + public ObservableValue getName(OpenFileSystemModel model, List entries) { + return AppI18n.observable("noScriptsAvailable"); + } + }); + } return actions; } diff --git a/lang/app/strings/fixed_en.properties b/lang/app/strings/fixed_en.properties index 63091cf20..a7e0dbc8d 100644 --- a/lang/app/strings/fixed_en.properties +++ b/lang/app/strings/fixed_en.properties @@ -70,3 +70,4 @@ tryPtb=XPipe Public Test Build zed=Zed windowsCredentialManager=Windows credential manager webtop=Webtop +keeper=Keeper diff --git a/lang/base/strings/translations_da.properties b/lang/base/strings/translations_da.properties index c76dd0efe..9915359cc 100644 --- a/lang/base/strings/translations_da.properties +++ b/lang/base/strings/translations_da.properties @@ -172,7 +172,7 @@ hasServices=$COUNT$ tilgængelige tjenester hasService=$COUNT$ tilgængelig tjeneste openHttp=Åben HTTP-tjeneste openHttps=Åben HTTPS-tjeneste -noScriptsAvailable=Ingen tilgængelige scripts +noScriptsAvailable=Ingen aktiverede og kompatible scripts tilgængelige changeIcon=Skift ikon init=Indlæg shell=Skal diff --git a/lang/base/strings/translations_de.properties b/lang/base/strings/translations_de.properties index bf978e4b7..d8da3a141 100644 --- a/lang/base/strings/translations_de.properties +++ b/lang/base/strings/translations_de.properties @@ -163,7 +163,7 @@ hasServices=$COUNT$ verfügbare Dienste hasService=$COUNT$ verfügbarer Dienst openHttp=Offener HTTP-Dienst openHttps=HTTPS-Dienst öffnen -noScriptsAvailable=Keine Skripte verfügbar +noScriptsAvailable=Keine aktivierten und kompatiblen Skripte verfügbar changeIcon=Symbol ändern init=Init shell=Shell diff --git a/lang/base/strings/translations_en.properties b/lang/base/strings/translations_en.properties index bbd4f7278..89742360b 100644 --- a/lang/base/strings/translations_en.properties +++ b/lang/base/strings/translations_en.properties @@ -161,7 +161,7 @@ hasServices=$COUNT$ available services hasService=$COUNT$ available service openHttp=Open HTTP service openHttps=Open HTTPS service -noScriptsAvailable=No scripts available +noScriptsAvailable=No enabled and compatible scripts available changeIcon=Change icon init=Init shell=Shell @@ -176,4 +176,3 @@ untarDirectory=Untar to $DIR$ unzipDirectory=Unzip to $DIR$ unzipHere=Unzip here - diff --git a/lang/base/strings/translations_es.properties b/lang/base/strings/translations_es.properties index e2bb98b9d..2e548bffc 100644 --- a/lang/base/strings/translations_es.properties +++ b/lang/base/strings/translations_es.properties @@ -161,7 +161,7 @@ hasServices=$COUNT$ servicios disponibles hasService=$COUNT$ servicio disponible openHttp=Servicio HTTP abierto openHttps=Abrir servicio HTTPS -noScriptsAvailable=No hay guiones disponibles +noScriptsAvailable=No hay scripts habilitados y compatibles changeIcon=Cambiar icono init=Init shell=Shell diff --git a/lang/base/strings/translations_fr.properties b/lang/base/strings/translations_fr.properties index 0b30403d8..74e2cabc6 100644 --- a/lang/base/strings/translations_fr.properties +++ b/lang/base/strings/translations_fr.properties @@ -161,7 +161,7 @@ hasServices=$COUNT$ services disponibles hasService=$COUNT$ service disponible openHttp=Service HTTP ouvert openHttps=Service HTTPS ouvert -noScriptsAvailable=Pas de scripts disponibles +noScriptsAvailable=Pas de scripts activés et compatibles disponibles changeIcon=Changer d'icône init=Init shell=Coquille diff --git a/lang/base/strings/translations_it.properties b/lang/base/strings/translations_it.properties index 6a60ac414..be63f9329 100644 --- a/lang/base/strings/translations_it.properties +++ b/lang/base/strings/translations_it.properties @@ -161,7 +161,7 @@ hasServices=$COUNT$ servizi disponibili hasService=$COUNT$ servizio disponibile openHttp=Servizio HTTP aperto openHttps=Servizio HTTPS aperto -noScriptsAvailable=Non sono disponibili script +noScriptsAvailable=Non sono disponibili script abilitati e compatibili changeIcon=Cambia icona init=Init shell=Conchiglia diff --git a/lang/base/strings/translations_ja.properties b/lang/base/strings/translations_ja.properties index 85f05c894..2e707db11 100644 --- a/lang/base/strings/translations_ja.properties +++ b/lang/base/strings/translations_ja.properties @@ -161,7 +161,7 @@ hasServices=$COUNT$ 利用可能なサービス hasService=$COUNT$ 利用可能なサービス openHttp=オープンHTTPサービス openHttps=HTTPSサービスを開く -noScriptsAvailable=スクリプトはない +noScriptsAvailable=使用可能なスクリプトと互換性のあるスクリプトがない changeIcon=アイコンの変更 init=イニシャル shell=シェル diff --git a/lang/base/strings/translations_nl.properties b/lang/base/strings/translations_nl.properties index cf63c1928..32ff04bbe 100644 --- a/lang/base/strings/translations_nl.properties +++ b/lang/base/strings/translations_nl.properties @@ -161,7 +161,7 @@ hasServices=$COUNT$ beschikbare diensten hasService=$COUNT$ beschikbare dienst openHttp=Open HTTP service openHttps=Open HTTPS service -noScriptsAvailable=Geen scripts beschikbaar +noScriptsAvailable=Geen ingeschakelde en compatibele scripts beschikbaar changeIcon=Pictogram wijzigen init=Init shell=Shell diff --git a/lang/base/strings/translations_pt.properties b/lang/base/strings/translations_pt.properties index 7ed09ba83..ee7c33b4d 100644 --- a/lang/base/strings/translations_pt.properties +++ b/lang/base/strings/translations_pt.properties @@ -161,7 +161,7 @@ hasServices=$COUNT$ serviços disponíveis hasService=$COUNT$ serviço disponível openHttp=Abre o serviço HTTP openHttps=Abre o serviço HTTPS -noScriptsAvailable=Não há scripts disponíveis +noScriptsAvailable=Não há scripts habilitados e compatíveis disponíveis changeIcon=Altera o ícone init=Init shell=Concha diff --git a/lang/base/strings/translations_ru.properties b/lang/base/strings/translations_ru.properties index b72622998..498e81166 100644 --- a/lang/base/strings/translations_ru.properties +++ b/lang/base/strings/translations_ru.properties @@ -161,7 +161,7 @@ hasServices=$COUNT$ доступные сервисы hasService=$COUNT$ доступный сервис openHttp=Открытый HTTP-сервис openHttps=Открытая служба HTTPS -noScriptsAvailable=Нет доступных скриптов +noScriptsAvailable=Отсутствие включенных и совместимых скриптов changeIcon=Значок изменения init=Init shell=Shell diff --git a/lang/base/strings/translations_tr.properties b/lang/base/strings/translations_tr.properties index 766d664f8..fac021639 100644 --- a/lang/base/strings/translations_tr.properties +++ b/lang/base/strings/translations_tr.properties @@ -161,7 +161,7 @@ hasServices=$COUNT$ mevcut hi̇zmetler hasService=$COUNT$ mevcut hizmet openHttp=Açık HTTP hizmeti openHttps=HTTPS hizmetini açın -noScriptsAvailable=Mevcut senaryo yok +noScriptsAvailable=Etkin ve uyumlu komut dosyası yok changeIcon=Simge değiştir init=Başlangıç shell=Kabuk diff --git a/lang/base/strings/translations_zh.properties b/lang/base/strings/translations_zh.properties index 12ef1c8ea..407289b05 100644 --- a/lang/base/strings/translations_zh.properties +++ b/lang/base/strings/translations_zh.properties @@ -161,7 +161,7 @@ hasServices=$COUNT$ 可用服务 hasService=$COUNT$ 可用服务 openHttp=开放式 HTTP 服务 openHttps=打开 HTTPS 服务 -noScriptsAvailable=无脚本可用 +noScriptsAvailable=没有启用和兼容的脚本 changeIcon=更改图标 init=启动 shell=外壳