Преглед на файлове

Update labs settings page, add timeline tips

Daniel Supernault преди 5 години
родител
ревизия
f7dd6ebe0b
променени са 1 файла, в които са добавени 17 реда и са изтрити 0 реда
  1. 17 0
      resources/views/settings/labs.blade.php

+ 17 - 0
resources/views/settings/labs.blade.php

@@ -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