Commit fadded1d36d0afdf3d2d5097b49c26f69165e376
Better links directly to the file posted
Anders Rune Jensen committed on 4/23/2019, 9:29:15 PMParent: 08512a83e5b7de612b989c3f398132d015d1eecc
Files changed
message/html/compose.js | changed |
message/html/compose.js | |||
---|---|---|---|
@@ -163,14 +163,11 @@ | |||
163 | 163 … | type: 'file', | |
164 | 164 … | 'ev-click': () => hasContent.set(true), | |
165 | 165 … | 'ev-change': (ev) => { | |
166 | 166 … | const file = ev.target.files[0] | |
167 | - console.log("files", files) | ||
168 | 167 … | datSharedFiles.shareFile(file.path, (datLink) => { | |
169 | - console.log("dat link", datLink) | ||
170 | - | ||
171 | 168 … | const pos = textArea.selectionStart | |
172 | - const insertLink = '[' + file.name + ']' + '(' + datLink + ')' | ||
169 … | + const insertLink = '[' + file.name + ']' + '(' + datLink + '/' + file.name + ')' | ||
173 | 170 … | ||
174 | 171 … | textArea.value = textArea.value.slice(0, pos) + insertLink + textArea.value.slice(pos) | |
175 | 172 … | }) | |
176 | 173 … | } |
Built with git-ssb-web