mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 09:00:26 +00:00
Small fixes [stage]
This commit is contained in:
parent
b5471e52d1
commit
7e3ac0cf2c
6 changed files with 13 additions and 10 deletions
|
@ -136,7 +136,7 @@ public final class BrowserFileListComp extends SimpleComp {
|
||||||
table.setFixedCellSize(32.0);
|
table.setFixedCellSize(32.0);
|
||||||
var os = fileList.getFileSystemModel().getFileSystem().getShell().orElseThrow().getOsType();
|
var os = fileList.getFileSystemModel().getFileSystem().getShell().orElseThrow().getOsType();
|
||||||
table.widthProperty().subscribe((newValue) -> {
|
table.widthProperty().subscribe((newValue) -> {
|
||||||
if (os != OsType.WINDOWS) {
|
if (os != OsType.WINDOWS && os != OsType.MACOS) {
|
||||||
ownerCol.setVisible(newValue.doubleValue() > 1000);
|
ownerCol.setVisible(newValue.doubleValue() > 1000);
|
||||||
}
|
}
|
||||||
var width = getFilenameWidth(table);
|
var width = getFilenameWidth(table);
|
||||||
|
@ -441,7 +441,7 @@ public final class BrowserFileListComp extends SimpleComp {
|
||||||
|
|
||||||
if (fileList.getFileSystemModel().getFileSystem() != null) {
|
if (fileList.getFileSystemModel().getFileSystem() != null) {
|
||||||
var shell = fileList.getFileSystemModel().getFileSystem().getShell().orElseThrow();
|
var shell = fileList.getFileSystemModel().getFileSystem().getShell().orElseThrow();
|
||||||
if (OsType.WINDOWS.equals(shell.getOsType())) {
|
if (OsType.WINDOWS.equals(shell.getOsType()) || OsType.MACOS.equals(shell.getOsType())) {
|
||||||
modeCol.setVisible(false);
|
modeCol.setVisible(false);
|
||||||
ownerCol.setVisible(false);
|
ownerCol.setVisible(false);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -47,20 +47,20 @@ public class OpenFileSystemCache extends ShellControlCache {
|
||||||
var lines = sc.command(CommandBuilder.of().add("cat").addFile("/etc/passwd")).readStdoutOrThrow();
|
var lines = sc.command(CommandBuilder.of().add("cat").addFile("/etc/passwd")).readStdoutOrThrow();
|
||||||
lines.lines().forEach(s -> {
|
lines.lines().forEach(s -> {
|
||||||
var split = s.split(":");
|
var split = s.split(":");
|
||||||
users.put(Integer.parseInt(split[2]), split[0]);
|
users.putIfAbsent(Integer.parseInt(split[2]), split[0]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadGroups() throws Exception {
|
private void loadGroups() throws Exception {
|
||||||
var sc = model.getFileSystem().getShell().orElseThrow();
|
var sc = model.getFileSystem().getShell().orElseThrow();
|
||||||
if (sc.getOsType() == OsType.WINDOWS) {
|
if (sc.getOsType() == OsType.WINDOWS || sc.getOsType() == OsType.MACOS) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var lines = sc.command(CommandBuilder.of().add("cat").addFile("/etc/group")).readStdoutOrThrow();
|
var lines = sc.command(CommandBuilder.of().add("cat").addFile("/etc/group")).readStdoutOrThrow();
|
||||||
lines.lines().forEach(s -> {
|
lines.lines().forEach(s -> {
|
||||||
var split = s.split(":");
|
var split = s.split(":");
|
||||||
groups.put(Integer.parseInt(split[2]), split[0]);
|
groups.putIfAbsent(Integer.parseInt(split[2]), split[0]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
1
dist/changelogs/11.0.md
vendored
1
dist/changelogs/11.0.md
vendored
|
@ -42,6 +42,7 @@ Up until now, if you added a connection that always allocated pty, XPipe would c
|
||||||
- Fix script enabled status being wrong after editing an enabled script
|
- Fix script enabled status being wrong after editing an enabled script
|
||||||
- Fix download move operation failing when moving a directory that already existed in the downloads folder
|
- Fix download move operation failing when moving a directory that already existed in the downloads folder
|
||||||
- Fix some scrollbars are necessarily showing
|
- Fix some scrollbars are necessarily showing
|
||||||
|
- There is now support to view and change users/groups in the file browser
|
||||||
- External git vault data files are now also encrypted by default
|
- External git vault data files are now also encrypted by default
|
||||||
- Rework state information display for proxmox VMs
|
- Rework state information display for proxmox VMs
|
||||||
- Automatically fill identity file for ssh config wildcard keys as well
|
- Automatically fill identity file for ssh config wildcard keys as well
|
||||||
|
|
|
@ -33,13 +33,14 @@ public class ChgrpAction implements BranchAction {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isApplicable(OpenFileSystemModel model, List<BrowserEntry> entries) {
|
public boolean isApplicable(OpenFileSystemModel model, List<BrowserEntry> entries) {
|
||||||
return model.getFileSystem().getShell().orElseThrow().getOsType() != OsType.WINDOWS;
|
var os = model.getFileSystem().getShell().orElseThrow().getOsType();
|
||||||
|
return os != OsType.WINDOWS && os != OsType.MACOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<LeafAction> getBranchingActions(OpenFileSystemModel model, List<BrowserEntry> entries) {
|
public List<LeafAction> getBranchingActions(OpenFileSystemModel model, List<BrowserEntry> entries) {
|
||||||
return model.getCache().getGroups().entrySet().stream()
|
return model.getCache().getGroups().entrySet().stream()
|
||||||
.filter(e -> !e.getValue().equals("nogroup") && (e.getKey().equals(0) || e.getKey() >= 1000))
|
.filter(e -> !e.getValue().equals("nohome") && !e.getValue().equals("nogroup") && !e.getValue().equals("nobody") && (e.getKey().equals(0) || e.getKey() >= 1000))
|
||||||
.map(e -> e.getValue()).map(s -> (LeafAction) new Chgrp(s)).toList();
|
.map(e -> e.getValue()).map(s -> (LeafAction) new Chgrp(s)).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,13 +33,14 @@ public class ChownAction implements BranchAction {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isApplicable(OpenFileSystemModel model, List<BrowserEntry> entries) {
|
public boolean isApplicable(OpenFileSystemModel model, List<BrowserEntry> entries) {
|
||||||
return model.getFileSystem().getShell().orElseThrow().getOsType() != OsType.WINDOWS;
|
var os = model.getFileSystem().getShell().orElseThrow().getOsType();
|
||||||
|
return os != OsType.WINDOWS && os != OsType.MACOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<LeafAction> getBranchingActions(OpenFileSystemModel model, List<BrowserEntry> entries) {
|
public List<LeafAction> getBranchingActions(OpenFileSystemModel model, List<BrowserEntry> entries) {
|
||||||
return model.getCache().getUsers().entrySet().stream()
|
return model.getCache().getUsers().entrySet().stream()
|
||||||
.filter(e -> !e.getValue().equals("nobody") && (e.getKey().equals(0) || e.getKey() >= 1000))
|
.filter(e -> !e.getValue().equals("nohome") && !e.getValue().equals("nobody") && (e.getKey().equals(0) || e.getKey() >= 1000))
|
||||||
.map(e -> e.getValue()).map(s -> (LeafAction) new Chown(s)).toList();
|
.map(e -> e.getValue()).map(s -> (LeafAction) new Chown(s)).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
version
2
version
|
@ -1 +1 @@
|
||||||
11.0-11
|
11.0-12
|
||||||
|
|
Loading…
Reference in a new issue