This commit is contained in:
crschnick 2024-03-04 17:47:13 +00:00
parent a7c046520c
commit 7821d0e779
55 changed files with 1242 additions and 1179 deletions

View file

@ -94,7 +94,8 @@ final class BrowserBookmarkComp extends SimpleComp {
event.consume();
});
});
}, true);
},
true);
var category = new DataStoreCategoryChoiceComp(
StoreViewState.get().getAllConnectionsCategory(),
StoreViewState.get().getActiveCategory(),

View file

@ -124,7 +124,11 @@ public class BrowserTransferModel {
try {
try (var b = new BooleanScope(downloading).start()) {
FileSystemHelper.dropFilesInto(
FileSystemHelper.getLocal(TEMP), List.of(item.getFileEntry()), true, false, progress -> {
FileSystemHelper.getLocal(TEMP),
List.of(item.getFileEntry()),
true,
false,
progress -> {
item.getProgress().setValue(progress);
item.getOpenFileSystemModel().getProgress().setValue(progress);
});
@ -158,7 +162,8 @@ public class BrowserTransferModel {
public ObservableBooleanValue downloadFinished() {
return Bindings.createBooleanBinding(
() -> {
return progress.getValue() != null && progress.getValue().done();
return progress.getValue() != null
&& progress.getValue().done();
},
progress);
}

View file

@ -123,8 +123,7 @@ public class FileSystemHelper {
}
if (!model.getFileSystem().directoryExists(path)) {
throw ErrorEvent.expected(
new IllegalArgumentException(String.format("Directory %s does not exist", path)));
throw ErrorEvent.expected(new IllegalArgumentException(String.format("Directory %s does not exist", path)));
}
try {
@ -153,7 +152,11 @@ public class FileSystemHelper {
}
public static void dropLocalFilesInto(
FileSystem.FileEntry entry, List<Path> files, Consumer<BrowserTransferProgress> progress, boolean checkConflicts) throws Exception {
FileSystem.FileEntry entry,
List<Path> files,
Consumer<BrowserTransferProgress> progress,
boolean checkConflicts)
throws Exception {
var entries = files.stream()
.map(path -> {
try {
@ -202,7 +205,8 @@ public class FileSystemHelper {
AtomicReference<BrowserAlerts.FileConflictChoice> lastConflictChoice = new AtomicReference<>();
for (var file : files) {
if (file.getFileSystem().equals(target.getFileSystem())) {
dropFileAcrossSameFileSystem(target, file, explicitCopy, lastConflictChoice, files.size() > 1, checkConflicts);
dropFileAcrossSameFileSystem(
target, file, explicitCopy, lastConflictChoice, files.size() > 1, checkConflicts);
progress.accept(BrowserTransferProgress.finished(file.getName(), file.getSize()));
} else {
dropFileAcrossFileSystems(target, file, progress, lastConflictChoice, files.size() > 1, checkConflicts);
@ -297,8 +301,12 @@ public class FileSystemHelper {
if (sourceFile.getKind() == FileKind.DIRECTORY) {
target.getFileSystem().mkdirs(targetFile);
} else if (sourceFile.getKind() == FileKind.FILE) {
if (checkConflicts && !handleChoice(
lastConflictChoice, target.getFileSystem(), targetFile, multiple || flatFiles.size() > 1)) {
if (checkConflicts
&& !handleChoice(
lastConflictChoice,
target.getFileSystem(),
targetFile,
multiple || flatFiles.size() > 1)) {
continue;
}

View file

@ -79,13 +79,12 @@ public class SystemStateComp extends SimpleComp {
public static ObservableValue<State> shellState(StoreEntryWrapper w) {
return BindingsHelper.map(w.getPersistentState(), o -> {
if (o instanceof ShellStoreState s) {
if (s.getShellDialect() != null && !s.getShellDialect().getDumbMode().supportsAnyPossibleInteraction()) {
if (s.getShellDialect() != null
&& !s.getShellDialect().getDumbMode().supportsAnyPossibleInteraction()) {
return SUCCESS;
}
return s.getRunning() != null
? s.getRunning() ? SUCCESS : FAILURE
: OTHER;
return s.getRunning() != null ? s.getRunning() ? SUCCESS : FAILURE : OTHER;
}
return OTHER;

View file

@ -216,7 +216,9 @@ public class StoreEntryWrapper {
return true;
}
if (entry.getValidity().isUsable() && entry.getProvider().getSearchableTerms(entry.getStore()).stream().anyMatch(s -> s.toLowerCase().contains(filter.toLowerCase()))) {
if (entry.getValidity().isUsable()
&& entry.getProvider().getSearchableTerms(entry.getStore()).stream()
.anyMatch(s -> s.toLowerCase().contains(filter.toLowerCase()))) {
return true;
}

View file

@ -95,7 +95,8 @@ public class StoreSectionComp extends Comp<CompStructure<VBox>> {
.apply(struc -> struc.get().setFillHeight(true))
.hide(BindingsHelper.persist(Bindings.or(
Bindings.not(section.getWrapper().getExpanded()),
Bindings.size(section.getShownChildren()).isEqualTo(0))))))
Bindings.size(section.getShownChildren())
.isEqualTo(0))))))
.styleClass("store-entry-section-comp")
.apply(struc -> {
struc.get().setFillWidth(true);

View file

@ -33,18 +33,21 @@ public class StoreSectionMiniComp extends Comp<CompStructure<VBox>> {
private static final PseudoClass TOP = PseudoClass.getPseudoClass("top");
private static final PseudoClass SUB = PseudoClass.getPseudoClass("sub");
private final StoreSection section;
private final BiConsumer<StoreSection, Comp<CompStructure<Button>>> augment;
private final boolean condensedStyle;
public StoreSectionMiniComp(StoreSection section, BiConsumer<StoreSection, Comp<CompStructure<Button>>> augment, boolean condensedStyle) {
public StoreSectionMiniComp(
StoreSection section,
BiConsumer<StoreSection, Comp<CompStructure<Button>>> augment,
boolean condensedStyle) {
this.section = section;
this.augment = augment;
this.condensedStyle = condensedStyle;
}
public static Comp<?> createList(StoreSection top, BiConsumer<StoreSection, Comp<CompStructure<Button>>> augment, boolean condensedStyle) {
public static Comp<?> createList(
StoreSection top, BiConsumer<StoreSection, Comp<CompStructure<Button>>> augment, boolean condensedStyle) {
return new StoreSectionMiniComp(top, augment, condensedStyle);
}
@ -128,8 +131,7 @@ public class StoreSectionMiniComp extends Comp<CompStructure<VBox>> {
if (condensedStyle) {
vert.styleClass("condensed");
}
return vert
.styleClass("store-section-mini-comp")
return vert.styleClass("store-section-mini-comp")
.apply(struc -> {
struc.get().setFillWidth(true);
SimpleChangeListener.apply(expanded, val -> {

View file

@ -52,7 +52,11 @@ public class AppFileWatcher {
try {
watchService = FileSystems.getDefault().newWatchService();
} catch (IOException e) {
ErrorEvent.fromThrowable("Unable to initialize file watcher. Watching and updating files in the file browser will be unavailable.", e).expected().handle();
ErrorEvent.fromThrowable(
"Unable to initialize file watcher. Watching and updating files in the file browser will be unavailable.",
e)
.expected()
.handle();
return;
}

View file

@ -8,6 +8,10 @@ import java.util.Optional;
@Value
public class AppVersion implements Comparable<AppVersion> {
int major;
int minor;
int patch;
public static Optional<AppVersion> parse(String version) {
try {
var releaseSplit = version.split("-");
@ -23,10 +27,6 @@ public class AppVersion implements Comparable<AppVersion> {
}
}
int major;
int minor;
int patch;
public boolean greaterThan(AppVersion other) {
return compareTo(other) > 0;
}

View file

@ -38,7 +38,8 @@ public abstract class ScanProvider {
FailableRunnable<Exception> scanner;
String licenseFeatureId;
public ScanOperation(String nameKey, boolean disabled, boolean defaultSelected, FailableRunnable<Exception> scanner) {
public ScanOperation(
String nameKey, boolean disabled, boolean defaultSelected, FailableRunnable<Exception> scanner) {
this.nameKey = nameKey;
this.disabled = disabled;
this.defaultSelected = defaultSelected;

View file

@ -100,7 +100,8 @@ public class DataStoreChoiceComp<T extends DataStore> extends SimpleComp {
if (!applicable.test(s.getWrapper())) {
comp.disable(new SimpleBooleanProperty(true));
}
}, false);
},
false);
var category = new DataStoreCategoryChoiceComp(
initialCategory != null ? initialCategory.getRoot() : null,
StoreViewState.get().getActiveCategory(),

View file

@ -60,8 +60,8 @@ public class AppPrefs {
map(new SimpleBooleanProperty(false), "disableCertutilUse", Boolean.class);
public final BooleanProperty useLocalFallbackShell =
map(new SimpleBooleanProperty(false), "useLocalFallbackShell", Boolean.class);
public final BooleanProperty disableTerminalRemotePasswordPreparation =
mapVaultSpecific(new SimpleBooleanProperty(false), "disableTerminalRemotePasswordPreparation", Boolean.class);
public final BooleanProperty disableTerminalRemotePasswordPreparation = mapVaultSpecific(
new SimpleBooleanProperty(false), "disableTerminalRemotePasswordPreparation", Boolean.class);
public final Property<Boolean> alwaysConfirmElevation =
mapVaultSpecific(new SimpleObjectProperty<>(false), "alwaysConfirmElevation", Boolean.class);
public final BooleanProperty dontCachePasswords =
@ -95,7 +95,6 @@ public class AppPrefs {
map(new SimpleBooleanProperty(true), "openConnectionSearchWindowOnConnectionCreation", Boolean.class);
final ObjectProperty<Path> storageDirectory =
map(new SimpleObjectProperty<>(DEFAULT_STORAGE_DIR), "storageDirectory", Path.class);
private AppPrefsStorageHandler vaultStorageHandler;
final BooleanProperty developerMode = map(new SimpleBooleanProperty(false), "developerMode", Boolean.class);
final BooleanProperty developerDisableUpdateVersionCheck =
map(new SimpleBooleanProperty(false), "developerDisableUpdateVersionCheck", Boolean.class);
@ -107,30 +106,24 @@ public class AppPrefs {
bindDeveloperTrue(developerDisableGuiRestrictions);
private final ObjectProperty<SupportedLocale> language =
map(new SimpleObjectProperty<>(SupportedLocale.ENGLISH), "language", SupportedLocale.class);
@Getter
private final Property<InPlaceSecretValue> lockPassword = new SimpleObjectProperty<>();
@Getter
private final StringProperty lockCrypt =
mapVaultSpecific(new SimpleStringProperty(), "workspaceLock", String.class);
private final IntegerProperty editorReloadTimeout =
map(new SimpleIntegerProperty(1000), "editorReloadTimeout", Integer.class);
private final BooleanProperty confirmDeletions =
map(new SimpleBooleanProperty(true), "confirmDeletions", Boolean.class);
@Getter
private final List<AppPrefsCategory> categories;
private final AppPrefsStorageHandler globalStorageHandler = new AppPrefsStorageHandler(
AppProperties.get().getDataDir().resolve("settings").resolve("preferences.json"));
private final Map<Mapping<?>, Comp<?>> customEntries = new LinkedHashMap<>();
@Getter
private final Property<AppPrefsCategory> selectedCategory;
private final PrefsHandler extensionHandler = new PrefsHandlerImpl();
private AppPrefsStorageHandler vaultStorageHandler;
private AppPrefs() {
this.categories = List.of(
@ -159,7 +152,8 @@ public class AppPrefs {
PrefsProvider.getAll().forEach(prov -> prov.addPrefs(INSTANCE.extensionHandler));
INSTANCE.loadLocal();
INSTANCE.fixInvalidLocalValues();
INSTANCE.vaultStorageHandler = new AppPrefsStorageHandler(INSTANCE.storageDirectory().getValue().resolve("preferences.json"));
INSTANCE.vaultStorageHandler = new AppPrefsStorageHandler(
INSTANCE.storageDirectory().getValue().resolve("preferences.json"));
}
public static void initSharedRemote() {
@ -474,7 +468,8 @@ public class AppPrefs {
public void save() {
for (Mapping<?> m : mapping) {
AppPrefsStorageHandler handler = m.isVaultSpecific() ? vaultStorageHandler : globalStorageHandler;
// It might be possible that we save while the vault handler is not initialized yet / has no file or directory
// It might be possible that we save while the vault handler is not initialized yet / has no file or
// directory
if (!handler.isInitialized()) {
continue;
}

View file

@ -59,7 +59,10 @@ public class AppPrefsStorageHandler {
public <T> T loadObject(String id, Class<T> type, T defaultObject) {
var tree = getContent(id);
if (tree == null) {
TrackEvent.withDebug("Preferences value not found").tag("id", id).tag("default", defaultObject).handle();
TrackEvent.withDebug("Preferences value not found")
.tag("id", id)
.tag("default", defaultObject)
.handle();
return defaultObject;
}

View file

@ -196,8 +196,12 @@ public interface ExternalTerminalType extends PrefsChoiceValue {
@Override
protected void execute(Path file, LaunchConfiguration configuration) throws Exception {
// Tabby has a very weird handling of output, even detaching with start does not prevent it from printing
LocalShell.getShell().executeSimpleCommand(
CommandBuilder.of().addFile(file.toString()).add("run").addFile(configuration.getScriptFile()).discardOutput());
LocalShell.getShell()
.executeSimpleCommand(CommandBuilder.of()
.addFile(file.toString())
.add("run")
.addFile(configuration.getScriptFile())
.discardOutput());
}
@Override

View file

@ -421,8 +421,11 @@ public abstract class DataStorage {
// pair.getKey().setStoreInternal(pair.getValue().getStore(), false);
// Update state by merging
if (pair.getKey().getStorePersistentState() != null && pair.getValue().get().getStorePersistentState() != null) {
var classMatch = pair.getKey().getStorePersistentState().getClass()
if (pair.getKey().getStorePersistentState() != null
&& pair.getValue().get().getStorePersistentState() != null) {
var classMatch = pair.getKey()
.getStorePersistentState()
.getClass()
.equals(pair.getValue().get().getStorePersistentState().getClass());
// Children classes might not be the same, the same goes for state classes
// This can happen when there are multiple child classes and the ids got switched around

View file

@ -171,7 +171,11 @@ public class StandardStorage extends DataStorage {
local.deleteFromDisk();
hasFixedLocal = false;
} catch (IOException ex) {
ErrorEvent.fromThrowable(ex).terminal(true).expected().build().handle();
ErrorEvent.fromThrowable(ex)
.terminal(true)
.expected()
.build()
.handle();
}
}
}

View file

@ -127,7 +127,9 @@ public class AppDownloads {
// If we are currently running a prerelease, always return this as the suitable release!
if (preIncluding.isPresent()
&& preIncluding.get().isPrerelease()
&& AppProperties.get().getVersion().equals(preIncluding.get().getTagName())) {
&& AppProperties.get()
.getVersion()
.equals(preIncluding.get().getTagName())) {
return preIncluding;
}

View file

@ -66,19 +66,28 @@ public class AppInstaller {
@Override
public void installLocal(String file) throws Exception {
var shellProcessControl = new LocalStore().control().start();
var exec = (AppProperties.get().isDevelopmentEnvironment() ? Path.of(XPipeInstallation.getLocalDefaultInstallationBasePath()) :
XPipeInstallation.getCurrentInstallationBasePath())
.resolve(XPipeInstallation.getDaemonExecutablePath(OsType.getLocal())).toString();
var exec = (AppProperties.get().isDevelopmentEnvironment()
? Path.of(XPipeInstallation.getLocalDefaultInstallationBasePath())
: XPipeInstallation.getCurrentInstallationBasePath())
.resolve(XPipeInstallation.getDaemonExecutablePath(OsType.getLocal()))
.toString();
var logsDir = FileNames.join(XPipeInstallation.getDataDir().toString(), "logs");
var logFile = FileNames.join(logsDir, "installer_" + FileNames.getFileName(file) + ".log");
var command = LocalShell.getShell().getShellDialect().equals(ShellDialects.CMD) ?
getCmdCommand(file, logFile, exec) : getPowershellCommand(file, logFile, exec);
var toRun = LocalShell.getShell().getShellDialect().equals(ShellDialects.CMD) ?
"start \"XPipe Updater\" /min cmd /c \"" + ScriptHelper.createLocalExecScript(command) + "\"" :
"Start-Process -WindowStyle Minimized -FilePath powershell -ArgumentList \"-ExecutionPolicy\", \"Bypass\", \"-File\", \"`\"" + ScriptHelper.createLocalExecScript(command) + "`\"\"";
var command = LocalShell.getShell().getShellDialect().equals(ShellDialects.CMD)
? getCmdCommand(file, logFile, exec)
: getPowershellCommand(file, logFile, exec);
var toRun = LocalShell.getShell().getShellDialect().equals(ShellDialects.CMD)
? "start \"XPipe Updater\" /min cmd /c \"" + ScriptHelper.createLocalExecScript(command) + "\""
: "Start-Process -WindowStyle Minimized -FilePath powershell -ArgumentList \"-ExecutionPolicy\", \"Bypass\", \"-File\", \"`\""
+ ScriptHelper.createLocalExecScript(command) + "`\"\"";
shellProcessControl.executeSimpleCommand(toRun);
}
@Override
public String getExtension() {
return ".msi";
}
private String getCmdCommand(String file, String logFile, String exec) {
return String.format(
"""
@ -106,11 +115,6 @@ public class AppInstaller {
""",
file, file, logFile, file, logFile, exec, exec);
}
@Override
public String getExtension() {
return ".msi";
}
}
@JsonTypeName("debian")
@ -119,7 +123,8 @@ public class AppInstaller {
@Override
public void installLocal(String file) throws Exception {
var name = AppProperties.get().isStaging() ? "xpipe-ptb" : "xpipe";
var command = String.format("""
var command = String.format(
"""
function exec {
echo "+ sudo apt install \\"%s\\""
DEBIAN_FRONTEND=noninteractive sudo apt-get install -qy "%s" || return 1
@ -128,7 +133,8 @@ public class AppInstaller {
cd ~
exec || read -rsp "Update failed ..."$'\\n' -n 1 key
""", file, file, name);
""",
file, file, name);
TerminalLauncher.openDirect("XPipe Updater", LocalShell.getShell(), command);
}
@ -143,7 +149,8 @@ public class AppInstaller {
@Override
public void installLocal(String file) throws Exception {
var name = AppProperties.get().isStaging() ? "xpipe-ptb" : "xpipe";
var command = String.format("""
var command = String.format(
"""
function exec {
echo "+ sudo rpm -U -v --force \\"%s\\""
sudo rpm -U -v --force "%s" || return 1
@ -152,7 +159,8 @@ public class AppInstaller {
cd ~
exec || read -rsp "Update failed ..."$'\\n' -n 1 key
""", file, file, name);
""",
file, file, name);
TerminalLauncher.openDirect("XPipe Updater", LocalShell.getShell(), command);
}
@ -167,7 +175,8 @@ public class AppInstaller {
@Override
public void installLocal(String file) throws Exception {
var name = AppProperties.get().isStaging() ? "xpipe-ptb" : "xpipe";
var command = String.format("""
var command = String.format(
"""
function exec {
echo "+ sudo installer -verboseR -allowUntrusted -pkg \\"%s\\" -target /"
sudo installer -verboseR -allowUntrusted -pkg "%s" -target / || return 1
@ -176,7 +185,8 @@ public class AppInstaller {
cd ~
exec || echo "Update failed ..." && read -rs -k 1 key
""", file, file, name);
""",
file, file, name);
TerminalLauncher.openDirect("XPipe Updater", LocalShell.getShell(), command);
}

View file

@ -70,8 +70,8 @@ public class ApplicationHelper {
ShellControl processControl, String executable, String displayName, DataStoreEntry connection)
throws Exception {
if (!isInPath(processControl, executable)) {
throw ErrorEvent.expected(new IOException(displayName + " executable " + executable
+ " not found in PATH" + (connection != null ? " on system " + connection.getName() : "")));
throw ErrorEvent.expected(new IOException(displayName + " executable " + executable + " not found in PATH"
+ (connection != null ? " on system " + connection.getName() : "")));
}
}

View file

@ -20,8 +20,11 @@ public class DataStoreFormatter {
return null;
}
if (s.getShellDialect() != null && !s.getShellDialect().getDumbMode().supportsAnyPossibleInteraction()) {
return s.getOsName() != null ? s.getOsName() : s.getShellDialect().getDisplayName();
if (s.getShellDialect() != null
&& !s.getShellDialect().getDumbMode().supportsAnyPossibleInteraction()) {
return s.getOsName() != null
? s.getOsName()
: s.getShellDialect().getDisplayName();
}
return s.isRunning() ? s.getOsName() : "Connection failed";

View file

@ -72,7 +72,8 @@ public class FileOpener {
editor.launch(Path.of(localFile).toRealPath());
} catch (Exception e) {
ErrorEvent.fromThrowable(e)
.description("Unable to launch editor " + editor.toTranslatedString().getValue()
.description("Unable to launch editor "
+ editor.toTranslatedString().getValue()
+ ".\nMaybe try to use a different editor in the settings.")
.expected()
.handle();

View file

@ -65,7 +65,8 @@ public class ScanAlert {
}
private static void show(
DataStoreEntry initialStore, BiFunction<DataStoreEntry, ShellControl,List<ScanProvider.ScanOperation>> applicable) {
DataStoreEntry initialStore,
BiFunction<DataStoreEntry, ShellControl, List<ScanProvider.ScanOperation>> applicable) {
DialogComp.showWindow(
"scanAlertTitle",
stage -> new Dialog(stage, initialStore != null ? initialStore.ref() : null, applicable));
@ -110,13 +111,14 @@ public class ScanAlert {
});
BooleanScope.execute(busy, () -> {
shellControl.start();
entry.get().get().setExpanded(true);
var copy = new ArrayList<>(selected);
for (var a : copy) {
// If the user decided to remove the selected entry
// while the scan is running, just return instantly
if (!DataStorage.get().getStoreEntriesSet().contains(entry.get().get())) {
if (!DataStorage.get()
.getStoreEntriesSet()
.contains(entry.get().get())) {
return;
}
@ -200,7 +202,10 @@ public class ScanAlert {
}
var suffix = LicenseProvider.get().getFeature(s.getLicensedFeatureId());
return n + suffix.getDescriptionSuffix().map(d -> " (" + d + ")").orElse("");
return n
+ suffix.getDescriptionSuffix()
.map(d -> " (" + d + ")")
.orElse("");
};
var r = new ListSelectorComp<>(
a,

View file

@ -116,7 +116,8 @@ public class SecretQueryProgress {
private boolean shouldCache(SecretQuery query, String prompt) {
var shouldCache = query.cache()
&& SecretManager.shouldCacheForPrompt(prompt)
&& (!query.respectDontCacheSetting() || !AppPrefs.get().dontCachePasswords().get());
&& (!query.respectDontCacheSetting()
|| !AppPrefs.get().dontCachePasswords().get());
return shouldCache;
}
}

View file

@ -45,9 +45,11 @@ public class ShellTemp {
// Always delete legacy directory and do not care whether it partially fails
// This system xpipe temp directory might contain other files on the local machine, so only clear the exec
d.deleteFileOrDirectory(proc, FileNames.join(systemTemp, "xpipe", "exec")).executeAndCheck();
d.deleteFileOrDirectory(proc, FileNames.join(systemTemp, "xpipe", "exec"))
.executeAndCheck();
d.deleteFileOrDirectory(proc, FileNames.join(home, ".xpipe", "temp")).executeAndCheck();
d.deleteFileOrDirectory(proc, FileNames.join(home, ".xpipe", "system_id")).executeAndCheck();
d.deleteFileOrDirectory(proc, FileNames.join(home, ".xpipe", "system_id"))
.executeAndCheck();
}
private static boolean checkDirectoryPermissions(ShellControl proc, String dir) throws Exception {

View file

@ -227,7 +227,9 @@
-fx-background-color: -color-neutral-muted;
}
.browser .tab-content-area { -fx-padding: 0; }
.browser .tab-content-area {
-fx-padding: 0;
}
.browser .singular {
-fx-tab-max-height: 0;

View file

@ -19,7 +19,6 @@
}
.root:pretty:dark .color-box.gray {
-fx-background-color: linear-gradient(from 100% 0% to 0% 100%, derive(-color-bg-default, 13%) 40%, derive(-color-bg-default, 11%) 50%, derive(-color-bg-default, 14%) 100%);
-fx-border-color: -color-border-default;
@ -45,7 +44,6 @@
}
.root:pretty:light .color-box.blue {
-fx-background-color: linear-gradient(from 100% 0% to 0% 100%, rgb(130, 130, 250, 0.2) 40%, rgb(57, 57, 200, 0.2) 50%, rgb(137, 137, 250, 0.2) 100%);
-fx-border-color: rgba(80, 100, 150, 0.3);
@ -75,7 +73,6 @@
}
.root:pretty:light .color-box.red {
-fx-background-color: linear-gradient(from 100% 0% to 0% 100%, rgb(220, 100, 100, 0.15) 40%, rgb(205, 50, 50, 0.15) 50%, rgb(200, 90, 90, 0.15) 100%);
-fx-border-color: rgba(150, 100, 80, 0.4);
@ -105,7 +102,6 @@
}
.root:pretty:light .color-box.yellow {
-fx-background-color: linear-gradient(from 100% 0% to 0% 100%, rgb(180, 180, 30, 0.2) 40%, rgb(135, 135, 27, 0.2) 50%, rgb(200, 200, 37, 0.2) 100%);
-fx-border-color: rgba(170, 170, 80, 0.3);
@ -135,7 +131,6 @@
}
.root:pretty:light .color-box.green {
-fx-background-color: linear-gradient(from 100% 0% to 0% 100%, rgb(30, 180, 30, 0.1) 40%, rgb(20, 120, 20, 0.15) 50%, rgb(37, 200, 37, 0.1) 100%);
-fx-border-color: rgba(100, 150, 80, 0.2);

View file

@ -18,12 +18,15 @@
.store-entry-grid:incomplete .name {
-fx-text-fill: #ee4829;
}
.store-entry-grid:incomplete .summary {
-fx-text-fill: #ee4829;
}
.store-entry-grid:incomplete .information {
-fx-text-fill: #ee4829;
}
.store-entry-grid:incomplete .icon {
-fx-opacity: 0.5;
}

View file

@ -5,6 +5,7 @@
.third-party-dependency-list-comp .titled-pane {
-fx-background-color: transparent;
}
.titled-pane .content {
-fx-padding: 0em;
}

View file

@ -11,7 +11,8 @@ public class BeaconDaemonExtensionTest {
@BeforeAll
public static void setup() throws Exception {
JacksonMapper.initModularized(ModuleLayer.boot());
BeaconDaemonController.start(OsType.getLocal().equals(OsType.WINDOWS) ? XPipeDaemonMode.TRAY : XPipeDaemonMode.BACKGROUND);
BeaconDaemonController.start(
OsType.getLocal().equals(OsType.WINDOWS) ? XPipeDaemonMode.TRAY : XPipeDaemonMode.BACKGROUND);
}
@AfterAll

View file

@ -27,7 +27,8 @@ public class ConnectionFileSystem implements FileSystem {
@Override
public long getFileSize(String file) throws Exception {
return Long.parseLong(shellControl.getShellDialect().queryFileSize(shellControl, file).readStdoutOrThrow());
return Long.parseLong(
shellControl.getShellDialect().queryFileSize(shellControl, file).readStdoutOrThrow());
}
@Override

View file

@ -12,16 +12,6 @@ import java.util.List;
public class DeleteLinkAction implements LeafAction {
@Override
public boolean automaticallyResolveLinks() {
return false;
}
@Override
public boolean isApplicable(OpenFileSystemModel model, List<BrowserEntry> entries) {
return entries.stream().allMatch(browserEntry -> browserEntry.getRawFileEntry().getKind() == FileKind.LINK);
}
@Override
public void execute(OpenFileSystemModel model, List<BrowserEntry> entries) throws Exception {
var toDelete = entries.stream().map(entry -> entry.getRawFileEntry()).toList();
@ -43,4 +33,15 @@ public class DeleteLinkAction implements LeafAction {
public String getName(OpenFileSystemModel model, List<BrowserEntry> entries) {
return "Delete link";
}
@Override
public boolean isApplicable(OpenFileSystemModel model, List<BrowserEntry> entries) {
return entries.stream()
.allMatch(browserEntry -> browserEntry.getRawFileEntry().getKind() == FileKind.LINK);
}
@Override
public boolean automaticallyResolveLinks() {
return false;
}
}

View file

@ -114,7 +114,9 @@ public abstract class ScriptStore extends JacksonizedValue implements DataStore,
.mapToInt(value ->
value.get().getName().hashCode() + value.getStore().hashCode())
.sum();
var targetDir = FileNames.join(ShellTemp.getUserSpecificTempDataDirectory(proc,"scripts"), proc.getShellDialect().getId());
var targetDir = FileNames.join(
ShellTemp.getUserSpecificTempDataDirectory(proc, "scripts"),
proc.getShellDialect().getId());
var hashFile = FileNames.join(targetDir, "hash");
var d = proc.getShellDialect();
if (d.createFileExistsCommand(proc, hashFile).executeAndCheck()) {