mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-02-19 07:36:42 -05:00
Various fixes
This commit is contained in:
@@ -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()));
|
||||
|
||||
|
||||
@@ -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"),
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user