Update labs settings page, add timeline tips

This commit is contained in:
Daniel Supernault 2019-08-29 19:44:43 -06:00
parent af9b062b7a
commit f7dd6ebe0b
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 17 additions and 0 deletions

View File

@ -177,6 +177,11 @@
<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="form-check pb-3">
<input class="form-check-input" type="checkbox" id="show_tips">
<label class="form-check-label font-weight-bold">Show Tips</label>
<p class="text-muted small help-text">Show Tips on Timelines (Desktop Only)</p>
</div>
<div class="py-3">
<p class="font-weight-bold text-muted text-center">Discovery</p>
<hr>
@ -218,6 +223,10 @@ $(document).ready(function() {
$('#distraction_free').attr('checked', true);
}
if(localStorage.getItem('metro-tips') !== 'false') {
$('#show_tips').attr('checked', true);
}
$('#show_suggestions').on('change', function(e) {
if(e.target.checked) {
localStorage.removeItem('pf_metro_ui.exp.rec');
@ -241,6 +250,14 @@ $(document).ready(function() {
localStorage.removeItem('pf_metro_ui.exp.df');
}
});
$('#show_tips').on('change', function(e) {
if(e.target.checked) {
localStorage.setItem('metro-tips', true);
} else {
localStorage.removeItem('metro-tips');
}
});
});
</script>
@endpush