Show copy id action when api is enabled

This commit is contained in:
crschnick 2024-09-11 22:31:45 +00:00
parent c38962ef2e
commit ba9ead724f

View file

@ -330,7 +330,9 @@ public abstract class StoreEntryComp extends SimpleComp {
browse.setOnAction(event -> browse.setOnAction(event ->
DesktopHelper.browsePathLocal(getWrapper().getEntry().getDirectory())); DesktopHelper.browsePathLocal(getWrapper().getEntry().getDirectory()));
contextMenu.getItems().add(browse); contextMenu.getItems().add(browse);
}
if (AppPrefs.get().enableHttpApi().get()) {
var copyId = new MenuItem(AppI18n.get("copyId"), new FontIcon("mdi2c-content-copy")); var copyId = new MenuItem(AppI18n.get("copyId"), new FontIcon("mdi2c-content-copy"));
copyId.setOnAction(event -> copyId.setOnAction(event ->
ClipboardHelper.copyText(getWrapper().getEntry().getUuid().toString())); ClipboardHelper.copyText(getWrapper().getEntry().getUuid().toString()));