mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-20 03:53:17 +00:00
Merge pull request #698 from pixelfed/frontend-ui-refactor
Frontend ui refactor
This commit is contained in:
commit
6c2ead0516
16 changed files with 97 additions and 34 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -23,7 +23,7 @@ return [
|
|||
| This value is the version of your PixelFed instance.
|
||||
|
|
||||
*/
|
||||
'version' => '0.7.4',
|
||||
'version' => '0.7.5',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM php:7-apache
|
||||
FROM php:7.2-apache
|
||||
|
||||
ARG COMPOSER_VERSION="1.6.5"
|
||||
ARG COMPOSER_CHECKSUM="67bebe9df9866a795078bb2cf21798d8b0214f2e0b2fd81f2e907a8ef0be3434"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM php:7-fpm
|
||||
FROM php:7.2-fpm
|
||||
|
||||
ARG COMPOSER_VERSION="1.6.5"
|
||||
ARG COMPOSER_CHECKSUM="67bebe9df9866a795078bb2cf21798d8b0214f2e0b2fd81f2e907a8ef0be3434"
|
||||
|
|
15
resources/assets/js/components.js
vendored
15
resources/assets/js/components.js
vendored
|
@ -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(
|
||||
|
@ -137,10 +144,10 @@ window.pixelfed.copyToClipboard = (str) => {
|
|||
const el = document.createElement('textarea');
|
||||
el.value = str;
|
||||
el.setAttribute('readonly', '');
|
||||
el.style.position = 'absolute';
|
||||
el.style.position = 'absolute';
|
||||
el.style.left = '-9999px';
|
||||
document.body.appendChild(el);
|
||||
const selected =
|
||||
const selected =
|
||||
document.getSelection().rangeCount > 0
|
||||
? document.getSelection().getRangeAt(0)
|
||||
: false;
|
||||
|
@ -162,4 +169,4 @@ $(document).ready(function() {
|
|||
const warningTitleCSS = 'color:red; font-size:60px; font-weight: bold; -webkit-text-stroke: 1px black;';
|
||||
const warningDescCSS = 'font-size: 18px;';
|
||||
console.log('%cStop!', warningTitleCSS);
|
||||
console.log("%cThis is a browser feature intended for developers. If someone told you to copy and paste something here to enable a Pixelfed feature or \"hack\" someone's account, it is a scam and will give them access to your Pixelfed account.", warningDescCSS);
|
||||
console.log("%cThis is a browser feature intended for developers. If someone told you to copy and paste something here to enable a Pixelfed feature or \"hack\" someone's account, it is a scam and will give them access to your Pixelfed account.", warningDescCSS);
|
||||
|
|
|
@ -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'
|
||||
);
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,11 +56,11 @@
|
|||
</div>
|
||||
<div class="col-12 col-md-8 px-0 mx-0">
|
||||
<div class="postPresenterLoader text-center">
|
||||
<div class="lds-ring"><div></div><div></div><div></div><div></div></div>
|
||||
<div class="lds-ring"><div></div><div></div><div></div><div></div></div>
|
||||
</div>
|
||||
<div class="postPresenterContainer d-none d-flex justify-content-center align-items-center">
|
||||
<div v-if="status.pf_type === 'photo'" class="w-100">
|
||||
<photo-presenter :status="status"></photo-presenter>
|
||||
<photo-presenter :status="status"></photo-presenter>
|
||||
</div>
|
||||
|
||||
<div v-else-if="status.pf_type === 'video'" class="w-100">
|
||||
|
@ -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>
|
||||
|
@ -164,10 +165,10 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<b-modal ref="likesModal"
|
||||
<b-modal ref="likesModal"
|
||||
id="l-modal"
|
||||
hide-footer
|
||||
centered
|
||||
hide-footer
|
||||
centered
|
||||
title="Likes"
|
||||
body-class="list-group-flush p-0">
|
||||
<div class="list-group">
|
||||
|
@ -195,10 +196,10 @@
|
|||
</infinite-loading>
|
||||
</div>
|
||||
</b-modal>
|
||||
<b-modal ref="sharesModal"
|
||||
<b-modal ref="sharesModal"
|
||||
id="s-modal"
|
||||
hide-footer
|
||||
centered
|
||||
hide-footer
|
||||
centered
|
||||
title="Shares"
|
||||
body-class="list-group-flush p-0">
|
||||
<div class="list-group">
|
||||
|
@ -281,7 +282,7 @@ export default {
|
|||
$('head title').text(title);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
authCheck() {
|
||||
let authed = $('body').hasClass('loggedIn');
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -510,4 +511,4 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -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'
|
||||
);
|
||||
});
|
||||
|
|
26
resources/assets/sass/custom.scss
vendored
26
resources/assets/sass/custom.scss
vendored
|
@ -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 {
|
||||
|
@ -319,7 +339,7 @@ details summary::-webkit-details-marker {
|
|||
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.08);
|
||||
border-radius: 5px;
|
||||
padding: .5em 1em .5em .5em;
|
||||
}
|
||||
}
|
||||
|
||||
.input-elevated::placeholder {
|
||||
color: #838D99;
|
||||
|
@ -417,7 +437,7 @@ details summary::-webkit-details-marker {
|
|||
background: rgba(0,0,0,0.04);
|
||||
}
|
||||
|
||||
.timeline-sidenav.nav-pills .nav-link.active,
|
||||
.timeline-sidenav.nav-pills .nav-link.active,
|
||||
.timeline-sidenav.nav-pills .show > .nav-link {
|
||||
color: #08d;
|
||||
background: transparent;
|
||||
|
@ -434,4 +454,4 @@ details summary::-webkit-details-marker {
|
|||
|
||||
.notification-tooltip .arrow::before {
|
||||
border-bottom-color:#dc3545 !important;
|
||||
}
|
||||
}
|
||||
|
|
35
resources/lang/vendor/backup/cs/notifications.php
vendored
Normal file
35
resources/lang/vendor/backup/cs/notifications.php
vendored
Normal 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.',
|
||||
];
|
|
@ -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>
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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');
|
||||
});
|
||||
})
|
||||
|
||||
|
|
|
@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue