issue #1 - better nsfw image loading

preload the image when it is toggled, but wait to replace it until
it has loaded.
environments/dev/deployments/1
xj9 8 years ago
parent 6075915223
commit 9107facaca

1
.gitignore vendored

@ -5,3 +5,4 @@ npm-debug.log
test/unit/coverage
test/e2e/reports
selenium-debug.log
.idea/

@ -29,9 +29,13 @@ const Attachment = {
}
},
toggleHidden () {
let img = document.createElement('img')
img.src = this.attachment.url
img.onload = () => {
this.showHidden = !this.showHidden
}
}
}
}
export default Attachment

Loading…
Cancel
Save