Closed hexagon6 closed 6 years ago
More info from the log output:
[18:31:47:0295] [info] [IPFSSync] setState { files:
[ { path: '/home/me/Partyshare/fix.jpg',
hash: 'QmaL7yjgTuRqp59ELEfZDdFHwFEpkMBeHf4b56mGeNCzCd',
size: NaN,
urlPath: 'QmeDGcJ7tJK5Pps3MRWUDgUKJpvxRJQHuqgM3nC6occYwd/fix.jpg',
name: 'fix.jpg' } ],
synced: true }
Notice: I've patched package.json with the following, since #38 prevented me from installing:
- "ipfs-api": "git://github.com/bhstahl/js-ipfs-api.git#add-with-querystrings",
- "ipfsd-ctl": "git://github.com/bhstahl/js-ipfsd-ctl.git#add-with-querystrings",
+ "ipfs-api": "git://github.com/bhstahl/js-ipfs-api.git#master",
+ "ipfsd-ctl": "git://github.com/bhstahl/js-ipfsd-ctl.git#master",
Since the resource is available on ipfs https://gateway.ipfs.io/ipfs/QmeDGcJ7tJK5Pps3MRWUDgUKJpvxRJQHuqgM3nC6occYwd/fix.jpg I assume clipboard.writeText(url, 'selection');
does not work on my machine. Investigating further
Found the bug (or feature :laughing: ):
diff --git a/src/ui/components/FileListItem/index.jsx b/src/ui/components/FileListItem/index.jsx
index d2fc176..a4643e5 100644
--- a/src/ui/components/FileListItem/index.jsx
+++ b/src/ui/components/FileListItem/index.jsx
@@ -30,8 +30,8 @@ const FileListItem = ({
title="Copy link to your clipboard"
role="button"
onClick={() => {
- clipboard.writeText(url, 'selection');
- ipcRenderer.send(IPC_EVENT_NOTIFICATION, 'Link copied to your clipboard');
+ clipboard.writeText(url);
+ ipcRenderer.send(IPC_EVENT_NOTIFICATION, 'Link copied to your clipboard: ' + url);
}}
>
<span className={styles.copy_button}>
Explanation:
Instead of copying to the clipboard, it copied to the selection clipboard.
I expected to press ^V
and get contents, instead it is a middle click on the mouse.
Proposing to change either: A) message to reflect copy to selection clipboard B) actually copying to clipboard
@bhstahl what is your opinion to my proposals? I'd prefer B) because on a laptop with touchpad a mouse middle click is usually not available.
@hexagon6 I think I prefer B as well, nice choice.
Scenario:
Link copied to your clipboard appears