Merge pull request #698 from pixelfed/frontend-ui-refactor

Frontend ui refactor
This commit is contained in:
daniel 2018-12-27 01:18:06 -07:00 committed by GitHub
commit 6c2ead0516
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 97 additions and 34 deletions

View file

@ -17,7 +17,7 @@ there is a stable release**. The following setup instructions are intended for
testing and development.
## Requirements
- PHP >= 7.1.3 (7.2+ recommended for stable version)
- PHP >= 7.1.3 < 7.3 (7.2.x recommended for stable version)
- MySQL >= 5.7, Postgres (MariaDB and sqlite are not supported yet)
- Redis
- Composer

View file

@ -300,7 +300,7 @@ class PublicApiController extends Controller
->whereNotIn('profile_id', $filtered)
->whereNull('in_reply_to_id')
->whereNull('reblog_of_id')
->whereVisibility('public')
->whereIn('visibility',['public', 'unlisted', 'private'])
->withCount(['comments', 'likes'])
->orderBy('created_at', 'desc')
->limit($limit)
@ -311,7 +311,7 @@ class PublicApiController extends Controller
->whereNotIn('profile_id', $filtered)
->whereNull('in_reply_to_id')
->whereNull('reblog_of_id')
->whereVisibility('public')
->whereIn('visibility',['public', 'unlisted', 'private'])
->withCount(['comments', 'likes'])
->orderBy('created_at', 'desc')
->simplePaginate($limit);

View file

@ -23,7 +23,7 @@ return [
| This value is the version of your PixelFed instance.
|
*/
'version' => '0.7.4',
'version' => '0.7.5',
/*
|--------------------------------------------------------------------------

View file

@ -1,4 +1,4 @@
FROM php:7-apache
FROM php:7.2-apache
ARG COMPOSER_VERSION="1.6.5"
ARG COMPOSER_CHECKSUM="67bebe9df9866a795078bb2cf21798d8b0214f2e0b2fd81f2e907a8ef0be3434"

View file

@ -1,4 +1,4 @@
FROM php:7-fpm
FROM php:7.2-fpm
ARG COMPOSER_VERSION="1.6.5"
ARG COMPOSER_CHECKSUM="67bebe9df9866a795078bb2cf21798d8b0214f2e0b2fd81f2e907a8ef0be3434"

View file

@ -25,6 +25,13 @@ pixelfed.readmore = () => {
});
};
try {
document.createEvent("TouchEvent");
$('body').addClass('touch');
} catch (e) {
return false;
}
window.InfiniteScroll = require('infinite-scroll');
window.filesize = require('filesize');
window.Plyr = require('plyr');
@ -55,7 +62,7 @@ require('./components/statusform');
// });
// }
// Initalize Notification Helper
// Initialize Notification Helper
window.pixelfed.n = {};
Vue.component(

View file

@ -70,7 +70,7 @@ export default {
}).catch(err => {
swal(
'Whoops! Something went wrong...',
'An error occured, please try again later.',
'An error occurred, please try again later.',
'error'
);
});

View file

@ -104,7 +104,7 @@ export default {
$('.postCommentsLoader .lds-ring')
.attr('style','width:100%')
.addClass('pt-4 font-weight-bold text-muted')
.text('An error occured, cannot fetch comments. Please try again later.');
.text('An error occurred, cannot fetch comments. Please try again later.');
} else {
switch(error.response.status) {
case 401:
@ -118,7 +118,7 @@ export default {
$('.postCommentsLoader .lds-ring')
.attr('style','width:100%')
.addClass('pt-4 font-weight-bold text-muted')
.text('An error occured, cannot fetch comments. Please try again later.');
.text('An error occurred, cannot fetch comments. Please try again later.');
break;
}
}

View file

@ -156,6 +156,7 @@
<input type="hidden" name="_token" value="">
<input type="hidden" name="item" :value="statusId">
<input class="form-control" name="comment" placeholder="Add a comment..." autocomplete="off">
<input type="submit" value="Send" class="btn btn-primary comment-submit" />
</form>
</div>
</div>
@ -339,7 +340,7 @@ export default {
$('.postPresenterContainer').removeClass('d-none');
}).catch(error => {
if(!error.response) {
$('.postPresenterLoader .lds-ring').attr('style','width:100%').addClass('pt-4 font-weight-bold text-muted').text('An error occured, cannot fetch media. Please try again later.');
$('.postPresenterLoader .lds-ring').attr('style','width:100%').addClass('pt-4 font-weight-bold text-muted').text('An error occurred, cannot fetch media. Please try again later.');
} else {
switch(error.response.status) {
case 401:
@ -350,7 +351,7 @@ export default {
break;
default:
$('.postPresenterLoader .lds-ring').attr('style','width:100%').addClass('pt-4 font-weight-bold text-muted').text('An error occured, cannot fetch media. Please try again later.');
$('.postPresenterLoader .lds-ring').attr('style','width:100%').addClass('pt-4 font-weight-bold text-muted').text('An error occurred, cannot fetch media. Please try again later.');
break;
}
}

View file

@ -96,7 +96,7 @@ $(document).ready(function() {
}).catch(err => {
swal(
'Something went wrong!',
'An error occured, please try again later.',
'An error occurred, please try again later.',
'error'
);
});

View file

@ -267,6 +267,26 @@ body, button, input, textarea {
.card {
box-shadow: 0 2px 6px 0 hsla(0, 0%, 0%, 0.2);
border: none;
.comment-submit {
display: none;
position: absolute;
bottom: 12px;
right: 20px;
width: 60px;
text-align: center;
border-radius: 0 3px 3px 0;
}
}
.touch .card {
input[name="comment"] {
padding-right: 70px;
}
.comment-submit {
display: block;
}
}
.box-shadow {

View file

@ -0,0 +1,35 @@
<?php
return [
'exception_message' => 'Zpráva výjimky: :message',
'exception_trace' => 'Stopa výjimky: :trace',
'exception_message_title' => 'Zpráva výjimky',
'exception_trace_title' => 'Stopa výjimky',
'backup_failed_subject' => 'Záloha :application_name neuspěla',
'backup_failed_body' => 'Důležité: Při záloze :application_name se vyskytla chyba',
'backup_successful_subject' => 'Úspěšná nová záloha :application_name',
'backup_successful_subject_title' => 'Úspěšná nová záloha!',
'backup_successful_body' => 'Dobrá zpráva, na disku jménem :disk_name byla úspěšně vytvořena nová záloha :application_name.',
'cleanup_failed_subject' => 'Vyčištění záloh :application_name neuspělo.',
'cleanup_failed_body' => 'Při vyčištění záloh :application_name se vyskytla chyba',
'cleanup_successful_subject' => 'Vyčištění záloh :application_name úspěšné',
'cleanup_successful_subject_title' => 'Vyčištění záloh bylo úspěšné!',
'cleanup_successful_body' => 'Vyčištění záloh :application_name na disku jménem :disk_name bylo úspěšné.',
'healthy_backup_found_subject' => 'Zálohy pro :application_name na disku :disk_name jsou zdravé',
'healthy_backup_found_subject_title' => 'Zálohy pro :application_name jsou zdravé',
'healthy_backup_found_body' => 'Zálohy pro :application_name jsou považovány za zdravé. Dobrá práce!',
'unhealthy_backup_found_subject' => 'Důležité: Zálohy pro :application_name jsou nezdravé',
'unhealthy_backup_found_subject_title' => 'Důležité: Zálohy pro :application_name jsou nezdravé. :problem',
'unhealthy_backup_found_body' => 'Zálohy pro :application_name na disku :disk_name Jsou nezdravé.',
'unhealthy_backup_found_not_reachable' => 'Nelze se dostat k cíli zálohy. :error',
'unhealthy_backup_found_empty' => 'Tato aplikace nemá vůbec žádné zálohy.',
'unhealthy_backup_found_old' => 'Poslední záloha vytvořená dne :date je považována za příliš starou.',
'unhealthy_backup_found_unknown' => 'Omlouváme se, nemůžeme určit přesný důvod.',
'unhealthy_backup_found_full' => 'Zálohy zabírají příliš mnoho místa na disku. Aktuální využití disku je :disk_usage, což je vyšší než povolený limit :disk_limit.',
];

View file

@ -16,7 +16,7 @@
<p class="">When you press the button below, your photos, comments, likes, friendships and all other data will be removed permanently and will not be recoverable. If you decide to create another Pixelfed account in the future, you cannot sign up with the same username again on this instance.</p>
<div class="alert alert-danger my-5">
<span class="font-weight-bold">Warning:</span> Some remote servers may contain your public data (statuses, avatars, ect) and will not be deleted until federation support is launched.
<span class="font-weight-bold">Warning:</span> Some remote servers may contain your public data (statuses, avatars, etc) and will not be deleted until federation support is launched.
</div>
<p>

View file

@ -64,7 +64,7 @@
<p>
<a class="text-dark font-weight-bold" data-toggle="collapse" href="#collapse5" role="button" aria-expanded="false" aria-controls="collapse5">
<i class="fas fa-chevron-down mr-2"></i>
I recieved an email that I created an account, but I never signed up for one.
I received an email that I created an account, but I never signed up for one.
</a>
<div class="collapse" id="collapse5">
<div class="mt-2">

View file

@ -354,7 +354,7 @@ $(document).on('change', '.file-input', function(e) {
el.remove();
}
}).catch(function(e) {
swal('Oops, something went wrong!', 'An unexpected error occured.', 'error');
swal('Oops, something went wrong!', 'An unexpected error occurred.', 'error');
});
io.value = null;
});
@ -478,7 +478,7 @@ $(document).on('click', '#create', function(e) {
let data = res.data;
window.location.href = data;
}).catch(err => {
swal('Oops, something went wrong!', 'An unexpected error occured.', 'error');
swal('Oops, something went wrong!', 'An unexpected error occurred.', 'error');
});
})

View file

@ -83,7 +83,7 @@
}).then((res) => {
swal('Success!', 'You have successfully updated your post', 'success');
}).catch((err) => {
swal('Something went wrong', 'An error occured, please try again later', 'error');
swal('Something went wrong', 'An error occurred, please try again later', 'error');
});
});