mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-07-02 21:11:03 +12:00
Refine Kubernetes support
This commit is contained in:
parent
09f7ebbf45
commit
0845c7e27d
|
@ -33,10 +33,15 @@ final class BookmarkList extends SimpleComp {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Region createSimple() {
|
protected Region createSimple() {
|
||||||
var observableList = BindingsHelper.filteredContentBinding(StoreEntryFlatMiniSectionComp.ALL, e -> e.getEntry().getStore() instanceof ShellStore);
|
var observableList = BindingsHelper.filteredContentBinding(StoreEntryFlatMiniSectionComp.ALL, e -> e.getEntry().getState().isUsable());
|
||||||
var list = new ListBoxViewComp<>(observableList, observableList, e -> {
|
var list = new ListBoxViewComp<>(observableList, observableList, e -> {
|
||||||
return Comp.of(() -> {
|
return Comp.of(() -> {
|
||||||
var button = new Button(null, e.createRegion());
|
var button = new Button(null, e.createRegion());
|
||||||
|
|
||||||
|
if (!(e.getEntry().getStore() instanceof ShellStore)) {
|
||||||
|
button.setDisable(true);
|
||||||
|
}
|
||||||
|
|
||||||
button.setOnAction(event -> {
|
button.setOnAction(event -> {
|
||||||
var fileSystem = ((ShellStore) e.getEntry().getStore());
|
var fileSystem = ((ShellStore) e.getEntry().getStore());
|
||||||
model.openFileSystem(fileSystem);
|
model.openFileSystem(fileSystem);
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package io.xpipe.app.comp.storage.store;
|
package io.xpipe.app.comp.storage.store;
|
||||||
|
|
||||||
import com.jfoenix.controls.JFXButton;
|
import com.jfoenix.controls.JFXButton;
|
||||||
import io.xpipe.app.comp.base.LazyTextFieldComp;
|
|
||||||
import io.xpipe.app.comp.base.LoadingOverlayComp;
|
import io.xpipe.app.comp.base.LoadingOverlayComp;
|
||||||
import io.xpipe.app.core.AppFont;
|
import io.xpipe.app.core.AppFont;
|
||||||
import io.xpipe.app.core.AppI18n;
|
import io.xpipe.app.core.AppI18n;
|
||||||
|
@ -11,10 +10,7 @@ import io.xpipe.app.fxcomps.SimpleComp;
|
||||||
import io.xpipe.app.fxcomps.SimpleCompStructure;
|
import io.xpipe.app.fxcomps.SimpleCompStructure;
|
||||||
import io.xpipe.app.fxcomps.augment.GrowAugment;
|
import io.xpipe.app.fxcomps.augment.GrowAugment;
|
||||||
import io.xpipe.app.fxcomps.augment.PopupMenuAugment;
|
import io.xpipe.app.fxcomps.augment.PopupMenuAugment;
|
||||||
import io.xpipe.app.fxcomps.impl.FancyTooltipAugment;
|
import io.xpipe.app.fxcomps.impl.*;
|
||||||
import io.xpipe.app.fxcomps.impl.HorizontalComp;
|
|
||||||
import io.xpipe.app.fxcomps.impl.IconButtonComp;
|
|
||||||
import io.xpipe.app.fxcomps.impl.PrettyImageComp;
|
|
||||||
import io.xpipe.app.fxcomps.util.PlatformThread;
|
import io.xpipe.app.fxcomps.util.PlatformThread;
|
||||||
import io.xpipe.app.fxcomps.util.SimpleChangeListener;
|
import io.xpipe.app.fxcomps.util.SimpleChangeListener;
|
||||||
import io.xpipe.app.prefs.AppPrefs;
|
import io.xpipe.app.prefs.AppPrefs;
|
||||||
|
@ -26,12 +22,10 @@ import javafx.beans.binding.Bindings;
|
||||||
import javafx.beans.property.SimpleStringProperty;
|
import javafx.beans.property.SimpleStringProperty;
|
||||||
import javafx.css.PseudoClass;
|
import javafx.css.PseudoClass;
|
||||||
import javafx.geometry.HPos;
|
import javafx.geometry.HPos;
|
||||||
|
import javafx.geometry.Insets;
|
||||||
import javafx.geometry.Pos;
|
import javafx.geometry.Pos;
|
||||||
import javafx.scene.Node;
|
import javafx.scene.Node;
|
||||||
import javafx.scene.control.ContextMenu;
|
import javafx.scene.control.*;
|
||||||
import javafx.scene.control.Label;
|
|
||||||
import javafx.scene.control.MenuItem;
|
|
||||||
import javafx.scene.control.SeparatorMenuItem;
|
|
||||||
import javafx.scene.layout.ColumnConstraints;
|
import javafx.scene.layout.ColumnConstraints;
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
import javafx.scene.layout.Region;
|
import javafx.scene.layout.Region;
|
||||||
|
@ -89,9 +83,10 @@ public class StoreEntryComp extends SimpleComp {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private LazyTextFieldComp createName() {
|
private Comp<?> createName() {
|
||||||
var name = new LazyTextFieldComp(entry.nameProperty());
|
var name = new LabelComp(entry.nameProperty())
|
||||||
name.apply(struc -> struc.getTextField().editableProperty().bind(entry.getRenamable()));
|
.apply(struc -> struc.get().setTextOverrun(OverrunStyle.CENTER_ELLIPSIS))
|
||||||
|
.apply(struc -> struc.get().setPadding(new Insets(5, 5, 5, 0)));
|
||||||
name.apply(s -> AppFont.header(s.get()));
|
name.apply(s -> AppFont.header(s.get()));
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,15 +99,14 @@ public class DataStoreChoiceComp<T extends DataStore> extends SimpleComp {
|
||||||
}
|
}
|
||||||
|
|
||||||
var s = e.getEntry().getStore();
|
var s = e.getEntry().getStore();
|
||||||
if (!storeClass.isAssignableFrom(s.getClass()) || !applicableCheck.test((T) s)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(mode == Mode.ENVIRONMENT) && s instanceof LeafShellStore) {
|
if (!(mode == Mode.ENVIRONMENT) && s instanceof LeafShellStore) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
comboBox.add((T) e.getEntry().getStore());
|
var node = comboBox.add((T) e.getEntry().getStore());
|
||||||
|
if (!storeClass.isAssignableFrom(s.getClass()) || !applicableCheck.test((T) s)) {
|
||||||
|
comboBox.disable(node);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ComboBox<Node> cb = comboBox.build();
|
ComboBox<Node> cb = comboBox.build();
|
||||||
|
|
|
@ -56,6 +56,10 @@ public class CustomComboBoxBuilder<T> {
|
||||||
actionsMap.put(node, run);
|
actionsMap.put(node, run);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void disable(Node node) {
|
||||||
|
disabledNodes.add(node);
|
||||||
|
}
|
||||||
|
|
||||||
public void setUnknownNode(Function<T, Node> node) {
|
public void setUnknownNode(Function<T, Node> node) {
|
||||||
unknownNode = node;
|
unknownNode = node;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,14 @@
|
||||||
-fx-background-color: -color-success-muted;
|
-fx-background-color: -color-success-muted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bookmark-list .button:disabled {
|
||||||
|
-fx-opacity: 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bookmark-list .button:disabled * {
|
||||||
|
-fx-opacity: 0.9;
|
||||||
|
}
|
||||||
|
|
||||||
.browser .bookmark-list {
|
.browser .bookmark-list {
|
||||||
-fx-border-width: 0 0 1 1;
|
-fx-border-width: 0 0 1 1;
|
||||||
}
|
}
|
||||||
|
|
1
dist/changelogs/0.5.40.md
vendored
1
dist/changelogs/0.5.40.md
vendored
|
@ -1,4 +1,5 @@
|
||||||
## Changes in 0.5.40
|
## Changes in 0.5.40
|
||||||
- Add status bar to file browser that shows selected entries and clipboard
|
- Add status bar to file browser that shows selected entries and clipboard
|
||||||
|
- Add copy and paste context menu entries to file browser
|
||||||
- Add native ARM builds for macOS
|
- Add native ARM builds for macOS
|
||||||
- Improve Kubernetes support and configuration options
|
- Improve Kubernetes support and configuration options
|
|
@ -19,10 +19,6 @@ commandLineWrite=Write
|
||||||
wslHost=WSL Host
|
wslHost=WSL Host
|
||||||
timeout=Timeout
|
timeout=Timeout
|
||||||
additionalOptions=Additional Options
|
additionalOptions=Additional Options
|
||||||
wsl.displayName=Windows Subsystem for Linux
|
|
||||||
wsl.displayDescription=Connect to a WSL machine running on Windows
|
|
||||||
docker.displayName=Docker Container
|
|
||||||
docker.displayDescription=Connect to a docker container
|
|
||||||
rawFileOutput=Raw File Output
|
rawFileOutput=Raw File Output
|
||||||
dataSourceOutput=Data Source Output
|
dataSourceOutput=Data Source Output
|
||||||
type=Type
|
type=Type
|
||||||
|
|
Loading…
Reference in a new issue