mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-09-23 08:55:41 +00:00
Rework
This commit is contained in:
@@ -53,10 +53,6 @@ public abstract class BrowserAction extends StoreAction<FileSystemStore> {
|
||||
}
|
||||
}
|
||||
|
||||
if (model.getFileSystem() == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
model.getBusy().set(true);
|
||||
|
||||
// Start shell in case we exited
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
package io.xpipe.app.action;
|
||||
package io.xpipe.app.hub.action;
|
||||
|
||||
import io.xpipe.app.hub.action.StoreActionProvider;
|
||||
import io.xpipe.app.action.ActionProvider;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
import io.xpipe.core.store.DataStore;
|
||||
|
||||
@@ -8,5 +8,5 @@ import java.util.List;
|
||||
|
||||
public interface BranchStoreActionProvider<T extends DataStore> extends StoreActionProvider<T> {
|
||||
|
||||
List<? extends ActionProvider> getChildren(DataStoreEntryRef<T> store);
|
||||
List<StoreActionProvider<?>> getChildren(DataStoreEntryRef<T> store);
|
||||
}
|
||||
+2
-6
@@ -1,6 +1,6 @@
|
||||
package io.xpipe.app.action;
|
||||
package io.xpipe.app.hub.action;
|
||||
|
||||
import io.xpipe.app.hub.action.StoreActionProvider;
|
||||
import io.xpipe.app.action.AbstractAction;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
import io.xpipe.core.store.DataStore;
|
||||
|
||||
@@ -15,8 +15,4 @@ public interface LeafStoreActionProvider<T extends DataStore> extends StoreActio
|
||||
default boolean requiresValidStore() {
|
||||
return true;
|
||||
}
|
||||
|
||||
default boolean isSystemAction() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package io.xpipe.app.hub.action;
|
||||
|
||||
public enum StoreActionCategory {
|
||||
|
||||
CUSTOM,
|
||||
OPEN,
|
||||
CONFIGURATION,
|
||||
APPEARANCE,
|
||||
DEVELOPER,
|
||||
DELETION
|
||||
}
|
||||
@@ -9,6 +9,10 @@ import javafx.beans.value.ObservableValue;
|
||||
|
||||
public interface StoreActionProvider<T extends DataStore> extends ActionProvider {
|
||||
|
||||
default StoreActionCategory getCategory() {
|
||||
return null;
|
||||
}
|
||||
|
||||
default boolean isMajor(DataStoreEntryRef<T> o) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package io.xpipe.app.hub.action.impl;
|
||||
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.browser.BrowserFullSessionModel;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.core.AppLayoutModel;
|
||||
import io.xpipe.app.ext.ProcessControlProvider;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.hub.action.StoreActionCategory;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
import io.xpipe.app.util.LabelGraphic;
|
||||
import io.xpipe.core.store.FilePath;
|
||||
@@ -29,6 +30,11 @@ public class BrowseStoreActionProvider implements LeafStoreActionProvider<FileSy
|
||||
return FileSystemStore.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StoreActionCategory getCategory() {
|
||||
return StoreActionCategory.OPEN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMajor(DataStoreEntryRef<FileSystemStore> o) {
|
||||
return true;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package io.xpipe.app.hub.action.impl;
|
||||
|
||||
import io.xpipe.app.action.AbstractAction;
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.hub.action.StoreActionCategory;
|
||||
import io.xpipe.app.hub.comp.StoreIconChoiceDialog;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
import io.xpipe.app.util.LabelGraphic;
|
||||
@@ -17,6 +18,11 @@ import lombok.extern.jackson.Jacksonized;
|
||||
|
||||
public class ChangeStoreIconActionProvider implements LeafStoreActionProvider<DataStore> {
|
||||
|
||||
@Override
|
||||
public StoreActionCategory getCategory() {
|
||||
return StoreActionCategory.CONFIGURATION;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractAction createAction(DataStoreEntryRef<DataStore> ref) {
|
||||
return Action.builder().ref(ref).build();
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package io.xpipe.app.hub.action.impl;
|
||||
|
||||
import io.xpipe.app.action.AbstractAction;
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.hub.action.StoreActionCategory;
|
||||
import io.xpipe.app.storage.DataStorage;
|
||||
import io.xpipe.app.storage.DataStoreEntry;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
@@ -19,6 +20,11 @@ import java.time.Duration;
|
||||
|
||||
public class CloneStoreActionProvider implements LeafStoreActionProvider<DataStore> {
|
||||
|
||||
@Override
|
||||
public StoreActionCategory getCategory() {
|
||||
return StoreActionCategory.CONFIGURATION;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractAction createAction(DataStoreEntryRef<DataStore> ref) {
|
||||
return Action.builder().ref(ref).build();
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package io.xpipe.app.hub.action.impl;
|
||||
|
||||
import io.xpipe.app.action.AbstractAction;
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.hub.action.StoreActionCategory;
|
||||
import io.xpipe.app.hub.comp.StoreCreationDialog;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
import io.xpipe.app.util.LabelGraphic;
|
||||
@@ -16,6 +17,11 @@ import lombok.extern.jackson.Jacksonized;
|
||||
|
||||
public class EditStoreActionProvider implements LeafStoreActionProvider<DataStore> {
|
||||
|
||||
@Override
|
||||
public StoreActionCategory getCategory() {
|
||||
return StoreActionCategory.CONFIGURATION;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractAction createAction(DataStoreEntryRef<DataStore> ref) {
|
||||
return Action.builder().ref(ref).build();
|
||||
@@ -28,12 +34,12 @@ public class EditStoreActionProvider implements LeafStoreActionProvider<DataStor
|
||||
|
||||
@Override
|
||||
public ObservableValue<String> getName(DataStoreEntryRef<DataStore> store) {
|
||||
return AppI18n.observable("base.edit");
|
||||
return AppI18n.observable("configure");
|
||||
}
|
||||
|
||||
@Override
|
||||
public LabelGraphic getIcon(DataStoreEntryRef<DataStore> store) {
|
||||
return new LabelGraphic.IconGraphic("mdal-edit");
|
||||
return new LabelGraphic.IconGraphic("mdi2w-wrench");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -41,11 +47,6 @@ public class EditStoreActionProvider implements LeafStoreActionProvider<DataStor
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isApplicable(DataStoreEntryRef<DataStore> o) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return "editStore";
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package io.xpipe.app.hub.action.impl;
|
||||
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.BatchStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.hub.action.StoreActionCategory;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
import io.xpipe.app.util.LabelGraphic;
|
||||
import io.xpipe.core.store.DataStore;
|
||||
@@ -16,6 +17,11 @@ import lombok.extern.jackson.Jacksonized;
|
||||
public class LaunchStoreActionProvider
|
||||
implements LeafStoreActionProvider<DataStore>, BatchStoreActionProvider<DataStore> {
|
||||
|
||||
@Override
|
||||
public StoreActionCategory getCategory() {
|
||||
return StoreActionCategory.OPEN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return "launch";
|
||||
|
||||
+7
-1
@@ -1,9 +1,10 @@
|
||||
package io.xpipe.app.hub.action.impl;
|
||||
|
||||
import io.xpipe.app.action.AbstractAction;
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.hub.action.StoreActionCategory;
|
||||
import io.xpipe.app.storage.DataStorage;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
import io.xpipe.app.util.FixedHierarchyStore;
|
||||
@@ -16,6 +17,11 @@ import lombok.extern.jackson.Jacksonized;
|
||||
|
||||
public class RefreshChildrenStoreActionProvider implements LeafStoreActionProvider<FixedHierarchyStore> {
|
||||
|
||||
@Override
|
||||
public StoreActionCategory getCategory() {
|
||||
return StoreActionCategory.OPEN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDefault(DataStoreEntryRef<FixedHierarchyStore> o) {
|
||||
return true;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package io.xpipe.app.hub.action.impl;
|
||||
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.ext.ShellStore;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.hub.action.StoreActionCategory;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
import io.xpipe.app.util.LabelGraphic;
|
||||
import io.xpipe.core.process.CommandControl;
|
||||
@@ -22,6 +23,11 @@ import java.io.StringReader;
|
||||
|
||||
public class SampleStoreActionProvider implements LeafStoreActionProvider<ShellStore> {
|
||||
|
||||
@Override
|
||||
public StoreActionCategory getCategory() {
|
||||
return StoreActionCategory.OPEN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Action createAction(DataStoreEntryRef<ShellStore> ref) {
|
||||
return Action.builder().ref(ref).build();
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package io.xpipe.app.hub.action.impl;
|
||||
|
||||
import io.xpipe.app.action.AbstractAction;
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.ext.ShellStore;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.hub.action.StoreActionCategory;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
import io.xpipe.app.util.LabelGraphic;
|
||||
import io.xpipe.app.util.ScanDialog;
|
||||
@@ -18,6 +19,11 @@ import lombok.extern.jackson.Jacksonized;
|
||||
|
||||
public class ScanStoreActionProvider implements LeafStoreActionProvider<ShellStore> {
|
||||
|
||||
@Override
|
||||
public StoreActionCategory getCategory() {
|
||||
return StoreActionCategory.OPEN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractAction createAction(DataStoreEntryRef<ShellStore> ref) {
|
||||
return Action.builder().ref(ref).build();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package io.xpipe.app.hub.comp;
|
||||
|
||||
import io.xpipe.app.action.ActionProvider;
|
||||
import io.xpipe.app.action.BranchStoreActionProvider;
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.BranchStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.comp.Comp;
|
||||
import io.xpipe.app.comp.SimpleComp;
|
||||
import io.xpipe.app.comp.SimpleCompStructure;
|
||||
@@ -10,11 +10,11 @@ import io.xpipe.app.comp.augment.ContextMenuAugment;
|
||||
import io.xpipe.app.comp.augment.GrowAugment;
|
||||
import io.xpipe.app.comp.base.*;
|
||||
import io.xpipe.app.comp.base.IconButtonComp;
|
||||
import io.xpipe.app.comp.base.LabelComp;
|
||||
import io.xpipe.app.comp.base.LazyTextFieldComp;
|
||||
import io.xpipe.app.comp.base.LoadingOverlayComp;
|
||||
import io.xpipe.app.core.*;
|
||||
import io.xpipe.app.core.AppResources;
|
||||
import io.xpipe.app.hub.action.StoreActionCategory;
|
||||
import io.xpipe.app.hub.action.StoreActionProvider;
|
||||
import io.xpipe.app.prefs.AppPrefs;
|
||||
import io.xpipe.app.storage.DataStoreColor;
|
||||
@@ -43,6 +43,8 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public abstract class StoreEntryComp extends SimpleComp {
|
||||
|
||||
@@ -288,14 +290,30 @@ public abstract class StoreEntryComp extends SimpleComp {
|
||||
button.apply(new ContextMenuAugment<>(
|
||||
mouseEvent -> mouseEvent.getButton() == MouseButton.PRIMARY, keyEvent -> false, () -> {
|
||||
var cm = ContextMenuHelper.create();
|
||||
branch.getChildren(getWrapper().getEntry().ref()).stream()
|
||||
.filter(actionProvider -> getWrapper().showActionProvider(actionProvider, false))
|
||||
.forEach(childProvider -> {
|
||||
var menu = buildMenuItemForAction(childProvider);
|
||||
if (menu != null) {
|
||||
cm.getItems().add(menu);
|
||||
}
|
||||
});
|
||||
var children = branch.getChildren(getWrapper().getEntry().ref());
|
||||
var cats = Arrays.stream(StoreActionCategory.values()).collect(Collectors.toCollection(ArrayList::new));
|
||||
cats.addFirst(null);
|
||||
for (var cat : cats) {
|
||||
var catChildren = children.stream()
|
||||
.filter(actionProvider -> actionProvider.getCategory() == cat)
|
||||
.toList();
|
||||
if (catChildren.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
catChildren.forEach(childProvider -> {
|
||||
var menu = buildMenuItemForAction(childProvider);
|
||||
if (menu != null) {
|
||||
cm.getItems().add(menu);
|
||||
}
|
||||
});
|
||||
cm.getItems().add(new SeparatorMenuItem());
|
||||
}
|
||||
|
||||
if (cm.getItems().getLast() instanceof SeparatorMenuItem) {
|
||||
cm.getItems().removeLast();
|
||||
}
|
||||
|
||||
return cm;
|
||||
}));
|
||||
}
|
||||
@@ -325,168 +343,164 @@ public abstract class StoreEntryComp extends SimpleComp {
|
||||
protected ContextMenu createContextMenu(Region name) {
|
||||
var contextMenu = ContextMenuHelper.create();
|
||||
|
||||
var hasSep = false;
|
||||
for (var p : getWrapper().getMinorActionProviders()) {
|
||||
var item = buildMenuItemForAction(p);
|
||||
if (item == null) {
|
||||
var cats = Arrays.stream(StoreActionCategory.values()).collect(Collectors.toCollection(ArrayList::new));
|
||||
cats.addFirst(null);
|
||||
for (var cat : cats) {
|
||||
var items = new ArrayList<MenuItem>();
|
||||
for (var p : getWrapper().getMinorActionProviders()) {
|
||||
var item = buildMenuItemForAction(p);
|
||||
if (item == null || p.getCategory() != cat) {
|
||||
continue;
|
||||
}
|
||||
|
||||
items.add(item);
|
||||
}
|
||||
|
||||
if (cat == StoreActionCategory.CONFIGURATION) {
|
||||
var rename = new MenuItem(AppI18n.get("rename"), new FontIcon("mdal-edit"));
|
||||
rename.setOnAction(event -> {
|
||||
name.requestFocus();
|
||||
});
|
||||
items.add(rename);
|
||||
|
||||
var notes = new MenuItem(AppI18n.get("addNotes"), new FontIcon("mdi2n-note-text"));
|
||||
notes.setOnAction(event -> {
|
||||
getWrapper().getNotes().setValue(new StoreNotes(null, getDefaultNotes()));
|
||||
event.consume();
|
||||
});
|
||||
notes.visibleProperty().bind(BindingsHelper.map(getWrapper().getNotes(), s -> s.getCommited() == null));
|
||||
items.add(notes);
|
||||
|
||||
var readOnly = new MenuItem();
|
||||
readOnly.graphicProperty()
|
||||
.bind(Bindings.createObjectBinding(
|
||||
() -> {
|
||||
var is = getWrapper().getReadOnly().get();
|
||||
return is
|
||||
? new FontIcon("mdi2l-lock-open-variant-outline")
|
||||
: new FontIcon("mdi2l-lock-open-outline");
|
||||
},
|
||||
getWrapper().getReadOnly()));
|
||||
readOnly.textProperty()
|
||||
.bind(Bindings.createStringBinding(
|
||||
() -> {
|
||||
var is = getWrapper().getReadOnly().get();
|
||||
return is ? AppI18n.get("unsetReadOnly") : AppI18n.get("setReadOnly");
|
||||
},
|
||||
AppI18n.activeLanguage(),
|
||||
getWrapper().getReadOnly()));
|
||||
readOnly.setOnAction(event ->
|
||||
getWrapper().getEntry().setReadOnly(!getWrapper().getReadOnly().get()));
|
||||
items.add(readOnly);
|
||||
}
|
||||
|
||||
if (cat == StoreActionCategory.DEVELOPER) {
|
||||
if (AppPrefs.get().developerMode().getValue()) {
|
||||
var browse = new MenuItem(AppI18n.get("browseInternalStorage"), new FontIcon("mdi2f-folder-open-outline"));
|
||||
browse.setOnAction(event -> DesktopHelper.browsePathLocal(getWrapper().getEntry().getDirectory()));
|
||||
items.add(browse);
|
||||
}
|
||||
|
||||
if (AppPrefs.get().enableHttpApi().get()) {
|
||||
var copyId = new MenuItem(AppI18n.get("copyId"), new FontIcon("mdi2c-content-copy"));
|
||||
copyId.setOnAction(event -> ClipboardHelper.copyText(getWrapper().getEntry().getUuid().toString()));
|
||||
items.add(copyId);
|
||||
}
|
||||
}
|
||||
|
||||
if (cat == StoreActionCategory.APPEARANCE) {
|
||||
if (section.getDepth() == 1) {
|
||||
var color = new Menu(AppI18n.get("color"), new FontIcon("mdi2f-format-color-fill"));
|
||||
var none = new MenuItem();
|
||||
none.textProperty().bind(AppI18n.observable("none"));
|
||||
none.setOnAction(event -> {
|
||||
getWrapper().getEntry().setColor(null);
|
||||
event.consume();
|
||||
});
|
||||
color.getItems().add(none);
|
||||
Arrays.stream(DataStoreColor.values()).forEach(dataStoreColor -> {
|
||||
MenuItem m = new MenuItem();
|
||||
m.textProperty().bind(AppI18n.observable(dataStoreColor.getId()));
|
||||
m.setOnAction(event -> {
|
||||
getWrapper().getEntry().setColor(dataStoreColor);
|
||||
event.consume();
|
||||
});
|
||||
color.getItems().add(m);
|
||||
});
|
||||
items.add(color);
|
||||
}
|
||||
|
||||
if (getWrapper().getEntry().getProvider() != null && getWrapper().getEntry().getProvider().canMoveCategories()) {
|
||||
var move = new Menu(AppI18n.get("moveTo"), new FontIcon("mdi2f-folder-move-outline"));
|
||||
StoreViewState.get().getSortedCategories(getWrapper().getCategory().getValue().getRoot()).getList().forEach(
|
||||
storeCategoryWrapper -> {
|
||||
MenuItem m = new MenuItem();
|
||||
m.textProperty().setValue(" ".repeat(storeCategoryWrapper.getDepth()) + storeCategoryWrapper.getName().getValue());
|
||||
m.setOnAction(event -> {
|
||||
getWrapper().moveTo(storeCategoryWrapper.getCategory());
|
||||
event.consume();
|
||||
});
|
||||
if (storeCategoryWrapper.getParent() == null) {
|
||||
m.setDisable(true);
|
||||
}
|
||||
|
||||
move.getItems().add(m);
|
||||
});
|
||||
items.add(move);
|
||||
}
|
||||
{
|
||||
var order = new Menu(AppI18n.get("order"), new FontIcon("mdal-bookmarks"));
|
||||
var noOrder = new MenuItem(AppI18n.get("none"), new FontIcon("mdi2r-reorder-horizontal"));
|
||||
noOrder.setOnAction(event -> {
|
||||
getWrapper().setOrder(null);
|
||||
event.consume();
|
||||
});
|
||||
if (getWrapper().getEntry().getExplicitOrder() == null) {
|
||||
noOrder.setDisable(true);
|
||||
}
|
||||
order.getItems().add(noOrder);
|
||||
order.getItems().add(new SeparatorMenuItem());
|
||||
|
||||
var top = new MenuItem(AppI18n.get("stickToTop"), new FontIcon("mdi2o-order-bool-descending"));
|
||||
top.setOnAction(event -> {
|
||||
getWrapper().setOrder(DataStoreEntry.Order.TOP);
|
||||
event.consume();
|
||||
});
|
||||
if (DataStoreEntry.Order.TOP.equals(getWrapper().getEntry().getExplicitOrder())) {
|
||||
top.setDisable(true);
|
||||
}
|
||||
order.getItems().add(top);
|
||||
|
||||
var bottom = new MenuItem(AppI18n.get("stickToBottom"), new FontIcon("mdi2o-order-bool-ascending"));
|
||||
bottom.setOnAction(event -> {
|
||||
getWrapper().setOrder(DataStoreEntry.Order.BOTTOM);
|
||||
event.consume();
|
||||
});
|
||||
if (DataStoreEntry.Order.BOTTOM.equals(getWrapper().getEntry().getExplicitOrder())) {
|
||||
bottom.setDisable(true);
|
||||
}
|
||||
order.getItems().add(bottom);
|
||||
items.add(order);
|
||||
}
|
||||
}
|
||||
|
||||
if (cat == StoreActionCategory.DELETION) {
|
||||
var del = new MenuItem(AppI18n.get("remove"), new FontIcon("mdal-delete_outline"));
|
||||
del.disableProperty().bind(Bindings.createBooleanBinding(() -> {
|
||||
return !getWrapper().getDeletable().get();
|
||||
}, getWrapper().getDeletable()));
|
||||
del.setOnAction(event -> getWrapper().delete());
|
||||
contextMenu.getItems().add(del);
|
||||
}
|
||||
|
||||
if (items.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (p instanceof LeafStoreActionProvider<?> l && l.isSystemAction() && !hasSep) {
|
||||
if (contextMenu.getItems().size() > 0) {
|
||||
contextMenu.getItems().add(new SeparatorMenuItem());
|
||||
}
|
||||
hasSep = true;
|
||||
}
|
||||
|
||||
contextMenu.getItems().add(item);
|
||||
}
|
||||
if (contextMenu.getItems().size() > 0 && !hasSep) {
|
||||
contextMenu.getItems().addAll(items);
|
||||
contextMenu.getItems().add(new SeparatorMenuItem());
|
||||
}
|
||||
|
||||
var rename = new MenuItem(AppI18n.get("rename"), new FontIcon("mdal-edit"));
|
||||
rename.setOnAction(event -> {
|
||||
name.requestFocus();
|
||||
});
|
||||
contextMenu.getItems().add(rename);
|
||||
|
||||
|
||||
var notes = new MenuItem(AppI18n.get("addNotes"), new FontIcon("mdi2n-note-text"));
|
||||
notes.setOnAction(event -> {
|
||||
getWrapper().getNotes().setValue(new StoreNotes(null, getDefaultNotes()));
|
||||
event.consume();
|
||||
});
|
||||
notes.visibleProperty().bind(BindingsHelper.map(getWrapper().getNotes(), s -> s.getCommited() == null));
|
||||
contextMenu.getItems().add(notes);
|
||||
|
||||
if (AppPrefs.get().developerMode().getValue()) {
|
||||
var browse = new MenuItem(AppI18n.get("browseInternalStorage"), new FontIcon("mdi2f-folder-open-outline"));
|
||||
browse.setOnAction(event ->
|
||||
DesktopHelper.browsePathLocal(getWrapper().getEntry().getDirectory()));
|
||||
contextMenu.getItems().add(browse);
|
||||
}
|
||||
|
||||
if (AppPrefs.get().enableHttpApi().get()) {
|
||||
var copyId = new MenuItem(AppI18n.get("copyId"), new FontIcon("mdi2c-content-copy"));
|
||||
copyId.setOnAction(event ->
|
||||
ClipboardHelper.copyText(getWrapper().getEntry().getUuid().toString()));
|
||||
contextMenu.getItems().add(copyId);
|
||||
}
|
||||
|
||||
if (section.getDepth() == 1) {
|
||||
var color = new Menu(AppI18n.get("color"), new FontIcon("mdi2f-format-color-fill"));
|
||||
var none = new MenuItem();
|
||||
none.textProperty().bind(AppI18n.observable("none"));
|
||||
none.setOnAction(event -> {
|
||||
getWrapper().getEntry().setColor(null);
|
||||
event.consume();
|
||||
});
|
||||
color.getItems().add(none);
|
||||
Arrays.stream(DataStoreColor.values()).forEach(dataStoreColor -> {
|
||||
MenuItem m = new MenuItem();
|
||||
m.textProperty().bind(AppI18n.observable(dataStoreColor.getId()));
|
||||
m.setOnAction(event -> {
|
||||
getWrapper().getEntry().setColor(dataStoreColor);
|
||||
event.consume();
|
||||
});
|
||||
color.getItems().add(m);
|
||||
});
|
||||
contextMenu.getItems().add(color);
|
||||
}
|
||||
|
||||
if (getWrapper().getEntry().getProvider() != null
|
||||
&& getWrapper().getEntry().getProvider().canMoveCategories()) {
|
||||
var move = new Menu(AppI18n.get("moveTo"), new FontIcon("mdi2f-folder-move-outline"));
|
||||
StoreViewState.get()
|
||||
.getSortedCategories(getWrapper().getCategory().getValue().getRoot())
|
||||
.getList()
|
||||
.forEach(storeCategoryWrapper -> {
|
||||
MenuItem m = new MenuItem();
|
||||
m.textProperty()
|
||||
.setValue(" ".repeat(storeCategoryWrapper.getDepth())
|
||||
+ storeCategoryWrapper.getName().getValue());
|
||||
m.setOnAction(event -> {
|
||||
getWrapper().moveTo(storeCategoryWrapper.getCategory());
|
||||
event.consume();
|
||||
});
|
||||
if (storeCategoryWrapper.getParent() == null) {
|
||||
m.setDisable(true);
|
||||
}
|
||||
|
||||
move.getItems().add(m);
|
||||
});
|
||||
contextMenu.getItems().add(move);
|
||||
}
|
||||
{
|
||||
var order = new Menu(AppI18n.get("order"), new FontIcon("mdal-bookmarks"));
|
||||
var noOrder = new MenuItem(AppI18n.get("none"), new FontIcon("mdi2r-reorder-horizontal"));
|
||||
noOrder.setOnAction(event -> {
|
||||
getWrapper().setOrder(null);
|
||||
event.consume();
|
||||
});
|
||||
if (getWrapper().getEntry().getExplicitOrder() == null) {
|
||||
noOrder.setDisable(true);
|
||||
}
|
||||
order.getItems().add(noOrder);
|
||||
order.getItems().add(new SeparatorMenuItem());
|
||||
|
||||
var top = new MenuItem(AppI18n.get("stickToTop"), new FontIcon("mdi2o-order-bool-descending"));
|
||||
top.setOnAction(event -> {
|
||||
getWrapper().setOrder(DataStoreEntry.Order.TOP);
|
||||
event.consume();
|
||||
});
|
||||
if (DataStoreEntry.Order.TOP.equals(getWrapper().getEntry().getExplicitOrder())) {
|
||||
top.setDisable(true);
|
||||
}
|
||||
order.getItems().add(top);
|
||||
|
||||
var bottom = new MenuItem(AppI18n.get("stickToBottom"), new FontIcon("mdi2o-order-bool-ascending"));
|
||||
bottom.setOnAction(event -> {
|
||||
getWrapper().setOrder(DataStoreEntry.Order.BOTTOM);
|
||||
event.consume();
|
||||
});
|
||||
if (DataStoreEntry.Order.BOTTOM.equals(getWrapper().getEntry().getExplicitOrder())) {
|
||||
bottom.setDisable(true);
|
||||
}
|
||||
order.getItems().add(bottom);
|
||||
contextMenu.getItems().add(order);
|
||||
}
|
||||
|
||||
var readOnly = new MenuItem();
|
||||
readOnly.graphicProperty()
|
||||
.bind(Bindings.createObjectBinding(
|
||||
() -> {
|
||||
var is = getWrapper().getReadOnly().get();
|
||||
return is
|
||||
? new FontIcon("mdi2l-lock-open-variant-outline")
|
||||
: new FontIcon("mdi2l-lock-open-outline");
|
||||
},
|
||||
getWrapper().getReadOnly()));
|
||||
readOnly.textProperty()
|
||||
.bind(Bindings.createStringBinding(
|
||||
() -> {
|
||||
var is = getWrapper().getReadOnly().get();
|
||||
return is ? AppI18n.get("unsetReadOnly") : AppI18n.get("setReadOnly");
|
||||
},
|
||||
AppI18n.activeLanguage(),
|
||||
getWrapper().getReadOnly()));
|
||||
readOnly.setOnAction(event ->
|
||||
getWrapper().getEntry().setReadOnly(!getWrapper().getReadOnly().get()));
|
||||
contextMenu.getItems().add(readOnly);
|
||||
|
||||
contextMenu.getItems().add(new SeparatorMenuItem());
|
||||
|
||||
var del = new MenuItem(AppI18n.get("remove"), new FontIcon("mdal-delete_outline"));
|
||||
del.disableProperty()
|
||||
.bind(Bindings.createBooleanBinding(
|
||||
() -> {
|
||||
return !getWrapper().getDeletable().get();
|
||||
},
|
||||
getWrapper().getDeletable()));
|
||||
del.setOnAction(event -> getWrapper().delete());
|
||||
contextMenu.getItems().add(del);
|
||||
|
||||
return contextMenu;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ import io.xpipe.app.action.*;
|
||||
import io.xpipe.app.ext.LocalStore;
|
||||
import io.xpipe.app.ext.ShellStore;
|
||||
import io.xpipe.app.ext.SingletonSessionStore;
|
||||
import io.xpipe.app.hub.action.BranchStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.StoreActionProvider;
|
||||
import io.xpipe.app.hub.action.impl.EditStoreActionProvider;
|
||||
import io.xpipe.app.issue.ErrorEvent;
|
||||
|
||||
@@ -207,14 +207,14 @@ public abstract class DataStorage {
|
||||
localIdentities.get().setParentCategory(ALL_IDENTITIES_CATEGORY_UUID);
|
||||
}
|
||||
|
||||
var allMacros = getStoreCategoryIfPresent(ALL_MACROS_CATEGORY_UUID);
|
||||
if (allMacros.isEmpty()) {
|
||||
var cat = DataStoreCategory.createNew(null, ALL_MACROS_CATEGORY_UUID, "All macros");
|
||||
cat.setDirectory(categoriesDir.resolve(ALL_MACROS_CATEGORY_UUID.toString()));
|
||||
storeCategories.add(cat);
|
||||
} else {
|
||||
allMacros.get().setParentCategory(null);
|
||||
}
|
||||
// var allMacros = getStoreCategoryIfPresent(ALL_MACROS_CATEGORY_UUID);
|
||||
// if (allMacros.isEmpty()) {
|
||||
// var cat = DataStoreCategory.createNew(null, ALL_MACROS_CATEGORY_UUID, "All macros");
|
||||
// cat.setDirectory(categoriesDir.resolve(ALL_MACROS_CATEGORY_UUID.toString()));
|
||||
// storeCategories.add(cat);
|
||||
// } else {
|
||||
// allMacros.get().setParentCategory(null);
|
||||
// }
|
||||
|
||||
if (supportsSync()) {
|
||||
var sharedIdentities = getStoreCategoryIfPresent(SYNCED_IDENTITIES_CATEGORY_UUID);
|
||||
|
||||
+7
-1
@@ -1,10 +1,11 @@
|
||||
package io.xpipe.ext.base.identity;
|
||||
|
||||
import io.xpipe.app.action.AbstractAction;
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.ext.DataStoreCreationCategory;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.hub.action.StoreActionCategory;
|
||||
import io.xpipe.app.hub.comp.StoreCreationDialog;
|
||||
import io.xpipe.app.storage.DataStorage;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
@@ -18,6 +19,11 @@ import lombok.extern.jackson.Jacksonized;
|
||||
|
||||
public class LocalIdentityConvertActionProvider implements LeafStoreActionProvider<LocalIdentityStore> {
|
||||
|
||||
@Override
|
||||
public StoreActionCategory getCategory() {
|
||||
return StoreActionCategory.CUSTOM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractAction createAction(DataStoreEntryRef<LocalIdentityStore> ref) {
|
||||
return Action.builder().ref(ref).build();
|
||||
|
||||
@@ -4,8 +4,7 @@ import io.xpipe.app.action.*;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.ext.ProcessControlProvider;
|
||||
import io.xpipe.app.ext.ShellStore;
|
||||
import io.xpipe.app.hub.action.BatchStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.hub.action.*;
|
||||
import io.xpipe.app.hub.action.impl.CategoryConfigActionProvider;
|
||||
import io.xpipe.app.hub.action.impl.CategorySelectActionProvider;
|
||||
import io.xpipe.app.hub.action.impl.RefreshStoreActionProvider;
|
||||
@@ -22,10 +21,16 @@ import javafx.beans.value.ObservableValue;
|
||||
import lombok.Value;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class RunScriptActionProviderMenu
|
||||
implements BranchStoreActionProvider<ShellStore>, BatchStoreActionProvider<ShellStore> {
|
||||
|
||||
@Override
|
||||
public StoreActionCategory getCategory() {
|
||||
return StoreActionCategory.CUSTOM;
|
||||
}
|
||||
|
||||
@Value
|
||||
private static class TerminalRunActionProvider
|
||||
implements LeafStoreActionProvider<ShellStore>, BatchStoreActionProvider<ShellStore> {
|
||||
@@ -239,7 +244,7 @@ public class RunScriptActionProviderMenu
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActionProvider> getChildren(DataStoreEntryRef<ShellStore> store) {
|
||||
public List<StoreActionProvider<?>> getChildren(DataStoreEntryRef<ShellStore> store) {
|
||||
if (hierarchy.isLeaf()) {
|
||||
return List.of(
|
||||
new TerminalRunActionProvider(hierarchy),
|
||||
@@ -249,7 +254,7 @@ public class RunScriptActionProviderMenu
|
||||
|
||||
return hierarchy.getChildren().stream()
|
||||
.map(c -> new ScriptActionProvider(c))
|
||||
.toList();
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -419,7 +424,7 @@ public class RunScriptActionProviderMenu
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActionProvider> getChildren(DataStoreEntryRef<ShellStore> store) {
|
||||
public List<StoreActionProvider<?>> getChildren(DataStoreEntryRef<ShellStore> store) {
|
||||
if (Boolean.TRUE.equals(
|
||||
DataStorage.get().getEffectiveCategoryConfig(store.get()).getDontAllowScripts())) {
|
||||
return List.of(new ScriptsDisabledActionProvider());
|
||||
@@ -442,9 +447,9 @@ public class RunScriptActionProviderMenu
|
||||
|
||||
return true;
|
||||
});
|
||||
var list = hierarchy.getChildren().stream()
|
||||
List<StoreActionProvider<?>> list = hierarchy.getChildren().stream()
|
||||
.map(c -> new ScriptActionProvider(c))
|
||||
.toList();
|
||||
.collect(Collectors.toList());
|
||||
if (list.isEmpty()) {
|
||||
return List.of(new NoScriptsActionProvider());
|
||||
} else {
|
||||
|
||||
+7
-1
@@ -1,9 +1,10 @@
|
||||
package io.xpipe.ext.base.script;
|
||||
|
||||
import io.xpipe.app.action.AbstractAction;
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.hub.action.StoreActionCategory;
|
||||
import io.xpipe.app.hub.comp.StoreCreationDialog;
|
||||
import io.xpipe.app.storage.DataStorage;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
@@ -20,6 +21,11 @@ import java.util.Arrays;
|
||||
|
||||
public class SimpleScriptQuickEditActionProvider implements LeafStoreActionProvider<SimpleScriptStore> {
|
||||
|
||||
@Override
|
||||
public StoreActionCategory getCategory() {
|
||||
return StoreActionCategory.CUSTOM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDefault(DataStoreEntryRef<SimpleScriptStore> o) {
|
||||
return true;
|
||||
|
||||
+7
-1
@@ -1,9 +1,10 @@
|
||||
package io.xpipe.ext.base.service;
|
||||
|
||||
import io.xpipe.app.action.AbstractAction;
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.hub.action.StoreActionCategory;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
import io.xpipe.app.util.ClipboardHelper;
|
||||
import io.xpipe.app.util.LabelGraphic;
|
||||
@@ -15,6 +16,11 @@ import lombok.extern.jackson.Jacksonized;
|
||||
|
||||
public class ServiceCopyAddressActionProvider implements LeafStoreActionProvider<AbstractServiceStore> {
|
||||
|
||||
@Override
|
||||
public StoreActionCategory getCategory() {
|
||||
return StoreActionCategory.CUSTOM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMajor(DataStoreEntryRef<AbstractServiceStore> o) {
|
||||
return true;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package io.xpipe.ext.base.service;
|
||||
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.BatchStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.hub.action.StoreActionCategory;
|
||||
import io.xpipe.app.storage.DataStorage;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
import io.xpipe.app.util.LabelGraphic;
|
||||
@@ -17,6 +18,11 @@ public class ServiceRefreshActionProvider
|
||||
implements LeafStoreActionProvider<FixedServiceCreatorStore>,
|
||||
BatchStoreActionProvider<FixedServiceCreatorStore> {
|
||||
|
||||
@Override
|
||||
public StoreActionCategory getCategory() {
|
||||
return StoreActionCategory.CUSTOM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMajor(DataStoreEntryRef<FixedServiceCreatorStore> o) {
|
||||
return true;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package io.xpipe.ext.base.store;
|
||||
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.BatchStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.hub.action.StoreActionCategory;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
import io.xpipe.app.util.LabelGraphic;
|
||||
|
||||
@@ -15,6 +16,11 @@ import lombok.extern.jackson.Jacksonized;
|
||||
public class StorePauseActionProvider
|
||||
implements LeafStoreActionProvider<PauseableStore>, BatchStoreActionProvider<PauseableStore> {
|
||||
|
||||
@Override
|
||||
public StoreActionCategory getCategory() {
|
||||
return StoreActionCategory.CUSTOM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMutation() {
|
||||
return true;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package io.xpipe.ext.base.store;
|
||||
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.BatchStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.hub.action.StoreActionCategory;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
import io.xpipe.app.util.LabelGraphic;
|
||||
import io.xpipe.core.store.DataStore;
|
||||
@@ -16,6 +17,11 @@ import lombok.extern.jackson.Jacksonized;
|
||||
public class StoreRestartActionProvider
|
||||
implements LeafStoreActionProvider<DataStore>, BatchStoreActionProvider<DataStore> {
|
||||
|
||||
@Override
|
||||
public StoreActionCategory getCategory() {
|
||||
return StoreActionCategory.CUSTOM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMutation() {
|
||||
return true;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package io.xpipe.ext.base.store;
|
||||
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.BatchStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.hub.action.StoreActionCategory;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
import io.xpipe.app.util.LabelGraphic;
|
||||
|
||||
@@ -15,6 +16,11 @@ import lombok.extern.jackson.Jacksonized;
|
||||
public class StoreStartActionProvider
|
||||
implements LeafStoreActionProvider<StartableStore>, BatchStoreActionProvider<StartableStore> {
|
||||
|
||||
@Override
|
||||
public StoreActionCategory getCategory() {
|
||||
return StoreActionCategory.CUSTOM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMutation() {
|
||||
return true;
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package io.xpipe.ext.base.store;
|
||||
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.BatchStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.hub.action.StoreActionCategory;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
import io.xpipe.app.util.LabelGraphic;
|
||||
|
||||
@@ -15,6 +16,11 @@ import lombok.extern.jackson.Jacksonized;
|
||||
public class StoreStopActionProvider
|
||||
implements LeafStoreActionProvider<StoppableStore>, BatchStoreActionProvider<StoppableStore> {
|
||||
|
||||
@Override
|
||||
public StoreActionCategory getCategory() {
|
||||
return StoreActionCategory.CUSTOM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMutation() {
|
||||
return true;
|
||||
|
||||
+3
-2
@@ -1,8 +1,9 @@
|
||||
package io.xpipe.ext.system.incus;
|
||||
|
||||
import io.xpipe.app.action.ActionProvider;
|
||||
import io.xpipe.app.action.BranchStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.BranchStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.StoreActionProvider;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
import io.xpipe.app.util.LabelGraphic;
|
||||
import io.xpipe.ext.base.store.StorePauseActionProvider;
|
||||
@@ -37,7 +38,7 @@ public class IncusContainerActionProviderMenu implements BranchStoreActionProvid
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ActionProvider> getChildren(DataStoreEntryRef<IncusContainerStore> store) {
|
||||
public List<StoreActionProvider<?>> getChildren(DataStoreEntryRef<IncusContainerStore> store) {
|
||||
return List.of(
|
||||
new StoreStartActionProvider(),
|
||||
new StoreStopActionProvider(),
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package io.xpipe.ext.system.incus;
|
||||
|
||||
import io.xpipe.app.action.AbstractAction;
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package io.xpipe.ext.system.incus;
|
||||
|
||||
import io.xpipe.app.action.AbstractAction;
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package io.xpipe.ext.system.incus;
|
||||
|
||||
import io.xpipe.app.action.AbstractAction;
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.browser.BrowserFullSessionModel;
|
||||
import io.xpipe.app.browser.file.BrowserFileOpener;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
|
||||
+3
-2
@@ -1,8 +1,9 @@
|
||||
package io.xpipe.ext.system.lxd;
|
||||
|
||||
import io.xpipe.app.action.ActionProvider;
|
||||
import io.xpipe.app.action.BranchStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.BranchStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.StoreActionProvider;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
import io.xpipe.app.util.LabelGraphic;
|
||||
import io.xpipe.ext.base.store.StorePauseActionProvider;
|
||||
@@ -37,7 +38,7 @@ public class LxdContainerActionProviderMenu implements BranchStoreActionProvider
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ActionProvider> getChildren(DataStoreEntryRef<LxdContainerStore> store) {
|
||||
public List<StoreActionProvider<?>> getChildren(DataStoreEntryRef<LxdContainerStore> store) {
|
||||
return List.of(
|
||||
new StoreStartActionProvider(),
|
||||
new StoreStopActionProvider(),
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package io.xpipe.ext.system.lxd;
|
||||
|
||||
import io.xpipe.app.action.AbstractAction;
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package io.xpipe.ext.system.lxd;
|
||||
|
||||
import io.xpipe.app.action.AbstractAction;
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package io.xpipe.ext.system.lxd;
|
||||
|
||||
import io.xpipe.app.action.AbstractAction;
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.browser.BrowserFullSessionModel;
|
||||
import io.xpipe.app.browser.file.BrowserFileOpener;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
|
||||
+3
-2
@@ -1,8 +1,9 @@
|
||||
package io.xpipe.ext.system.podman;
|
||||
|
||||
import io.xpipe.app.action.ActionProvider;
|
||||
import io.xpipe.app.action.BranchStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.BranchStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.StoreActionProvider;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
import io.xpipe.app.util.LabelGraphic;
|
||||
import io.xpipe.ext.base.store.StoreRestartActionProvider;
|
||||
@@ -36,7 +37,7 @@ public class PodmanContainerActionProviderMenu implements BranchStoreActionProvi
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ActionProvider> getChildren(DataStoreEntryRef<PodmanContainerStore> store) {
|
||||
public List<StoreActionProvider<?>> getChildren(DataStoreEntryRef<PodmanContainerStore> store) {
|
||||
return List.of(
|
||||
new StoreStartActionProvider(),
|
||||
new StoreStopActionProvider(),
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
package io.xpipe.ext.system.podman;
|
||||
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package io.xpipe.ext.system.podman;
|
||||
|
||||
import io.xpipe.app.action.AbstractAction;
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package io.xpipe.ext.system.podman;
|
||||
|
||||
import io.xpipe.app.action.AbstractAction;
|
||||
import io.xpipe.app.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.hub.action.LeafStoreActionProvider;
|
||||
import io.xpipe.app.core.AppI18n;
|
||||
import io.xpipe.app.hub.action.StoreAction;
|
||||
import io.xpipe.app.storage.DataStoreEntryRef;
|
||||
|
||||
Reference in New Issue
Block a user