mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +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>
|
</label>
|
||||||
<p class="text-muted small help-text">Collapses captions/comments more than 3 lines.</p>
|
<p class="text-muted small help-text">Collapses captions/comments more than 3 lines.</p>
|
||||||
</div>
|
</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">
|
<div class="py-3">
|
||||||
<p class="font-weight-bold text-muted text-center">Discovery</p>
|
<p class="font-weight-bold text-muted text-center">Discovery</p>
|
||||||
<hr>
|
<hr>
|
||||||
|
@ -199,6 +204,7 @@
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
let showSuggestions = localStorage.getItem('pf_metro_ui.exp.rec') == 'false' ? false : true;
|
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 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) {
|
if(showSuggestions == true) {
|
||||||
$('#show_suggestions').attr('checked', true);
|
$('#show_suggestions').attr('checked', true);
|
||||||
|
@ -208,6 +214,10 @@ $(document).ready(function() {
|
||||||
$('#show_readmore').attr('checked', true);
|
$('#show_readmore').attr('checked', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(distractionFree == true) {
|
||||||
|
$('#distraction_free').attr('checked', true);
|
||||||
|
}
|
||||||
|
|
||||||
$('#show_suggestions').on('change', function(e) {
|
$('#show_suggestions').on('change', function(e) {
|
||||||
if(e.target.checked) {
|
if(e.target.checked) {
|
||||||
localStorage.removeItem('pf_metro_ui.exp.rec');
|
localStorage.removeItem('pf_metro_ui.exp.rec');
|
||||||
|
@ -223,6 +233,14 @@ $(document).ready(function() {
|
||||||
localStorage.setItem('pf_metro_ui.exp.rm', false);
|
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>
|
</script>
|
||||||
@endpush
|
@endpush
|
Loading…
Reference in a new issue