1
0

labs.blade.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. @extends('settings.template')
  2. @section('section')
  3. <div class="title">
  4. <h3 class="font-weight-bold">Labs</h3>
  5. <p class="lead">Experimental features</p>
  6. </div>
  7. <hr>
  8. <div class="alert alert-warning px-3 h6">
  9. We are deprecating Labs in a future version. Some features will no longer be supported. For more information, click <a href="{{route('help.labs-deprecation')}}" class="font-weight-bold">here</a>.
  10. </div>
  11. <div class="py-3">
  12. <p class="font-weight-bold text-muted text-center">UI</p>
  13. <hr>
  14. </div>
  15. <form method="post">
  16. @csrf
  17. <div class="form-check pb-3">
  18. <input class="form-check-input" type="checkbox" name="dark_mode" id="dark_mode" {{request()->hasCookie('dark-mode') ? 'checked':''}}>
  19. <label class="form-check-label font-weight-bold" for="dark_mode">
  20. {{__('Dark Mode')}}
  21. </label>
  22. <p class="text-muted small help-text">Use dark mode theme.</p>
  23. </div>
  24. @if(!now()->gt(now()->parse('2021-06-14 07:22:46')))
  25. @if($profile->profile_layout == 'moment')
  26. <div class="form-check pb-3">
  27. <input class="form-check-input" type="checkbox" name="profile_layout" id="profile_layout" {{$profile->profile_layout == 'moment' ? 'checked':''}} value="{{$profile->profile_layout}}">
  28. <label class="form-check-label font-weight-bold" for="profile_layout">
  29. {{__('Use MomentUI for posts and your profile')}}
  30. </label>
  31. <p class="text-muted small help-text">MomentUI offers an alternative layout for posts and your profile.</p>
  32. </div>
  33. <div class="form-check pb-3">
  34. <label class="form-check-label font-weight-bold mb-3" for="profile_layout">
  35. {{__('MomentUI Profile Header Color')}}
  36. </label>
  37. <div class="row">
  38. <div class="col-6 col-sm-3 pb-5">
  39. <div class="">
  40. <p class="form-check-label">
  41. <div class="bg-pixelfed rounded-circle box-shadow" style="width:60px; height:60px"></div>
  42. </p>
  43. <p class="mb-0 small text-muted">Default</p>
  44. <input class="form-check-input mx-0 pl-0" type="radio" name="moment_bg" value="default" {{$profile->header_bg == 'default' || !$profile->header_bg ? 'checked':''}}>
  45. </div>
  46. </div>
  47. <div class="col-6 col-sm-3 pb-5">
  48. <div class="">
  49. <p class="form-check-label">
  50. <div class="bg-moment-azure rounded-circle box-shadow" style="width:60px; height:60px"></div>
  51. </p>
  52. <p class="mb-0 small text-muted">Azure</p>
  53. <input class="form-check-input mx-0" type="radio" name="moment_bg" value="azure" {{$profile->header_bg == 'azure' ? 'checked':''}}>
  54. </div>
  55. </div>
  56. <div class="col-6 col-sm-3 pb-5">
  57. <div class="">
  58. <p class="form-check-label">
  59. <div class="bg-moment-passion rounded-circle box-shadow" style="width:60px; height:60px"></div>
  60. </p>
  61. <p class="mb-0 small text-muted">Passion</p>
  62. <input class="form-check-input mx-0" type="radio" name="moment_bg" value="passion" {{$profile->header_bg == 'passion' ? 'checked':''}}>
  63. </div>
  64. </div>
  65. <div class="col-6 col-sm-3 pb-5">
  66. <div class="">
  67. <p class="form-check-label">
  68. <div class="bg-moment-reef rounded-circle box-shadow" style="width:60px; height:60px"></div>
  69. </p>
  70. <p class="mb-0 small text-muted">Reef</p>
  71. <input class="form-check-input mx-0" type="radio" name="moment_bg" value="reef" {{$profile->header_bg == 'reef' ? 'checked':''}}>
  72. </div>
  73. </div>
  74. <div class="col-6 col-sm-3 pb-5">
  75. <div class="">
  76. <p class="form-check-label">
  77. <div class="bg-moment-lush rounded-circle box-shadow" style="width:60px; height:60px"></div>
  78. </p>
  79. <p class="mb-0 small text-muted">Lush</p>
  80. <input class="form-check-input mx-0" type="radio" name="moment_bg" value="lush" {{$profile->header_bg == 'lush' ? 'checked':''}}>
  81. </div>
  82. </div>
  83. <div class="col-6 col-sm-3 pb-5">
  84. <div class="">
  85. <p class="form-check-label">
  86. <div class="bg-moment-neon rounded-circle box-shadow" style="width:60px; height:60px"></div>
  87. </p>
  88. <p class="mb-0 small text-muted">Neon</p>
  89. <input class="form-check-input mx-0" type="radio" name="moment_bg" value="neon" {{$profile->header_bg == 'neon' ? 'checked':''}}>
  90. </div>
  91. </div>
  92. <div class="col-6 col-sm-3 pb-5">
  93. <div class="">
  94. <p class="form-check-label">
  95. <div class="bg-moment-flare rounded-circle box-shadow" style="width:60px; height:60px"></div>
  96. </p>
  97. <p class="mb-0 small text-muted">Flare</p>
  98. <input class="form-check-input mx-0" type="radio" name="moment_bg" value="flare" {{$profile->header_bg == 'flare' ? 'checked':''}}>
  99. </div>
  100. </div>
  101. <div class="col-6 col-sm-3 pb-5">
  102. <div class="">
  103. <p class="form-check-label">
  104. <div class="bg-moment-morning rounded-circle box-shadow" style="width:60px; height:60px"></div>
  105. </p>
  106. <p class="mb-0 small text-muted">Morning</p>
  107. <input class="form-check-input mx-0" type="radio" name="moment_bg" value="morning" {{$profile->header_bg == 'morning' ? 'checked':''}}>
  108. </div>
  109. </div>
  110. <div class="col-6 col-sm-3 pb-5">
  111. <div class="">
  112. <p class="form-check-label">
  113. <div class="bg-moment-tranquil rounded-circle box-shadow" style="width:60px; height:60px"></div>
  114. </p>
  115. <p class="mb-0 small text-muted">Tranquil</p>
  116. <input class="form-check-input mx-0" type="radio" name="moment_bg" value="tranquil" {{$profile->header_bg == 'tranquil' ? 'checked':''}}>
  117. </div>
  118. </div>
  119. <div class="col-6 col-sm-3 pb-5">
  120. <div class="">
  121. <p class="form-check-label">
  122. <div class="bg-moment-mauve rounded-circle box-shadow" style="width:60px; height:60px"></div>
  123. </p>
  124. <p class="mb-0 small text-muted">Mauve</p>
  125. <input class="form-check-input mx-0" type="radio" name="moment_bg" value="mauve" {{$profile->header_bg == 'mauve' ? 'checked':''}}>
  126. </div>
  127. </div>
  128. <div class="col-6 col-sm-3 pb-5">
  129. <div class="">
  130. <p class="form-check-label">
  131. <div class="bg-moment-argon rounded-circle box-shadow" style="width:60px; height:60px"></div>
  132. </p>
  133. <p class="mb-0 small text-muted">Argon</p>
  134. <input class="form-check-input mx-0" type="radio" name="moment_bg" value="argon" {{$profile->header_bg == 'argon' ? 'checked':''}}>
  135. </div>
  136. </div>
  137. <div class="col-6 col-sm-3 pb-5">
  138. <div class="">
  139. <p class="form-check-label">
  140. <div class="bg-moment-royal rounded-circle box-shadow" style="width:60px; height:60px"></div>
  141. </p>
  142. <p class="mb-0 small text-muted">Royal</p>
  143. <input class="form-check-input mx-0" type="radio" name="moment_bg" value="royal" {{$profile->header_bg == 'royal' ? 'checked':''}}>
  144. </div>
  145. </div>
  146. </div>
  147. <p class="text-muted small help-text">Set your MomentUI profile background color. Adding a custom header image will be supported in a future version.</p>
  148. </div>
  149. @else
  150. <div class="form-check pb-3">
  151. <input class="form-check-input" type="checkbox" name="profile_layout" id="profile_layout" {{$profile->profile_layout == 'moment' ? 'checked':''}} value="{{$profile->profile_layout}}" disabled>
  152. <label class="form-check-label font-weight-bold" for="profile_layout">
  153. {{__('Use MomentUI for posts and your profile')}}
  154. </label>
  155. <p class="text-muted small help-text"><span class="badge badge-secondary">DEPRECATED</span> MomentUI offers an alternative layout for posts and your profile.</p>
  156. </div>
  157. @endif
  158. @if(config('exp.rec') == true)
  159. <div class="form-check pb-3">
  160. <input class="form-check-input" type="checkbox" name="show_suggestions" id="show_suggestions">
  161. <label class="form-check-label font-weight-bold" for="show_suggestions">
  162. {{__('Profile Suggestions')}}
  163. </label>
  164. <p class="text-muted small help-text">Show Profile Suggestions.</p>
  165. </div>
  166. @endif
  167. <div class="form-check pb-3">
  168. <input class="form-check-input" type="checkbox" name="show_readmore" id="show_readmore">
  169. <label class="form-check-label font-weight-bold" for="show_readmore">
  170. {{__('Use Read More')}}
  171. </label>
  172. <p class="text-muted small help-text">Collapses captions/comments more than 3 lines.</p>
  173. </div>
  174. <div class="form-check pb-3">
  175. <input class="form-check-input" type="checkbox" id="distraction_free" disabled>
  176. <label class="form-check-label font-weight-bold">Simple Mode (Timelines only)</label>
  177. <p class="text-muted small help-text"><span class="badge badge-secondary">REMOVED</span> An experimental content-first timeline layout</p>
  178. </div>
  179. <div class="form-check pb-3">
  180. <input class="form-check-input" type="checkbox" id="show_tips">
  181. <label class="form-check-label font-weight-bold">Show Announcements</label>
  182. <p class="text-muted small help-text">Show Announcements on Timelines (Desktop Only)</p>
  183. </div>
  184. <div class="form-check pb-3">
  185. <input class="form-check-input" type="checkbox" id="force_metro">
  186. <label class="form-check-label font-weight-bold">Force Metro Layout</label>
  187. <p class="text-muted small help-text">Force MetroUI layout for profiles and posts.</p>
  188. </div>
  189. @if(config('exp.rec') == true)
  190. <div class="py-3">
  191. <p class="font-weight-bold text-muted text-center">Discovery</p>
  192. <hr>
  193. </div>
  194. <div class="form-check pb-3">
  195. <input class="form-check-input" type="checkbox" name="profile_suggestions" id="profile_suggestions" {{$profile->is_suggestable ? 'checked' : ''}}>
  196. <label class="form-check-label font-weight-bold" for="profile_suggestions">
  197. {{__('Visible on Profile Suggestions')}}
  198. </label>
  199. <p class="text-muted small help-text">Allow your profile to be listed in Profile Suggestions.</p>
  200. </div>
  201. @endif
  202. @endif
  203. <div class="form-group row">
  204. <div class="col-12">
  205. <hr>
  206. <button type="submit" class="btn btn-primary font-weight-bold py-1 btn-block">Save Changes</button>
  207. </div>
  208. </div>
  209. </form>
  210. @endsection
  211. @push('scripts')
  212. @if(!now()->gt(now()->parse('2021-06-14 07:22:46')))
  213. <script type="text/javascript">
  214. $(document).ready(function() {
  215. let showSuggestions = localStorage.getItem('pf_metro_ui.exp.rec') == 'false' ? false : true;
  216. let showReadMore = localStorage.getItem('pf_metro_ui.exp.rm') == 'false' ? false : true;
  217. let distractionFree = localStorage.getItem('pf_metro_ui.exp.df') == 'true' ? true : false;
  218. let forceMetro = localStorage.getItem('pf_metro_ui.exp.forceMetro') == 'true' ? true : false;
  219. if(showSuggestions == true) {
  220. $('#show_suggestions').attr('checked', true);
  221. }
  222. if(showReadMore == true) {
  223. $('#show_readmore').attr('checked', true);
  224. }
  225. if(distractionFree == true) {
  226. localStorage.removeItem('pf_metro_ui.exp.df');
  227. }
  228. if(localStorage.getItem('metro-tips') !== 'false') {
  229. $('#show_tips').attr('checked', true);
  230. }
  231. if(forceMetro == true) {
  232. $('#force_metro').attr('checked', true);
  233. }
  234. $('#show_suggestions').on('change', function(e) {
  235. if(e.target.checked) {
  236. localStorage.removeItem('pf_metro_ui.exp.rec');
  237. } else {
  238. localStorage.setItem('pf_metro_ui.exp.rec', false);
  239. }
  240. });
  241. $('#show_readmore').on('change', function(e) {
  242. if(e.target.checked) {
  243. localStorage.removeItem('pf_metro_ui.exp.rm');
  244. } else {
  245. localStorage.setItem('pf_metro_ui.exp.rm', false);
  246. }
  247. });
  248. $('#distraction_free').on('change', function(e) {
  249. if(e.target.checked) {
  250. localStorage.setItem('pf_metro_ui.exp.df', true);
  251. } else {
  252. localStorage.removeItem('pf_metro_ui.exp.df');
  253. }
  254. });
  255. $('#show_tips').on('change', function(e) {
  256. if(e.target.checked) {
  257. localStorage.setItem('metro-tips', true);
  258. } else {
  259. localStorage.removeItem('metro-tips');
  260. }
  261. });
  262. $('#force_metro').on('change', function(e) {
  263. if(e.target.checked) {
  264. localStorage.setItem('pf_metro_ui.exp.forceMetro', true);
  265. } else {
  266. localStorage.removeItem('pf_metro_ui.exp.forceMetro');
  267. }
  268. })
  269. });
  270. </script>
  271. @endif
  272. @endpush