privacy.blade.php 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. @extends('settings.template')
  2. @section('section')
  3. <div class="title">
  4. <h3 class="font-weight-bold">Privacy Settings</h3>
  5. </div>
  6. <hr>
  7. <div class="form-group pb-1">
  8. <p>
  9. <a class="btn btn-outline-secondary py-0 font-weight-bold" href="{{route('settings.privacy.muted-users')}}">Muted Users</a>
  10. <a class="btn btn-outline-secondary py-0 font-weight-bold" href="{{route('settings.privacy.blocked-users')}}">Blocked Users</a>
  11. </p>
  12. </div>
  13. <form method="post">
  14. @csrf
  15. <input type="hidden" name="pa_mode" value="">
  16. <input type="hidden" name="pa_duration" value="">
  17. <input type="hidden" name="pa_newrequests" value="">
  18. <div class="form-check pb-3">
  19. <input class="form-check-input" type="checkbox" name="is_private" id="is_private" {{$settings->is_private ? 'checked=""':''}}>
  20. <label class="form-check-label font-weight-bold" for="is_private">
  21. {{__('Private Account')}}
  22. </label>
  23. <p class="text-muted small help-text">When your account is private, only people you approve can see your photos and videos on pixelfed. Your existing followers won't be affected.</p>
  24. </div>
  25. <div class="form-check pb-3">
  26. <input class="form-check-input" type="checkbox" name="crawlable" id="crawlable" {{!$settings->crawlable ? 'checked=""':''}} {{$settings->is_private ? 'disabled=""':''}}>
  27. <label class="form-check-label font-weight-bold" for="crawlable">
  28. {{__('Opt-out of search engine indexing')}}
  29. </label>
  30. <p class="text-muted small help-text">When your account is visible to search engines, your information can be crawled and stored by search engines.</p>
  31. </div>
  32. {{-- <div class="form-check pb-3">
  33. <input class="form-check-input" type="checkbox" name="show_discover" id="show_discover" {{$settings->is_private ? 'disabled=""':''}} {{$settings->show_discover ? 'checked=""':''}}>
  34. <label class="form-check-label font-weight-bold" for="show_discover">
  35. {{__('Visible on discover')}}
  36. </label>
  37. <p class="text-muted small help-text">When this option is enabled, your profile and posts are used for discover recommendations. Only public profiles and posts are used.</p>
  38. </div> --}}
  39. <div class="form-check pb-3">
  40. <input class="form-check-input" type="checkbox" id="public_dm" {{$settings->public_dm ? 'checked=""':''}} name="public_dm">
  41. <label class="form-check-label font-weight-bold" for="public_dm">
  42. {{__('Receive Direct Messages from anyone')}}
  43. </label>
  44. <p class="text-muted small help-text">If selected, you will be able to receive messages and notifications from any user even if you do not follow them.</p>
  45. </div>
  46. {{-- <div class="form-check pb-3">
  47. <input class="form-check-input" type="checkbox" value="" id="srs" checked="">
  48. <label class="form-check-label font-weight-bold" for="srs">
  49. {{__('Hide sensitive content from search results')}}
  50. </label>
  51. <p class="text-muted small help-text">This prevents posts with potentially sensitive content from displaying in your search results.</p>
  52. </div> --}}
  53. {{-- <div class="form-check pb-3">
  54. <input class="form-check-input" type="checkbox" value="" id="rbma" checked="">
  55. <label class="form-check-label font-weight-bold" for="rbma">
  56. {{__('Remove blocked and muted accounts')}}
  57. </label>
  58. <p class="text-muted small help-text">Use this to eliminate search results from accounts you've blocked or muted.</p>
  59. </div>
  60. <div class="form-check pb-3">
  61. <input class="form-check-input" type="checkbox" value="" id="ssp">
  62. <label class="form-check-label font-weight-bold" for="ssp">
  63. {{__('Display media that may contain sensitive content')}}
  64. </label>
  65. <p class="text-muted small help-text">Show all media, including potentially sensitive content.</p>
  66. </div> --}}
  67. <div class="form-check pb-3">
  68. <input class="form-check-input" type="checkbox" name="show_profile_follower_count" id="show_profile_follower_count" {{$settings->show_profile_follower_count ? 'checked=""':''}}>
  69. <label class="form-check-label font-weight-bold" for="show_profile_follower_count">
  70. {{__('Show Follower Count')}}
  71. </label>
  72. <p class="text-muted small help-text">Display follower count on profile</p>
  73. </div>
  74. <div class="form-check pb-3">
  75. <input class="form-check-input" type="checkbox" name="show_profile_following_count" id="show_profile_following_count" {{$settings->show_profile_following_count ? 'checked=""':''}}>
  76. <label class="form-check-label font-weight-bold" for="show_profile_following_count">
  77. {{__('Show Following Count')}}
  78. </label>
  79. <p class="text-muted small help-text">Display following count on profile</p>
  80. </div>
  81. <div class="form-group row mt-5 pt-5">
  82. <div class="col-12 text-right">
  83. <hr>
  84. <button type="submit" class="btn btn-primary font-weight-bold py-0 px-5">Submit</button>
  85. </div>
  86. </div>
  87. </form>
  88. <div class="modal" tabindex="-1" role="dialog" id="pac_modal">
  89. <div class="modal-dialog" role="document">
  90. <div class="modal-content">
  91. <div class="modal-header">
  92. <h5 class="modal-title">Confirm this action</h5>
  93. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  94. <span aria-hidden="true">&times;</span>
  95. </button>
  96. </div>
  97. <div class="modal-body p-3">
  98. <p class="font-weight-bold">Please select the type of private account you would like:</p>
  99. <div>
  100. <div class="form-check">
  101. <input class="form-check-input" type="radio" id="fm-1" name="pfType" value="keep-all" checked>
  102. <label class="form-check-label pb-2 font-weight-bold" for="fm-1">
  103. Keep existing followers
  104. </label>
  105. </div>
  106. <div class="form-check">
  107. <input class="form-check-input" type="radio" id="fm-2" name="pfType" value="mutual-only">
  108. <label class="form-check-label pb-2 font-weight-bold" for="fm-2">
  109. Only keep mutual followers
  110. </label>
  111. </div>
  112. <div class="form-check">
  113. <input class="form-check-input" type="radio" id="fm-3" name="pfType" value="only-followers">
  114. <label class="form-check-label pb-2 font-weight-bold" for="fm-3">
  115. Only followers that have followed you for atleast <select name="pfDuration">
  116. <option value="60">1 hour</option>
  117. <option value="1440">1 day</option>
  118. <option value="20160">2 weeks</option>
  119. <option value="43200">1 month</option>
  120. <option value="259200">6 months</option>
  121. <option value="525600">1 year</option>
  122. </select>
  123. </label>
  124. </div>
  125. <div class="form-check">
  126. <input class="form-check-input" type="radio" id="fm-4" name="pfType" value="remove-all">
  127. <label class="form-check-label font-weight-bold text-danger" for="fm-4">
  128. Remove existing followers
  129. </label>
  130. </div>
  131. {{-- <hr>
  132. <div class="form-check pt-3">
  133. <input class="form-check-input" type="checkbox" id="allowFollowRequest">
  134. <label class="form-check-label" for="allowFollowRequest">
  135. Allow new follow requests
  136. </label>
  137. </div>
  138. <div class="form-check">
  139. <input class="form-check-input" type="checkbox" name="blockNotifications" id="chk4">
  140. <label class="form-check-label" for="chk4">
  141. Block notifications from accounts I don't follow
  142. </label>
  143. </div> --}}
  144. </div>
  145. </div>
  146. <div class="modal-footer">
  147. <button type="button" class="btn btn-outline-secondary font-weight-bold py-0" data-dismiss="modal">Cancel</button>
  148. <button type="button" class="btn btn-primary font-weight-bold py-0" id="modal_confirm">Save</button>
  149. </div>
  150. </div>
  151. </div>
  152. </div>
  153. @endsection
  154. @push('scripts')
  155. <script type="text/javascript">
  156. $(document).ready(function() {
  157. $('#is_private').on('click', function(e) {
  158. let el = $(this);
  159. if(el[0].checked) {
  160. $('#pac_modal').modal('show');
  161. }
  162. });
  163. $('#modal_confirm').on('click', function(e) {
  164. $('#pac_modal').modal('hide')
  165. let mode = $('input[name="pfType"]:checked').val();
  166. let duration = $('select[name="pfDuration"]').val();
  167. // let newrequests = $('#allowFollowRequest')[0].checked;
  168. axios.post("{{route('settings.privacy.account')}}", {
  169. 'mode': mode,
  170. 'duration': duration,
  171. // 'newrequests': newrequests
  172. }).then(res => {
  173. window.location.href = window.location.href;
  174. }).catch(err => {
  175. swal('Error', 'An error occured. Please try again.', 'error');
  176. });
  177. });
  178. });
  179. </script>
  180. @endpush