mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-05-03 19:30:31 +00:00
Small fixes
This commit is contained in:
@@ -102,7 +102,7 @@ public class ErrorHandlerComp extends SimpleComp {
|
||||
descriptionField.setEditable(false);
|
||||
descriptionField.setPadding(Insets.EMPTY);
|
||||
descriptionField.getStyleClass().add("description");
|
||||
AppFontSizes.xs(descriptionField);
|
||||
AppFontSizes.sm(descriptionField);
|
||||
var text = new VBox(descriptionField);
|
||||
text.setFillWidth(true);
|
||||
text.setSpacing(8);
|
||||
|
||||
@@ -13,6 +13,8 @@ import io.xpipe.core.JacksonMapper;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
|
||||
import java.nio.file.Files;
|
||||
|
||||
@JsonTypeName("bitwarden")
|
||||
public class BitwardenPasswordManager implements PasswordManager {
|
||||
|
||||
@@ -46,7 +48,8 @@ public class BitwardenPasswordManager implements PasswordManager {
|
||||
var sc = getOrStartShell();
|
||||
var command = sc.command(CommandBuilder.of().add("bw", "get", "item", "xpipe-test", "--nointeraction"));
|
||||
var r = command.readStdoutAndStderr();
|
||||
if (r[1].contains("You are not logged in")) {
|
||||
// Check for data file as bw seemingly breaks if it doesn't exist yet
|
||||
if (!Files.exists(AppCache.getBasePath().resolve("data.json")) || r[1].contains("You are not logged in")) {
|
||||
var script = ShellScript.lines(
|
||||
LocalShell.getDialect()
|
||||
.getSetEnvironmentVariableCommand(
|
||||
|
||||
@@ -105,10 +105,10 @@ public class DesktopHelper {
|
||||
|
||||
ThreadHelper.runAsync(() -> {
|
||||
var xdg = OsType.getLocal() == OsType.LINUX;
|
||||
if (Desktop.getDesktop().isSupported(Desktop.Action.OPEN)
|
||||
if (Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)
|
||||
&& AppDistributionType.get() != AppDistributionType.WEBTOP) {
|
||||
try {
|
||||
Desktop.getDesktop().open(file.toFile());
|
||||
Desktop.getDesktop().browse(file.toFile().toURI());
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
ErrorEventFactory.fromThrowable(e).expected().omitted(xdg).handle();
|
||||
|
||||
Reference in New Issue
Block a user