1
0
mirror of https://github.com/Tygs/0bin.git synced 2023-08-10 21:13:00 +03:00

Replace pre reader mode by a div

This commit is contained in:
ksamuel 2020-08-13 17:17:46 +02:00
parent cda601a355
commit cc3ed69710
3 changed files with 15 additions and 12 deletions

View File

@ -323,7 +323,6 @@ form textarea {
clear: both; clear: both;
} }
html.local-storage .no-local-storage { html.local-storage .no-local-storage {
display: none; display: none;
} }
@ -503,6 +502,10 @@ nav ul li a:hover {
font-size: 70%; font-size: 70%;
} }
}
/* reader mode */
#readable-paste-content {
white-space: pre;
} }

View File

@ -71,7 +71,6 @@ const app = new Vue({
toggleReaderMode: function () { toggleReaderMode: function () {
if (!this.readerMode) { if (!this.readerMode) {
this.messages = []; this.messages = [];
this.currentPaste.content = zerobin.getPasteContent();
} }
this.readerMode = !this.readerMode; this.readerMode = !this.readerMode;
@ -758,6 +757,7 @@ if (content && key) {
/* Decrypted content goes back to initial container*/ /* Decrypted content goes back to initial container*/
document.querySelector('#paste-content').innerText = content; document.querySelector('#paste-content').innerText = content;
app.currentPaste.content = content
if (content.indexOf('data:image') == 0) { if (content.indexOf('data:image') == 0) {
// Display Image // Display Image

View File

@ -60,9 +60,9 @@
</code> </code>
</pre> </pre>
<pre id="readable-paste-content" v-if="readerMode"> <div id="readable-paste-content" v-if="readerMode">
{% currentPaste.content %} fsdqfd{% currentPaste.content %}
</pre> </div>
<div class="d-flex justify-content-between down"> <div class="d-flex justify-content-between down">
<div v-if="currentPaste.ownerKey"> <div v-if="currentPaste.ownerKey">