kopia lustrzana https://github.com/pixelfed/pixelfed
Update home settings, move avatar preview js to view
rodzic
35457d42e9
commit
e36f492d4d
|
@ -43,7 +43,6 @@ require('./components/commentform');
|
|||
require('./components/searchform');
|
||||
require('./components/bookmarkform');
|
||||
require('./components/statusform');
|
||||
require('./components/settingspage');
|
||||
//require('./components/embed');
|
||||
//require('./components/notifications');
|
||||
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
$(document).ready(function () {
|
||||
$('#avatarInput').on('change', function(e) {
|
||||
var file = document.getElementById('avatarInput').files[0];
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.addEventListener("load", function() {
|
||||
$('#previewAvatar').html('<img src="' + reader.result + '" class="rounded-circle box-shadow" />');
|
||||
}, false);
|
||||
|
||||
if (file) {
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
});
|
||||
});
|
|
@ -131,5 +131,18 @@
|
|||
});
|
||||
|
||||
$('#maxAvatarSize').text(filesize({{config('pixelfed.max_avatar_size') * 1024}}, {round: 0}));
|
||||
|
||||
$('#avatarInput').on('change', function(e) {
|
||||
var file = document.getElementById('avatarInput').files[0];
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.addEventListener("load", function() {
|
||||
$('#previewAvatar').html('<img src="' + reader.result + '" class="rounded-circle box-shadow mb-3" width="100%" height="100%"/>');
|
||||
}, false);
|
||||
|
||||
if (file) {
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
|
Ładowanie…
Reference in New Issue