Various fixes

This commit is contained in:
crschnick
2026-02-17 17:50:39 +00:00
parent 8cdfa21a78
commit 61a9282cd0
5 changed files with 19 additions and 5 deletions

View File

@@ -49,10 +49,11 @@ public class SideMenuBarComp extends RegionBuilder<VBox> {
if (e.action() != null) {
e.action().run();
return;
}
value.setValue(e);
if (e.comp() != null) {
value.setValue(e);
}
});
b.describe(d -> d.name(e.name()));

View File

@@ -7,6 +7,7 @@ import io.xpipe.app.hub.comp.StoreLayoutComp;
import io.xpipe.app.platform.LabelGraphic;
import io.xpipe.app.platform.PlatformThread;
import io.xpipe.app.prefs.AppPrefsComp;
import io.xpipe.app.terminal.TerminalDockHubManager;
import io.xpipe.app.update.AppDistributionType;
import io.xpipe.app.util.*;
@@ -117,7 +118,9 @@ public class AppLayoutModel {
AppI18n.observable("connections"),
new LabelGraphic.IconGraphic("mdi2c-connection"),
new StoreLayoutComp(),
null,
() -> {
TerminalDockHubManager.get().hideDock();
},
new KeyCodeCombination(KeyCode.DIGIT1, KeyCombination.SHORTCUT_DOWN)),
new Entry(
AppI18n.observable("browser"),

View File

@@ -143,6 +143,10 @@ public class RunFileScriptMenuProvider implements BrowserMenuBranchProvider {
protected List<CommandBuilder> createCommand(BrowserFileSystemTabModel model, List<BrowserEntry> entries) {
var sc = model.getFileSystem().getShell().orElseThrow();
var content = ref.getStore().assembleScriptChain(sc, true);
if (content == null) {
return List.of();
}
var script = ScriptHelper.createExecScript(sc, content.getValue());
var builder = CommandBuilder.of().add(sc.getShellDialect().runScriptCommand(sc, script.toString()));
for (BrowserEntry entry : entries) {

View File

@@ -30,6 +30,10 @@ public class RunHubBatchScriptActionProvider implements ActionProvider {
for (DataStoreEntryRef<ShellStore> ref : refs) {
var sc = ref.getStore().getOrStartSession();
var script = scriptStore.getStore().assembleScriptChain(sc, false);
if (script == null) {
continue;
}
var cmd = sc.command(script);
list.add(new CommandDialog.CommandEntry(ref.get().getName(), cmd));
}

View File

@@ -26,8 +26,10 @@ public class RunHubScriptActionProvider implements ActionProvider {
public void executeImpl() throws Exception {
var sc = ref.getStore().getOrStartSession();
var script = scriptStore.getStore().assembleScriptChain(sc, false);
var cmd = sc.command(script);
CommandDialog.runAndShow(cmd);
if (script != null) {
var cmd = sc.command(script);
CommandDialog.runAndShow(cmd);
}
}
@Override