mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-12 17:44:31 +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="media-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="font-weight-bold text-muted small d-none">Caption</label>
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -474,9 +475,11 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
mediaDragAndDrop() {
|
mediaDragAndDrop() {
|
||||||
|
|
||||||
let self = this;
|
let self = this;
|
||||||
let pdz = document.getElementById('content');
|
let pdz = document.getElementById('content');
|
||||||
|
|
||||||
|
|
||||||
function allowDrag(e) {
|
function allowDrag(e) {
|
||||||
e.dataTransfer.dropEffect = 'copy';
|
e.dataTransfer.dropEffect = 'copy';
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -484,10 +487,10 @@ export default {
|
||||||
|
|
||||||
function handleDrop(e) {
|
function handleDrop(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let dz = document.querySelector('#pf-dz');
|
// let dz = document.querySelector('#pf-dz');
|
||||||
dz.files = e.dataTransfer.files;
|
// dz.files = e.dataTransfer.files;
|
||||||
$('#composeModal').modal('show');
|
// $('#composeModal').modal('show');
|
||||||
self.mediaUpload();
|
// self.mediaUpload();
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('dragenter', function(e) {
|
window.addEventListener('dragenter', function(e) {
|
||||||
|
|
Loading…
Reference in a new issue