Работа над ночным режимом
This commit is contained in:
@@ -162,7 +162,7 @@ class LoaderPage {
|
|||||||
|
|
||||||
loadBuffer(opts) {
|
loadBuffer(opts) {
|
||||||
if (opts.buffer.length) {
|
if (opts.buffer.length) {
|
||||||
const file = new File([opts.buffer], 'dummyName-PasteFromClipboard');
|
const file = new File([opts.buffer], `paste_from_clipboard_#${utils.randomHexString(10)}`);
|
||||||
this.$emit('load-file', {file});
|
this.$emit('load-file', {file});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,11 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<div class="fit column" :class="{dark}">
|
||||||
<q-input v-model="bookTitle" class="q-px-sm" dense borderless placeholder="Введите название текста" />
|
<q-input v-model="bookTitle" class="q-px-sm" dense borderless placeholder="Введите название текста" />
|
||||||
<hr />
|
<hr />
|
||||||
<textarea ref="textArea" class="text" @paste="calcTitle"></textarea>
|
<textarea ref="textArea" class="text" :class="{dark}" @paste="calcTitle"></textarea>
|
||||||
|
</div>
|
||||||
</Window>
|
</Window>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -39,6 +41,10 @@ class PasteTextPage {
|
|||||||
this.$refs.textArea.focus();
|
this.$refs.textArea.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get dark() {
|
||||||
|
return this.$store.state.reader.settings.nightMode;
|
||||||
|
}
|
||||||
|
|
||||||
getNonEmptyLine3words(text, count) {
|
getNonEmptyLine3words(text, count) {
|
||||||
let result = '';
|
let result = '';
|
||||||
const lines = text.split("\n");
|
const lines = text.split("\n");
|
||||||
@@ -115,6 +121,11 @@ export default vueComponent(PasteTextPage);
|
|||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dark {
|
||||||
|
color: white;
|
||||||
|
background-color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user