mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-06-30 20:10:57 +12:00
New release [release]
This commit is contained in:
parent
6629f218d7
commit
491d3c201c
|
@ -14,9 +14,9 @@ import javafx.scene.layout.Region;
|
||||||
|
|
||||||
final class BookmarkList extends SimpleComp {
|
final class BookmarkList extends SimpleComp {
|
||||||
|
|
||||||
private final BrowserModel model;
|
private final FileBrowserModel model;
|
||||||
|
|
||||||
BookmarkList(BrowserModel model) {
|
BookmarkList(FileBrowserModel model) {
|
||||||
this.model = model;
|
this.model = model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import lombok.Value;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class BrowserClipboard {
|
public class FileBrowserClipboard {
|
||||||
|
|
||||||
@Value
|
@Value
|
||||||
public static class Instance {
|
public static class Instance {
|
|
@ -24,13 +24,13 @@ import static atlantafx.base.theme.Styles.DENSE;
|
||||||
import static atlantafx.base.theme.Styles.toggleStyleClass;
|
import static atlantafx.base.theme.Styles.toggleStyleClass;
|
||||||
import static javafx.scene.control.TabPane.TabClosingPolicy.ALL_TABS;
|
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 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;
|
this.model = model;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,9 +9,9 @@ import javafx.collections.ObservableList;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
@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 ObservableList<OpenFileSystemModel> openFileSystems = FXCollections.observableArrayList();
|
||||||
private final Property<OpenFileSystemModel> selected = new SimpleObjectProperty<>();
|
private final Property<OpenFileSystemModel> selected = new SimpleObjectProperty<>();
|
|
@ -12,7 +12,7 @@ import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
final class NavigationHistory {
|
final class FileBrowserNavigationHistory {
|
||||||
|
|
||||||
private final IntegerProperty cursor = new SimpleIntegerProperty(0);
|
private final IntegerProperty cursor = new SimpleIntegerProperty(0);
|
||||||
private final List<String> history = new ArrayList<>();
|
private final List<String> history = new ArrayList<>();
|
|
@ -95,12 +95,12 @@ final class FileListComp extends AnchorPane {
|
||||||
if (event.isControlDown()
|
if (event.isControlDown()
|
||||||
&& event.getCode().equals(KeyCode.C)
|
&& event.getCode().equals(KeyCode.C)
|
||||||
&& table.getSelectionModel().getSelectedItems().size() > 0) {
|
&& table.getSelectionModel().getSelectedItems().size() > 0) {
|
||||||
BrowserClipboard.startCopy(table.getSelectionModel().getSelectedItems());
|
FileBrowserClipboard.startCopy(table.getSelectionModel().getSelectedItems());
|
||||||
event.consume();
|
event.consume();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.isControlDown() && event.getCode().equals(KeyCode.V)) {
|
if (event.isControlDown() && event.getCode().equals(KeyCode.V)) {
|
||||||
var clipboard = BrowserClipboard.retrieveCopy();
|
var clipboard = FileBrowserClipboard.retrieveCopy();
|
||||||
if (clipboard != null) {
|
if (clipboard != null) {
|
||||||
var files = clipboard.getEntries();
|
var files = clipboard.getEntries();
|
||||||
var target = fileList.getModel().getCurrentDirectory();
|
var target = fileList.getModel().getCurrentDirectory();
|
||||||
|
@ -155,7 +155,7 @@ final class FileListComp extends AnchorPane {
|
||||||
|
|
||||||
var selected = table.getSelectionModel().getSelectedItems();
|
var selected = table.getSelectionModel().getSelectedItems();
|
||||||
Dragboard db = row.startDragAndDrop(TransferMode.COPY);
|
Dragboard db = row.startDragAndDrop(TransferMode.COPY);
|
||||||
db.setContent(BrowserClipboard.startDrag(selected));
|
db.setContent(FileBrowserClipboard.startDrag(selected));
|
||||||
db.setDragView(image, 30, 60);
|
db.setDragView(image, 30, 60);
|
||||||
event.setDragDetect(true);
|
event.setDragDetect(true);
|
||||||
event.consume();
|
event.consume();
|
||||||
|
@ -221,7 +221,7 @@ final class FileListComp extends AnchorPane {
|
||||||
// Accept drops from inside the app window
|
// Accept drops from inside the app window
|
||||||
if (event.getGestureSource() != null) {
|
if (event.getGestureSource() != null) {
|
||||||
event.setDropCompleted(true);
|
event.setDropCompleted(true);
|
||||||
var files = BrowserClipboard.retrieveDrag(event.getDragboard()).getEntries();
|
var files = FileBrowserClipboard.retrieveDrag(event.getDragboard()).getEntries();
|
||||||
var target = row.getItem() != null
|
var target = row.getItem() != null
|
||||||
? row.getItem()
|
? row.getItem()
|
||||||
: fileList.getModel().getCurrentDirectory();
|
: fileList.getModel().getCurrentDirectory();
|
||||||
|
|
|
@ -27,7 +27,7 @@ final class OpenFileSystemModel {
|
||||||
private FileSystem fileSystem;
|
private FileSystem fileSystem;
|
||||||
private final FileListModel fileList;
|
private final FileListModel fileList;
|
||||||
private final ReadOnlyObjectWrapper<String> currentPath = new ReadOnlyObjectWrapper<>();
|
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();
|
private final BooleanProperty busy = new SimpleBooleanProperty();
|
||||||
|
|
||||||
public OpenFileSystemModel() {
|
public OpenFileSystemModel() {
|
||||||
|
@ -208,7 +208,7 @@ final class OpenFileSystemModel {
|
||||||
return currentPath.getReadOnlyProperty();
|
return currentPath.getReadOnlyProperty();
|
||||||
}
|
}
|
||||||
|
|
||||||
public NavigationHistory getHistory() {
|
public FileBrowserNavigationHistory getHistory() {
|
||||||
return history;
|
return history;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package io.xpipe.app.comp;
|
package io.xpipe.app.comp;
|
||||||
|
|
||||||
import io.xpipe.app.browser.BrowserComp;
|
import io.xpipe.app.browser.FileBrowserComp;
|
||||||
import io.xpipe.app.browser.BrowserModel;
|
import io.xpipe.app.browser.FileBrowserModel;
|
||||||
import io.xpipe.app.comp.about.AboutTabComp;
|
import io.xpipe.app.comp.about.AboutTabComp;
|
||||||
import io.xpipe.app.comp.base.SideMenuBarComp;
|
import io.xpipe.app.comp.base.SideMenuBarComp;
|
||||||
import io.xpipe.app.comp.storage.collection.SourceCollectionLayoutComp;
|
import io.xpipe.app.comp.storage.collection.SourceCollectionLayoutComp;
|
||||||
|
@ -43,7 +43,7 @@ public class AppLayoutComp extends Comp<CompStructure<BorderPane>> {
|
||||||
private List<SideMenuBarComp.Entry> createEntryList() {
|
private List<SideMenuBarComp.Entry> createEntryList() {
|
||||||
var l = new ArrayList<>(List.of(
|
var l = new ArrayList<>(List.of(
|
||||||
new SideMenuBarComp.Entry(AppI18n.observable("connections"), "mdi2c-connection", new StoreLayoutComp()),
|
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("data"), "mdsal-dvr", new SourceCollectionLayoutComp()),
|
||||||
new SideMenuBarComp.Entry(
|
new SideMenuBarComp.Entry(
|
||||||
AppI18n.observable("settings"), "mdsmz-miscellaneous_services", new PrefsComp(this)),
|
AppI18n.observable("settings"), "mdsmz-miscellaneous_services", new PrefsComp(this)),
|
||||||
|
|
1
dist/changelogs/0.5.2.md
vendored
Normal file
1
dist/changelogs/0.5.2.md
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
- Improvements and fixes for the file explorer
|
Loading…
Reference in a new issue