Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ public String getActionName() {
return "AuthCreateIdentity";
} else if (action == RadAuthAction.UNLOCKED_IDENTITY) {
return "AuthUnlockedIdentity";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ha

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installation

}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

} else if (action == RadAuthAction.UNLOCKED_IDENTITY) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

return "AuthUnlockedIdentity";
}
return "";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gg

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,33 @@
import java.util.ArrayList;
import java.util.List;

public class RadRemote extends RadAction {
public RadRemote(GitRepository repo) {
public class RadRemote12 extends RadAction {
public RadRemote12(GitRepository repo) {
super(repo);
}




@Override
public String getActionName() {
return "Remote";
return "test";
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change this


@Override
public ProcessOutput run() {
var rad = repo.getProject().getService(RadicleProjectService.class);
return rad.remoteList(repo);
}















public List<Peer> findTrackedPeers() {
var out = this.perform();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change

Expand All @@ -36,5 +48,11 @@ public List<Peer> findTrackedPeers() {
return peers;
}

@Override
public ProcessOutput run() {
var rad = repo.getProject().getService(RadicleProjectService.class);
return rad.remoteList(repo);
}

public record Peer(String name, String id) { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,14 @@ private boolean isRadHomeValidPath(String radPath, String radHome) {
private void unlockOrCreateIdentity() {
msgLabel.setText("");
ApplicationManager.getApplication().executeOnPooledThread(() -> {
var radHome = getPathFromTextField(radHomeField);
var radHome = getPathFromTextField(radHomeField);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete spaces

var radPath = getPathFromTextField(radPathField);
var radSelf = new RadSelf(radHome, radPath, myProject);
var radSelf = new RadSelf(radHome, radPath, myProject);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete spaces

var output = radSelf.perform();
var lines = output.getStdoutLines(true);
radDetails = new RadDetails(lines);
var rad = myProject.getService(RadicleProjectService.class);
var isIdentityUnlocked = rad.isIdentityUnlocked(radDetails.keyHash);
var isIdentityUnlocked = rad.isIdentityUnlocked(radDetails.keyHash);
/* If radSelf executed with exit code 0 then we have an identity !! */
var success = RadAction.isSuccess(output);
ApplicationManager.getApplication().invokeLater(() -> {
Expand All @@ -147,7 +147,7 @@ private void unlockOrCreateIdentity() {
return;
}
/* if there is no identity or unlocked identity show passphrase dialog */
var title = !success ? RadicleBundle.message("newIdentity") :
var title = !success ? RadicleBundle.message("newIdentity") :
RadicleBundle.message("unlockIdentity");
var dialog = this.identityDialog == null ? new IdentityDialog() : this.identityDialog;
dialog.setTitle(title);
Expand Down