More rework

This commit is contained in:
crschnick 2024-06-05 14:30:53 +00:00
parent 3e91e8df01
commit c1b91f942d
15 changed files with 37 additions and 8 deletions

View file

@ -61,7 +61,7 @@ public class StoreEntryListStatusComp extends SimpleComp {
var inRootCategory = StoreViewState.get().getActiveCategory().getValue().getRoot().equals(rootCategory);
// Sadly the all binding does not update when the individual visibility of entries changes
// But it is good enough.
var showProvider = storeEntryWrapper.getEntry().getProvider() == null ||
var showProvider = !storeEntryWrapper.getEntry().getValidity().isUsable() ||
storeEntryWrapper.getEntry().getProvider().shouldShow(storeEntryWrapper);
return inRootCategory && showProvider;
},

View file

@ -163,7 +163,7 @@ public class StoreSection {
// This check is fast as the children are cached in the storage
var isChildren = DataStorage.get().getStoreChildren(e.getEntry()).contains(other.getEntry());
var showProvider = other.getEntry().getProvider() == null ||
var showProvider = !other.getEntry().getValidity().isUsable() ||
other.getEntry().getProvider().shouldShow(other);
return isChildren && showProvider;
}, e.getPersistentState(), e.getCache(), StoreViewState.get().getEntriesListChangeObservable());

View file

@ -365,6 +365,10 @@ public abstract class DataStorage {
.toList();
var toAdd = newChildren.stream()
.filter(nc -> {
if (nc.getStore() == null) {
return false;
}
var nid = nc.getStore().getFixedId();
// These can't be automatically generated
if (nid.isEmpty()) {

View file

@ -1,13 +1,19 @@
package io.xpipe.app.util;
import io.xpipe.core.process.CommandBuilder;
import io.xpipe.core.process.CommandControl;
import io.xpipe.core.process.ShellControl;
import lombok.experimental.SuperBuilder;
@SuperBuilder
public abstract class CommandView {
import java.util.function.Consumer;
protected final ShellControl shellControl;
public abstract class CommandView implements AutoCloseable {
protected abstract CommandBuilder base();
protected abstract CommandControl build(Consumer<CommandBuilder> builder);
protected abstract ShellControl getShellControl();
@Override
public void close() throws Exception {
getShellControl().close();
}
}

View file

@ -0,0 +1,18 @@
package io.xpipe.app.util;
import io.xpipe.core.process.CommandBuilder;
import io.xpipe.core.process.CommandControl;
import io.xpipe.core.process.ShellControl;
import lombok.Getter;
import java.util.function.Consumer;
public abstract class CommandViewBase extends CommandView {
@Getter
protected final ShellControl shellControl;
public CommandViewBase(ShellControl shellControl) {this.shellControl = shellControl;}
protected abstract CommandControl build(Consumer<CommandBuilder> builder);
}

2
dist/build.gradle vendored
View file

@ -3,7 +3,7 @@ plugins {
id 'org.beryx.jlink' version '3.0.1'
id "org.asciidoctor.jvm.convert" version "4.0.2"
id 'org.jreleaser' version '1.11.0'
id("com.netflix.nebula.ospackage") version "11.8.1"
id("com.netflix.nebula.ospackage") version "11.9.1"
id 'org.gradle.crypto.checksum' version '1.4.0'
id 'signing'
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

BIN
dist/logo/hicolor/128x128/apps/xpipe.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
dist/logo/hicolor/16x16/apps/xpipe.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

BIN
dist/logo/hicolor/256x256/apps/xpipe.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
dist/logo/hicolor/32x32/apps/xpipe.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
dist/logo/hicolor/48x48/apps/xpipe.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
dist/logo/hicolor/512x512/apps/xpipe.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
dist/logo/hicolor/64x64/apps/xpipe.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

@ -152,6 +152,7 @@ shells=Available shells
startContainer=Start container
stopContainer=Stop container
inspectContainer=Inspect container
inspectContext=Inspect context
k8sClusterNameDescription=The name of the context the cluster is in.
pod=Pod
podName=Pod name