mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
Update ComposeModal.vue, added a caption counter. Fixes #1722
This commit is contained in:
parent
72db2b35b5
commit
009c6ee820
1 changed files with 8 additions and 5 deletions
|
@ -110,7 +110,8 @@
|
|||
<div class="media-body">
|
||||
<div class="form-group">
|
||||
<label class="font-weight-bold text-muted small d-none">Caption</label>
|
||||
<textarea class="form-control border-0 rounded-0 no-focus" rows="2" placeholder="Write a caption..." style="resize:none" v-model="composeText"></textarea>
|
||||
<textarea class="form-control border-0 rounded-0 no-focus" rows="2" placeholder="Write a caption..." style="resize:none" v-model="composeText" v-on:keyup="composeTextLength = composeText.length"></textarea>
|
||||
<p class="help-text small text-right text-muted mb-0">{{composeTextLength}}/{{config.uploader.max_caption_length}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -474,9 +475,11 @@ export default {
|
|||
},
|
||||
|
||||
mediaDragAndDrop() {
|
||||
|
||||
let self = this;
|
||||
let pdz = document.getElementById('content');
|
||||
|
||||
|
||||
function allowDrag(e) {
|
||||
e.dataTransfer.dropEffect = 'copy';
|
||||
e.preventDefault();
|
||||
|
@ -484,10 +487,10 @@ export default {
|
|||
|
||||
function handleDrop(e) {
|
||||
e.preventDefault();
|
||||
let dz = document.querySelector('#pf-dz');
|
||||
dz.files = e.dataTransfer.files;
|
||||
$('#composeModal').modal('show');
|
||||
self.mediaUpload();
|
||||
// let dz = document.querySelector('#pf-dz');
|
||||
// dz.files = e.dataTransfer.files;
|
||||
// $('#composeModal').modal('show');
|
||||
// self.mediaUpload();
|
||||
}
|
||||
|
||||
window.addEventListener('dragenter', function(e) {
|
||||
|
|
Loading…
Reference in a new issue