From 1611ed2743f19b042ffdbecce0ad4b5c6c8f632f Mon Sep 17 00:00:00 2001 From: crschnick Date: Thu, 20 Jun 2024 01:23:57 +0000 Subject: [PATCH] Small fixes --- CONTRIBUTING.md | 19 ++++++++++--------- .../io/xpipe/app/issue/ErrorHandlerComp.java | 1 + .../app/resources/style/sidebar-comp.css | 8 -------- .../io/xpipe/app/resources/style/style.css | 4 ++-- .../io/xpipe/core/process/ProcessControl.java | 2 +- 5 files changed, 14 insertions(+), 20 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7021bff4..c609ab2b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,7 +25,7 @@ components from it when it is run in a development environment. Note that in case the current master branch is ahead of the latest release, it might happen that there are some incompatibilities when loading data from your local XPipe installation. You should therefore always check out the matching version tag for your local repository and local XPipe installation. You can find the available version tags at https://github.com/xpipe-io/xpipe/tags. -So for example if you currently have XPipe `9.0` installed, you should run `git reset --hard 9.0` first to properly compile against it. +So for example if you currently have XPipe `10.0` installed, you should run `git reset --hard 10.0` first to properly compile against it. You need to have JDK for Java 21 installed to compile the project. If you are on Linux or macOS, you can easily accomplish that by running @@ -72,6 +72,11 @@ is selected both for the project and for gradle itself. Especially when starting out, it might be a good idea to start with easy tasks first. Here's a selection of suitable common tasks that are very easy to implement: +### Interacting via the HTTP API + +You can create clients they communicate with the XPipe daemon via its HTTP API. +To get started, see the [OpenAPI spec](/openapi.yaml). + ### Implementing support for a new editor All code for handling external editors can be found [here](https://github.com/xpipe-io/xpipe/blob/master/app/src/main/java/io/xpipe/app/prefs/ExternalEditorType.java). There you will find plenty of working examples that you can use as a base for your own implementation. @@ -80,12 +85,6 @@ All code for handling external editors can be found [here](https://github.com/xp All code for handling external terminals can be found [here](https://github.com/xpipe-io/xpipe/blob/master/app/src/main/java/io/xpipe/app/terminal/). There you will find plenty of working examples that you can use as a base for your own implementation. -### Adding more file icons for specific types - -You can register file types [here](https://github.com/xpipe-io/xpipe/blob/master/app/src/main/resources/io/xpipe/app/resources/file_list.txt) and add the respective icons [here](https://github.com/xpipe-io/xpipe/tree/master/app/src/main/resources/io/xpipe/app/resources/browser_icons). - -The existing file list and icons are taken from the [vscode-icons](https://github.com/vscode-icons/vscode-icons) project. Due to limitations in the file definition list compatibility, some file types might not be listed by their proper extension and are therefore not being applied correctly even though the images and definitions exist already. - ### Adding more context menu actions in the file browser In case you want to implement your own actions for certain file types in the file browser, you can easily do so. You can find most existing actions [here](https://github.com/xpipe-io/xpipe/tree/master/ext/base/src/main/java/io/xpipe/ext/base/browser) to get some inspiration. @@ -99,9 +98,11 @@ All actions that you can perform for certain connections in the connection overv You can add custom script definitions [here](https://github.com/xpipe-io/xpipe/tree/master/ext/base/src/main/java/io/xpipe/ext/base/script/PredefinedScriptStore.java) and [here](https://github.com/xpipe-io/xpipe/tree/master/ext/base/src/main/resources/io/xpipe/ext/base/resources/scripts). -### Familiarising yourself with the shell and command API +### Adding more file icons for specific types -The [sample action](https://github.com/xpipe-io/xpipe/blob/master/ext/base/src/main/java/io/xpipe/ext/base/action/SampleAction.java) shows the basics of working with shells and executing commands in them. For more references, just look for the usages of the [API classes](https://github.com/xpipe-io/xpipe/tree/master/core/src/main/java/io/xpipe/core/process). +You can register file types [here](https://github.com/xpipe-io/xpipe/blob/master/app/src/main/resources/io/xpipe/app/resources/file_list.txt) and add the respective icons [here](https://github.com/xpipe-io/xpipe/tree/master/app/src/main/resources/io/xpipe/app/resources/browser_icons). + +The existing file list and icons are taken from the [vscode-icons](https://github.com/vscode-icons/vscode-icons) project. Due to limitations in the file definition list compatibility, some file types might not be listed by their proper extension and are therefore not being applied correctly even though the images and definitions exist already. ### Implementing something else diff --git a/app/src/main/java/io/xpipe/app/issue/ErrorHandlerComp.java b/app/src/main/java/io/xpipe/app/issue/ErrorHandlerComp.java index 967f0788..9f5caae2 100644 --- a/app/src/main/java/io/xpipe/app/issue/ErrorHandlerComp.java +++ b/app/src/main/java/io/xpipe/app/issue/ErrorHandlerComp.java @@ -271,6 +271,7 @@ public class ErrorHandlerComp extends SimpleComp { var layout = new BorderPane(); layout.setCenter(content); layout.getStyleClass().add("error-handler-comp"); + layout.getStyleClass().add("background"); if (event.getThrowable() != null) { content.getChildren().add(new Separator(Orientation.HORIZONTAL)); diff --git a/app/src/main/resources/io/xpipe/app/resources/style/sidebar-comp.css b/app/src/main/resources/io/xpipe/app/resources/style/sidebar-comp.css index 37a0487f..31744417 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/sidebar-comp.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/sidebar-comp.css @@ -29,14 +29,6 @@ -fx-opacity: 1.0; } -.root .sidebar-comp .icon-button-comp:hover, .root:key-navigation .sidebar-comp .icon-button-comp:focused { - -fx-background-color: -color-neutral-muted; -} - -.root .sidebar-comp .icon-button-comp:selected { - -fx-background-color: -color-neutral-muted; -} - .sidebar-comp .icon-button-comp { -fx-padding: 1em; } diff --git a/app/src/main/resources/io/xpipe/app/resources/style/style.css b/app/src/main/resources/io/xpipe/app/resources/style/style.css index 03a1ae31..f9620ee7 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/style.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/style.css @@ -17,7 +17,7 @@ -fx-background-color: derive(-color-bg-default, -9%); } -.root:seamless-frame .layout > .background { +.root:seamless-frame.layout > .background { -fx-background-insets: 5 0 0 0; -fx-border-insets: 5 0 0 0; -fx-background-radius: 0 10 0 0; @@ -27,7 +27,7 @@ -fx-padding: 0 2 0 0; } -.root:seamless-frame .layout > .background > * { +.root:seamless-frame.layout > .background > * { -fx-background-radius: 0 10 0 0; -fx-border-radius: 0 10 0 0; } diff --git a/core/src/main/java/io/xpipe/core/process/ProcessControl.java b/core/src/main/java/io/xpipe/core/process/ProcessControl.java index 4db507a4..c8a054d8 100644 --- a/core/src/main/java/io/xpipe/core/process/ProcessControl.java +++ b/core/src/main/java/io/xpipe/core/process/ProcessControl.java @@ -12,7 +12,7 @@ public interface ProcessControl extends AutoCloseable { ProcessControl withExceptionConverter(ExceptionConverter converter); - void resetData(boolean cache); + void resetData(); String prepareTerminalOpen(TerminalInitScriptConfig config, WorkingDirectoryFunction workingDirectory) throws Exception;