Armin Schrenk před 2 měsíci
rodič
revize
59d60739c8

+ 1 - 1
src/main/java/org/cryptomator/ui/decryptname/DecryptFileNamesViewController.java

@@ -212,7 +212,7 @@ public class DecryptFileNamesViewController implements FxController {
 		mapping.clear();
 	}
 
-	public void copyMappingToClipboard() {
+	public void copyTableToClipboard() {
 		var csv = mapping.stream().map(cipherAndClear -> "\"" + cipherAndClear.ciphertext() + "\", \"" + cipherAndClear.cleartextName() + "\"").collect(Collectors.joining("\n"));
 		Clipboard.getSystemClipboard().setContent(Map.of(DataFormat.PLAIN_TEXT, csv));
 	}

+ 0 - 55
src/main/java/org/cryptomator/ui/mainwindow/VaultDetailUnlockedController.java

@@ -242,14 +242,6 @@ public class VaultDetailUnlockedController implements FxController {
 		vaultStats.getUnchecked(vault.get()).showVaultStatisticsWindow();
 	}
 
-	record CipherToCleartext(String ciphertext, String cleartext) {
-
-		@Override
-		public String toString() {
-			return ciphertext + " > " + cleartext;
-		}
-	}
-
 	/* Getter/Setter */
 
 	public ReadOnlyObjectProperty<Vault> vaultProperty() {
@@ -292,52 +284,5 @@ public class VaultDetailUnlockedController implements FxController {
 		return ciphertextPathsCopied.get();
 	}
 
-	//new stuff
-
-
-	/*
-	@Nullable
-	private CipherToCleartext getCleartextName(Path ciphertextNode) {
-		try {
-			return new CipherToCleartext(ciphertextNode.getFileName().toString(), vault.get().getCleartextName(ciphertextNode));
-		} catch (IOException e) {
-			LOG.warn("Failed to decrypt filename for {}", ciphertextNode, e);
-			return null;
-		}
-	}
-
-	private ListCell<Path> createListCell(ListView<Path> pathListView) {
-		return new ListCell<Path>() {
-			private final HBox root;
-			private final FontAwesome5IconView icon;
-			private final Label encryptedName;
-
-			{
-				setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
-				encryptedName = new Label();
-				icon = new FontAwesome5IconView();
-				root = new HBox(icon, encryptedName);
-				root.setSpacing(6.0);
-				root.setPadding(new Insets(6));
-			}
-
-			@Override
-			protected void updateItem(Path item, boolean empty) {
-				super.updateItem(item, empty);
-
-				if (item == null || empty) {
-					setGraphic(null);
-				} else {
-					encryptedName.setText(item.toString());
-					icon.setGlyph(FontAwesome5Icon.LOCK);
-					setGraphic(root);
-					getStyleClass().add("test-list-cell");
-				}
-			}
-		};
-	}
-
-	 */
-
 }
 

+ 1 - 1
src/main/resources/fxml/decryptnames.fxml

@@ -23,7 +23,7 @@
 			<Insets left="6" />
 		</padding>
 		<Region HBox.hgrow="ALWAYS"/>
-		<Button styleClass="button-right" contentDisplay="GRAPHIC_ONLY" onAction="#copyMappingToClipboard"> <!-- TODO: rename method -->
+		<Button styleClass="button-right" contentDisplay="GRAPHIC_ONLY" onAction="#copyTableToClipboard">
 			<graphic>
 				<FontAwesome5IconView glyph="CLIPBOARD" glyphSize="16"/>
 			</graphic>