mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-24 08:44:02 +00:00
Update labs settings
This commit is contained in:
parent
b4e18ec9e1
commit
710ca246f2
1 changed files with 18 additions and 0 deletions
|
@ -172,6 +172,11 @@
|
|||
</label>
|
||||
<p class="text-muted small help-text">Collapses captions/comments more than 3 lines.</p>
|
||||
</div>
|
||||
<div class="form-check pb-3">
|
||||
<input class="form-check-input" type="checkbox" id="distraction_free">
|
||||
<label class="form-check-label font-weight-bold">Simple Mode (Timelines only)</label>
|
||||
<p class="text-muted small help-text">An experimental content-first timeline layout</p>
|
||||
</div>
|
||||
<div class="py-3">
|
||||
<p class="font-weight-bold text-muted text-center">Discovery</p>
|
||||
<hr>
|
||||
|
@ -199,6 +204,7 @@
|
|||
$(document).ready(function() {
|
||||
let showSuggestions = localStorage.getItem('pf_metro_ui.exp.rec') == 'false' ? false : true;
|
||||
let showReadMore = localStorage.getItem('pf_metro_ui.exp.rm') == 'false' ? false : true;
|
||||
let distractionFree = localStorage.getItem('pf_metro_ui.exp.df') == 'true' ? true : false;
|
||||
|
||||
if(showSuggestions == true) {
|
||||
$('#show_suggestions').attr('checked', true);
|
||||
|
@ -208,6 +214,10 @@ $(document).ready(function() {
|
|||
$('#show_readmore').attr('checked', true);
|
||||
}
|
||||
|
||||
if(distractionFree == true) {
|
||||
$('#distraction_free').attr('checked', true);
|
||||
}
|
||||
|
||||
$('#show_suggestions').on('change', function(e) {
|
||||
if(e.target.checked) {
|
||||
localStorage.removeItem('pf_metro_ui.exp.rec');
|
||||
|
@ -223,6 +233,14 @@ $(document).ready(function() {
|
|||
localStorage.setItem('pf_metro_ui.exp.rm', false);
|
||||
}
|
||||
});
|
||||
|
||||
$('#distraction_free').on('change', function(e) {
|
||||
if(e.target.checked) {
|
||||
localStorage.setItem('pf_metro_ui.exp.df', true);
|
||||
} else {
|
||||
localStorage.removeItem('pf_metro_ui.exp.df');
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
Loading…
Reference in a new issue