mirror of
https://github.com/xpipe-io/xpipe.git
synced 2025-04-18 18:23:38 +00:00
Compare commits
6 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a49d1baf87 | ||
![]() |
fe8d8fe383 | ||
![]() |
ab71d178f3 | ||
![]() |
9318a24120 | ||
![]() |
a69ecdc94c | ||
![]() |
937d59a27a |
7 changed files with 33 additions and 7 deletions
|
@ -119,7 +119,10 @@ public class StoreIconChoiceComp extends SimpleComp {
|
|||
}
|
||||
var data = partitionList(filtered, columns);
|
||||
table.getItems().setAll(data);
|
||||
if (filtered.size() == 1) {
|
||||
|
||||
var selectMatch = filtered.size() == 1 || filtered.stream().anyMatch(systemIcon -> systemIcon.getId().equals(filterString));
|
||||
// Table updates seem to not always be instant, sometimes the column is not there yet
|
||||
if (selectMatch && table.getColumns().size() > 0) {
|
||||
table.getSelectionModel().select(0, table.getColumns().getFirst());
|
||||
selected.setValue(filtered.getFirst());
|
||||
} else {
|
||||
|
|
|
@ -6,6 +6,7 @@ import io.xpipe.app.browser.action.BrowserBranchAction;
|
|||
import io.xpipe.app.browser.action.BrowserLeafAction;
|
||||
import io.xpipe.app.browser.file.BrowserEntry;
|
||||
import io.xpipe.app.browser.file.BrowserFileSystemTabModel;
|
||||
import io.xpipe.app.comp.base.PrettyImageHelper;
|
||||
import io.xpipe.app.comp.store.StoreViewState;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.core.AppLayoutModel;
|
||||
|
@ -92,6 +93,11 @@ public class RunScriptAction implements BrowserAction, BrowserBranchAction {
|
|||
.map(c -> createActionForScriptHierarchy(model, c))
|
||||
.toList();
|
||||
return new BrowserBranchAction() {
|
||||
@Override
|
||||
public Node getIcon(BrowserFileSystemTabModel model, List<BrowserEntry> entries) {
|
||||
return PrettyImageHelper.ofFixedSize(hierarchy.getBase().get().getEffectiveIconFile(), 16, 16).createRegion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends BrowserAction> getBranchingActions(
|
||||
BrowserFileSystemTabModel model, List<BrowserEntry> entries) {
|
||||
|
@ -110,6 +116,11 @@ public class RunScriptAction implements BrowserAction, BrowserBranchAction {
|
|||
BrowserFileSystemTabModel model, DataStoreEntryRef<SimpleScriptStore> ref) {
|
||||
return new MultiExecuteSelectionAction() {
|
||||
|
||||
@Override
|
||||
public Node getIcon(BrowserFileSystemTabModel model, List<BrowserEntry> entries) {
|
||||
return PrettyImageHelper.ofFixedSize(ref.get().getEffectiveIconFile(), 16, 16).createRegion();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ObservableValue<String> getName(BrowserFileSystemTabModel model, List<BrowserEntry> entries) {
|
||||
return new SimpleStringProperty(ref.get().getName());
|
||||
|
|
|
@ -35,6 +35,14 @@ public class ScriptGroupStore extends ScriptStore implements GroupStore<ScriptSt
|
|||
});
|
||||
}
|
||||
|
||||
public List<DataStoreEntryRef<ScriptStore>> getImmediateChildrenScripts() {
|
||||
var self = getSelfEntry();
|
||||
return DataStorage.get().getStoreChildren(self).stream()
|
||||
.filter(entry -> entry.getValidity().isUsable())
|
||||
.map(dataStoreEntry -> dataStoreEntry.<ScriptStore>ref())
|
||||
.toList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataStoreEntryRef<ScriptStore>> getEffectiveScripts() {
|
||||
var self = getSelfEntry();
|
||||
|
|
|
@ -69,7 +69,7 @@ public class ScriptHierarchy {
|
|||
private static ScriptHierarchy buildHierarchy(
|
||||
DataStoreEntryRef<ScriptStore> ref, Predicate<DataStoreEntryRef<ScriptStore>> include) {
|
||||
if (ref.getStore() instanceof ScriptGroupStore groupStore) {
|
||||
var children = groupStore.getEffectiveScripts().stream()
|
||||
var children = groupStore.getImmediateChildrenScripts().stream()
|
||||
.filter(include)
|
||||
.map(c -> buildHierarchy(c, include))
|
||||
.filter(hierarchy -> hierarchy.show())
|
||||
|
|
3
lang/strings/translations_en.properties
generated
3
lang/strings/translations_en.properties
generated
|
@ -40,6 +40,7 @@ selectTypeDescription=Select connection type
|
|||
selectShellType=Shell Type
|
||||
#context: computer shell program
|
||||
selectShellTypeDescription=Select the Type of the Shell Connection
|
||||
#context: name of an inanimate or abstract object
|
||||
name=Name
|
||||
storeIntroTitle=Connection Hub
|
||||
storeIntroDescription=Here you can manage all your local and remote shell connections in one place. To start off, you can quickly detect available connections automatically and choose which ones to add.
|
||||
|
@ -1193,6 +1194,7 @@ lockCreationAlertHeader=Create new vault user
|
|||
loginAlertTitle=Login required
|
||||
loginAlertHeader=Unlock vault to access your personal connections
|
||||
vaultUser=Vault user
|
||||
#context: dative case
|
||||
me=Me
|
||||
addUser=Add user ...
|
||||
addUserDescription=Create a new user for this vault
|
||||
|
@ -1280,6 +1282,7 @@ serviceProtocolType=Service protocol type
|
|||
serviceProtocolTypeDescription=Control how to open the service
|
||||
serviceCommand=The command to run once the service is active
|
||||
serviceCommandDescription=The placeholder $PORT will be replaced with the actual tunneled local port
|
||||
#context: not the measure of importance or personal ethics
|
||||
value=Value
|
||||
showAdvancedOptions=Show advanced options
|
||||
sshAdditionalConfigOptions=Additional config options
|
||||
|
|
8
lang/strings/translations_fr.properties
generated
8
lang/strings/translations_fr.properties
generated
|
@ -18,7 +18,7 @@ addShellTitle=Ajouter une connexion Shell
|
|||
savedConnections=Connexions sauvegardées
|
||||
save=Sauvegarde
|
||||
clean=Nettoyer
|
||||
moveTo=Aller à ...
|
||||
moveTo=Déplacer vers ...
|
||||
addDatabase=Base de données ...
|
||||
browseInternalStorage=Parcourir le stockage interne
|
||||
addTunnel=Tunnel ...
|
||||
|
@ -260,7 +260,7 @@ editorProgramDescription=L'éditeur de texte par défaut à utiliser lors de l'
|
|||
windowOpacity=Opacité de la fenêtre
|
||||
windowOpacityDescription=Modifie l'opacité de la fenêtre pour suivre ce qui se passe en arrière-plan.
|
||||
useSystemFont=Utiliser la police du système
|
||||
openDataDir=Répertoire de données de voûte
|
||||
openDataDir=Répertoire de données du coffre-fort
|
||||
openDataDirButton=Répertoire de données ouvertes
|
||||
openDataDirDescription=Si tu veux synchroniser des fichiers supplémentaires, comme les clés SSH, entre les systèmes avec ton dépôt git, tu peux les mettre dans le répertoire storage data. Tous les fichiers qui y sont référencés verront leur chemin de fichier automatiquement adapté sur n'importe quel système synchronisé.
|
||||
updates=Mises à jour
|
||||
|
@ -421,7 +421,7 @@ lockVaultOnHibernation=Verrouille le coffre-fort lors de la mise en veille de l'
|
|||
#custom
|
||||
lockVaultOnHibernationDescription=Lorsque cette option est activée, le coffre-fort sera automatiquement verrouillé une fois que ton ordinateur sera mis en veille. Au réveil, tu devras saisir à nouveau la phrase de passe de ton coffre-fort.
|
||||
overview=Vue d'ensemble
|
||||
history=Histoire
|
||||
history=Historique
|
||||
skipAll=Sauter tout
|
||||
notes=Notes
|
||||
addNotes=Ajouter des notes
|
||||
|
@ -543,7 +543,7 @@ userName=Nom d'utilisateur
|
|||
team=L'équipe
|
||||
teamSettings=Paramètres de l'équipe
|
||||
teamVaults=Coffres-forts d'équipe
|
||||
vaultTypeNameDefault=Voûte par défaut
|
||||
vaultTypeNameDefault=Coffre-fort par défaut
|
||||
vaultTypeNameLegacy=Coffre-fort personnel hérité
|
||||
vaultTypeNamePersonal=Coffre-fort personnel
|
||||
vaultTypeNameTeam=Coffre-fort de l'équipe
|
||||
|
|
3
lang/strings/translations_pl.properties
generated
3
lang/strings/translations_pl.properties
generated
|
@ -1146,7 +1146,8 @@ lockCreationAlertHeader=Utwórz nowego użytkownika skarbca
|
|||
loginAlertTitle=Wymagane logowanie
|
||||
loginAlertHeader=Odblokuj skarbiec, aby uzyskać dostęp do połączeń osobistych
|
||||
vaultUser=Użytkownik Vault
|
||||
me=Ja
|
||||
#custom
|
||||
me=Mi
|
||||
addUser=Dodaj użytkownika ...
|
||||
addUserDescription=Utwórz nowego użytkownika dla tego skarbca
|
||||
skip=Pomiń
|
||||
|
|
Loading…
Add table
Reference in a new issue