New release [release]

This commit is contained in:
crschnick 2023-02-22 15:14:46 +00:00
parent 6629f218d7
commit 491d3c201c
10 changed files with 20 additions and 19 deletions

View file

@ -14,9 +14,9 @@ import javafx.scene.layout.Region;
final class BookmarkList extends SimpleComp {
private final BrowserModel model;
private final FileBrowserModel model;
BookmarkList(BrowserModel model) {
BookmarkList(FileBrowserModel model) {
this.model = model;
}

View file

@ -10,7 +10,7 @@ import lombok.Value;
import java.nio.file.Files;
import java.util.*;
public class BrowserClipboard {
public class FileBrowserClipboard {
@Value
public static class Instance {

View file

@ -24,13 +24,13 @@ import static atlantafx.base.theme.Styles.DENSE;
import static atlantafx.base.theme.Styles.toggleStyleClass;
import static javafx.scene.control.TabPane.TabClosingPolicy.ALL_TABS;
public class BrowserComp extends SimpleComp {
public class FileBrowserComp extends SimpleComp {
private static final double TAB_MIN_HEIGHT = 60;
private final BrowserModel model;
private final FileBrowserModel model;
public BrowserComp(BrowserModel model) {
public FileBrowserComp(FileBrowserModel model) {
this.model = model;
}

View file

@ -9,9 +9,9 @@ import javafx.collections.ObservableList;
import lombok.Getter;
@Getter
public class BrowserModel {
public class FileBrowserModel {
public static final BrowserModel DEFAULT = new BrowserModel();
public static final FileBrowserModel DEFAULT = new FileBrowserModel();
private final ObservableList<OpenFileSystemModel> openFileSystems = FXCollections.observableArrayList();
private final Property<OpenFileSystemModel> selected = new SimpleObjectProperty<>();

View file

@ -12,7 +12,7 @@ import java.util.List;
import java.util.Objects;
import java.util.Optional;
final class NavigationHistory {
final class FileBrowserNavigationHistory {
private final IntegerProperty cursor = new SimpleIntegerProperty(0);
private final List<String> history = new ArrayList<>();

View file

@ -95,12 +95,12 @@ final class FileListComp extends AnchorPane {
if (event.isControlDown()
&& event.getCode().equals(KeyCode.C)
&& table.getSelectionModel().getSelectedItems().size() > 0) {
BrowserClipboard.startCopy(table.getSelectionModel().getSelectedItems());
FileBrowserClipboard.startCopy(table.getSelectionModel().getSelectedItems());
event.consume();
}
if (event.isControlDown() && event.getCode().equals(KeyCode.V)) {
var clipboard = BrowserClipboard.retrieveCopy();
var clipboard = FileBrowserClipboard.retrieveCopy();
if (clipboard != null) {
var files = clipboard.getEntries();
var target = fileList.getModel().getCurrentDirectory();
@ -155,7 +155,7 @@ final class FileListComp extends AnchorPane {
var selected = table.getSelectionModel().getSelectedItems();
Dragboard db = row.startDragAndDrop(TransferMode.COPY);
db.setContent(BrowserClipboard.startDrag(selected));
db.setContent(FileBrowserClipboard.startDrag(selected));
db.setDragView(image, 30, 60);
event.setDragDetect(true);
event.consume();
@ -221,7 +221,7 @@ final class FileListComp extends AnchorPane {
// Accept drops from inside the app window
if (event.getGestureSource() != null) {
event.setDropCompleted(true);
var files = BrowserClipboard.retrieveDrag(event.getDragboard()).getEntries();
var files = FileBrowserClipboard.retrieveDrag(event.getDragboard()).getEntries();
var target = row.getItem() != null
? row.getItem()
: fileList.getModel().getCurrentDirectory();

View file

@ -27,7 +27,7 @@ final class OpenFileSystemModel {
private FileSystem fileSystem;
private final FileListModel fileList;
private final ReadOnlyObjectWrapper<String> currentPath = new ReadOnlyObjectWrapper<>();
private final NavigationHistory history = new NavigationHistory();
private final FileBrowserNavigationHistory history = new FileBrowserNavigationHistory();
private final BooleanProperty busy = new SimpleBooleanProperty();
public OpenFileSystemModel() {
@ -208,7 +208,7 @@ final class OpenFileSystemModel {
return currentPath.getReadOnlyProperty();
}
public NavigationHistory getHistory() {
public FileBrowserNavigationHistory getHistory() {
return history;
}

View file

@ -1,7 +1,7 @@
package io.xpipe.app.comp;
import io.xpipe.app.browser.BrowserComp;
import io.xpipe.app.browser.BrowserModel;
import io.xpipe.app.browser.FileBrowserComp;
import io.xpipe.app.browser.FileBrowserModel;
import io.xpipe.app.comp.about.AboutTabComp;
import io.xpipe.app.comp.base.SideMenuBarComp;
import io.xpipe.app.comp.storage.collection.SourceCollectionLayoutComp;
@ -43,7 +43,7 @@ public class AppLayoutComp extends Comp<CompStructure<BorderPane>> {
private List<SideMenuBarComp.Entry> createEntryList() {
var l = new ArrayList<>(List.of(
new SideMenuBarComp.Entry(AppI18n.observable("connections"), "mdi2c-connection", new StoreLayoutComp()),
new SideMenuBarComp.Entry(AppI18n.observable("browser"), "mdi2f-file-cabinet", new BrowserComp(BrowserModel.DEFAULT)),
new SideMenuBarComp.Entry(AppI18n.observable("browser"), "mdi2f-file-cabinet", new FileBrowserComp(FileBrowserModel.DEFAULT)),
new SideMenuBarComp.Entry(AppI18n.observable("data"), "mdsal-dvr", new SourceCollectionLayoutComp()),
new SideMenuBarComp.Entry(
AppI18n.observable("settings"), "mdsmz-miscellaneous_services", new PrefsComp(this)),

1
dist/changelogs/0.5.2.md vendored Normal file
View file

@ -0,0 +1 @@
- Improvements and fixes for the file explorer

View file

@ -1 +1 @@
0.5.1
0.5.2