Skip to content

Commit

Permalink
Update ComposeModal, fix filter bug on safari
Browse files Browse the repository at this point in the history
  • Loading branch information
dansup committed Dec 13, 2020
1 parent 425a631 commit 8e3e758
Show file tree
Hide file tree
Showing 3 changed files with 818 additions and 2 deletions.
1 change: 1 addition & 0 deletions resources/assets/js/app.js
@@ -1,3 +1,4 @@
require('./polyfill');
window._ = require('lodash');
window.Popper = require('popper.js').default;
window.pixelfed = window.pixelfed || {};
Expand Down
9 changes: 7 additions & 2 deletions resources/assets/js/components/ComposeModal.vue
Expand Up @@ -996,6 +996,11 @@ export default {
applyFilterToMedia() {
// this is where the magic happens
var ua = navigator.userAgent.toLowerCase();
if(ua.indexOf('firefox') == -1 && ua.indexOf('chrome') == -1) {
// swal('Oops!', 'Your browser does not support the filter feature. Please use Chrome or Firefox if you want to apply a filter.', 'error');
return;
}
let medias = this.media;
let media = null;
Expand All @@ -1021,8 +1026,8 @@ export default {
axios.post('/api/local/compose/media/update/'+media.id, data).then(res => {
}).catch(err => {
});
}, media.mime, 0.9);
});
});
}, media.mime, 0.9);
ctx.clearRect(0, 0, image.width, image.height);
}
}
Expand Down

0 comments on commit 8e3e758

Please sign in to comment.