mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-23 13:33:18 +00:00
commit
4884875f15
6 changed files with 14 additions and 103 deletions
|
@ -106,7 +106,7 @@ return [
|
||||||
|
|
||||||
'redis' => [
|
'redis' => [
|
||||||
|
|
||||||
'client' => env('REDIS_CLIENT', 'predis'),
|
'client' => env('REDIS_CLIENT', 'phpredis'),
|
||||||
|
|
||||||
'default' => [
|
'default' => [
|
||||||
'scheme' => env('REDIS_SCHEME', 'tcp'),
|
'scheme' => env('REDIS_SCHEME', 'tcp'),
|
||||||
|
|
|
@ -18,6 +18,7 @@ server {
|
||||||
index index.html index.htm index.php;
|
index index.html index.htm index.php;
|
||||||
|
|
||||||
charset utf-8;
|
charset utf-8;
|
||||||
|
client_max_body_size 15M;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.php?$query_string;
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
|
|
BIN
public/js/components.js
vendored
BIN
public/js/components.js
vendored
Binary file not shown.
BIN
public/js/compose.js
vendored
BIN
public/js/compose.js
vendored
Binary file not shown.
Binary file not shown.
|
@ -59,13 +59,11 @@
|
||||||
</b-tooltip>
|
</b-tooltip>
|
||||||
</span>
|
</span>
|
||||||
<span v-else-if="page == 3">
|
<span v-else-if="page == 3">
|
||||||
<span v-if="media[0].mime != 'video/mp4'">
|
<a class="text-lighter text-decoration-none mr-3 d-flex align-items-center" href="#" @click.prevent="goBack()">
|
||||||
<a class="text-lighter text-decoration-none mr-3 d-flex align-items-center" href="#" @click.prevent="goBack()">
|
<i class="fas fa-long-arrow-alt-left fa-lg mr-2"></i>
|
||||||
<i class="fas fa-long-arrow-alt-left fa-lg mr-2"></i>
|
<span class="btn btn-outline-secondary btn-sm px-2 py-0 disabled" disabled="">{{media.length}}</span>
|
||||||
<span class="btn btn-outline-secondary btn-sm px-2 py-0 disabled" disabled="">{{media.length}}</span>
|
</a>
|
||||||
</a>
|
<span class="font-weight-bold mb-0">{{pageTitle}}</span>
|
||||||
<span class="font-weight-bold mb-0">{{pageTitle}}</span>
|
|
||||||
</span>
|
|
||||||
</span>
|
</span>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
<a class="text-lighter text-decoration-none mr-3" href="#" @click.prevent="goBack()"><i class="fas fa-long-arrow-alt-left fa-lg"></i></a>
|
<a class="text-lighter text-decoration-none mr-3" href="#" @click.prevent="goBack()"><i class="fas fa-long-arrow-alt-left fa-lg"></i></a>
|
||||||
|
@ -563,34 +561,6 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="page == 'processingVideo'" class="w-100 h-100 px-3 d-flex justify-content-center align-items-center" style="height: 50vh !important;">
|
|
||||||
<div v-if="isProcessingMedia" class="text-center">
|
|
||||||
<div class="spinner-border text-primary" role="status">
|
|
||||||
<span class="sr-only">Loading...</span>
|
|
||||||
</div>
|
|
||||||
<p class="text-center font-weight-bold mb-1 mt-2">
|
|
||||||
Processing Media
|
|
||||||
</p>
|
|
||||||
<p class="text-center text-muted small mb-0">
|
|
||||||
This may take a few seconds.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="page == 'processingPhoto'" class="w-100 h-100 px-3 d-flex justify-content-center align-items-center" style="height: 50vh !important;">
|
|
||||||
<div v-if="isProcessingMedia" class="text-center">
|
|
||||||
<div class="spinner-border text-primary" role="status">
|
|
||||||
<span class="sr-only">Loading...</span>
|
|
||||||
</div>
|
|
||||||
<p class="text-center font-weight-bold mb-1 mt-2">
|
|
||||||
Processing Media
|
|
||||||
</p>
|
|
||||||
<p class="text-center text-muted small mb-0">
|
|
||||||
This may take a few seconds.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- card-footers -->
|
<!-- card-footers -->
|
||||||
|
@ -715,17 +685,12 @@ export default {
|
||||||
'editMedia',
|
'editMedia',
|
||||||
'cameraRoll',
|
'cameraRoll',
|
||||||
'tagPeopleHelp',
|
'tagPeopleHelp',
|
||||||
'textOptions',
|
'textOptions'
|
||||||
'processingVideo',
|
|
||||||
'processingPhoto'
|
|
||||||
],
|
],
|
||||||
cameraRollMedia: [],
|
cameraRollMedia: [],
|
||||||
taggedUsernames: [],
|
taggedUsernames: [],
|
||||||
taggedPeopleSearch: null,
|
taggedPeopleSearch: null,
|
||||||
textMode: false,
|
textMode: false
|
||||||
isProcessingMedia: false,
|
|
||||||
processPhotoInterval: undefined,
|
|
||||||
processVideoInterval: undefined
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -825,14 +790,9 @@ export default {
|
||||||
self.ids.push(e.data.id);
|
self.ids.push(e.data.id);
|
||||||
self.media.push(e.data);
|
self.media.push(e.data);
|
||||||
self.uploading = false;
|
self.uploading = false;
|
||||||
|
setTimeout(function() {
|
||||||
if(e.data.mime == 'video/mp4') {
|
self.page = 2;
|
||||||
self.processVideo(e.data);
|
}, 300);
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
self.processPhoto(e.data);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}).catch(function(e) {
|
}).catch(function(e) {
|
||||||
switch(e.response.status) {
|
switch(e.response.status) {
|
||||||
case 451:
|
case 451:
|
||||||
|
@ -1205,6 +1165,7 @@ export default {
|
||||||
ctx.clearRect(0, 0, image.width, image.height);
|
ctx.clearRect(0, 0, image.width, image.height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
tagSearch(input) {
|
tagSearch(input) {
|
||||||
|
@ -1247,58 +1208,7 @@ export default {
|
||||||
showTextOptions() {
|
showTextOptions() {
|
||||||
this.page = 'textOptions';
|
this.page = 'textOptions';
|
||||||
this.pageTitle = 'Text Post Options';
|
this.pageTitle = 'Text Post Options';
|
||||||
},
|
|
||||||
|
|
||||||
processPhoto(media) {
|
|
||||||
this.page = 'processingPhoto';
|
|
||||||
this.pageTitle = '';
|
|
||||||
this.processPhotoCheck(media);
|
|
||||||
},
|
|
||||||
|
|
||||||
processPhotoCheck(media) {
|
|
||||||
this.isProcessingMedia = true;
|
|
||||||
this.processMediaCheck(media);
|
|
||||||
this.processPhotoInterval = setInterval(() => {
|
|
||||||
this.processMediaCheck(media);
|
|
||||||
}, 2500);
|
|
||||||
},
|
|
||||||
|
|
||||||
processVideo(media) {
|
|
||||||
this.page = 'processingVideo';
|
|
||||||
this.pageTitle = '';
|
|
||||||
this.processVideoCheck(media);
|
|
||||||
},
|
|
||||||
|
|
||||||
processVideoCheck(media) {
|
|
||||||
this.isProcessingMedia = true;
|
|
||||||
this.processMediaCheck(media, 'video');
|
|
||||||
this.processVideoInterval = setInterval(() => {
|
|
||||||
this.processMediaCheck(media, 'video');
|
|
||||||
}, 2500);
|
|
||||||
},
|
|
||||||
|
|
||||||
processMediaCheck(media, type = 'photo') {
|
|
||||||
return axios.get('/api/compose/v0/media/processing', {
|
|
||||||
params: {
|
|
||||||
id: media.id
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
let data = res.data;
|
|
||||||
if(data.finished === true) {
|
|
||||||
this.isProcessingMedia = false;
|
|
||||||
this.page = 3;
|
|
||||||
if(type == 'photo') {
|
|
||||||
clearInterval(this.processPhotoInterval);
|
|
||||||
} else if (type == 'video') {
|
|
||||||
clearInterval(this.processVideoInterval);
|
|
||||||
} else {
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
Loading…
Reference in a new issue