privacy.blade.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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-link py-0 font-weight-bold" href="{{route('settings.privacy.muted-users')}}">{{ __('profile.mutedAccounts') }}</a>
  10. <a class="btn btn-link py-0 font-weight-bold" href="{{route('settings.privacy.blocked-users')}}">{{ __('profile.blockedAccounts') }}</a>
  11. <a class="btn btn-link py-0 font-weight-bold" href="{{route('settings.privacy.domain-blocks')}}">{{ __('profile.blockedDomains') }}</a>
  12. </p>
  13. </div>
  14. <form method="post">
  15. @csrf
  16. <input type="hidden" name="pa_mode" value="">
  17. <input type="hidden" name="pa_duration" value="">
  18. <input type="hidden" name="pa_newrequests" value="">
  19. <div class="form-check pb-3">
  20. <input class="form-check-input" type="checkbox" name="is_private" id="is_private" {{$settings->is_private ? 'checked=""':''}}>
  21. <label class="form-check-label font-weight-bold" for="is_private">
  22. {{__('Private Account')}}
  23. </label>
  24. <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>
  25. </div>
  26. <div class="form-check pb-3">
  27. <input class="form-check-input" type="checkbox" name="crawlable" id="crawlable" {{!$settings->crawlable ? 'checked=""':''}} {{$settings->is_private ? 'disabled=""':''}}>
  28. <label class="form-check-label font-weight-bold" for="crawlable">
  29. {{__('Disable Search Engine indexing')}}
  30. </label>
  31. <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. {!! $settings->is_private ? '<strong>Not available when your account is private</strong>' : ''!!}</p>
  32. </div>
  33. <div class="form-check pb-3">
  34. <input class="form-check-input" type="checkbox" name="indexable" id="indexable" {{$profile->indexable ? 'checked=""':''}} {{$settings->is_private ? 'disabled=""':''}}>
  35. <label class="form-check-label font-weight-bold" for="indexable">
  36. {{__('Include public posts in search results')}}
  37. </label>
  38. <p class="text-muted small help-text">Your public posts may appear in search results on Pixelfed and Mastodon. People who have interacted with your posts may be able to search them regardless. {!! $settings->is_private ? '<strong>Not available when your account is private</strong>' : ''!!}</p>
  39. </div>
  40. <div class="form-check pb-3">
  41. <input class="form-check-input" type="checkbox" name="is_suggestable" id="is_suggestable" {{$settings->is_private ? 'disabled=""':''}} {{auth()->user()->profile->is_suggestable ? 'checked=""':''}}>
  42. <label class="form-check-label font-weight-bold" for="is_suggestable">
  43. {{__('Show on Directory')}}
  44. </label>
  45. <p class="text-muted small help-text">When this option is enabled, your profile is included in the Directory. Only public profiles are eligible. {!! $settings->is_private ? '<strong>Not available when your account is private</strong>' : ''!!}</p>
  46. </div>
  47. <div class="form-check pb-3">
  48. <input class="form-check-input" type="checkbox" id="public_dm" {{$settings->public_dm ? 'checked=""':''}} name="public_dm">
  49. <label class="form-check-label font-weight-bold" for="public_dm">
  50. {{__('Receive Direct Messages from anyone')}}
  51. </label>
  52. <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>
  53. </div>
  54. {{-- <div class="form-check pb-3">
  55. <input class="form-check-input" type="checkbox" value="" id="srs" checked="">
  56. <label class="form-check-label font-weight-bold" for="srs">
  57. {{__('Hide sensitive content from search results')}}
  58. </label>
  59. <p class="text-muted small help-text">This prevents posts with potentially sensitive content from displaying in your search results.</p>
  60. </div> --}}
  61. {{-- <div class="form-check pb-3">
  62. <input class="form-check-input" type="checkbox" value="" id="rbma" checked="">
  63. <label class="form-check-label font-weight-bold" for="rbma">
  64. {{__('Remove blocked and muted accounts')}}
  65. </label>
  66. <p class="text-muted small help-text">Use this to eliminate search results from accounts you've blocked or muted.</p>
  67. </div>
  68. <div class="form-check pb-3">
  69. <input class="form-check-input" type="checkbox" value="" id="ssp">
  70. <label class="form-check-label font-weight-bold" for="ssp">
  71. {{__('Display media that may contain sensitive content')}}
  72. </label>
  73. <p class="text-muted small help-text">Show all media, including potentially sensitive content.</p>
  74. </div> --}}
  75. <div class="form-check pb-3">
  76. <input class="form-check-input" type="checkbox" name="show_profile_follower_count" id="show_profile_follower_count" {{$settings->show_profile_follower_count ? 'checked=""':''}}>
  77. <label class="form-check-label font-weight-bold" for="show_profile_follower_count">
  78. {{__('Show Follower Count')}}
  79. </label>
  80. <p class="text-muted small help-text">Display follower count on profile</p>
  81. </div>
  82. <div class="form-check pb-3">
  83. <input class="form-check-input" type="checkbox" name="show_profile_following_count" id="show_profile_following_count" {{$settings->show_profile_following_count ? 'checked=""':''}}>
  84. <label class="form-check-label font-weight-bold" for="show_profile_following_count">
  85. {{__('Show Following Count')}}
  86. </label>
  87. <p class="text-muted small help-text">Display following count on profile</p>
  88. </div>
  89. @if(!$settings->is_private)
  90. <div class="form-check pb-3">
  91. <input class="form-check-input" type="checkbox" name="show_atom" id="show_atom" {{$settings->show_atom ? 'checked=""':''}}>
  92. <label class="form-check-label font-weight-bold" for="show_atom">
  93. {{__('Enable Atom Feed')}}
  94. </label>
  95. <p class="text-muted small help-text mb-0">Enable your profile atom feed. Only public profiles are eligible.</p>
  96. @if($settings->show_atom)
  97. <p class="small">
  98. <a href="{{$profile->permalink('.atom')}}" class="text-success font-weight-bold small" target="_blank">
  99. {{ $profile->permalink('.atom') }}
  100. <i class="far fa-external-link ml-1 text-muted" style="opacity: 0.5"></i>
  101. </a>
  102. </p>
  103. @endif
  104. </div>
  105. @endif
  106. <div class="form-group row mt-5 pt-5">
  107. <div class="col-12 text-right">
  108. <hr>
  109. <button type="submit" class="btn btn-primary font-weight-bold py-0 px-5">Submit</button>
  110. </div>
  111. </div>
  112. </form>
  113. <div class="modal" tabindex="-1" role="dialog" id="pac_modal">
  114. <div class="modal-dialog" role="document">
  115. <div class="modal-content">
  116. <div class="modal-header">
  117. <h5 class="modal-title">Confirm this action</h5>
  118. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  119. <span aria-hidden="true">&times;</span>
  120. </button>
  121. </div>
  122. <div class="modal-body p-3">
  123. <p class="font-weight-bold">Please select the type of private account you would like:</p>
  124. <div>
  125. <div class="form-check">
  126. <input class="form-check-input" type="radio" id="fm-1" name="pfType" value="keep-all" checked>
  127. <label class="form-check-label pb-2 font-weight-bold" for="fm-1">
  128. Keep existing followers
  129. </label>
  130. </div>
  131. <div class="form-check">
  132. <input class="form-check-input" type="radio" id="fm-2" name="pfType" value="mutual-only">
  133. <label class="form-check-label pb-2 font-weight-bold" for="fm-2">
  134. Only keep mutual followers
  135. </label>
  136. </div>
  137. <div class="form-check">
  138. <input class="form-check-input" type="radio" id="fm-3" name="pfType" value="only-followers">
  139. <label class="form-check-label pb-2 font-weight-bold" for="fm-3">
  140. Only followers that have followed you for atleast <select name="pfDuration">
  141. <option value="60">1 hour</option>
  142. <option value="1440">1 day</option>
  143. <option value="20160">2 weeks</option>
  144. <option value="43200">1 month</option>
  145. <option value="259200">6 months</option>
  146. <option value="525600">1 year</option>
  147. </select>
  148. </label>
  149. </div>
  150. <div class="form-check">
  151. <input class="form-check-input" type="radio" id="fm-4" name="pfType" value="remove-all">
  152. <label class="form-check-label font-weight-bold text-danger" for="fm-4">
  153. Remove existing followers
  154. </label>
  155. </div>
  156. {{-- <hr>
  157. <div class="form-check pt-3">
  158. <input class="form-check-input" type="checkbox" id="allowFollowRequest">
  159. <label class="form-check-label" for="allowFollowRequest">
  160. Allow new follow requests
  161. </label>
  162. </div>
  163. <div class="form-check">
  164. <input class="form-check-input" type="checkbox" name="blockNotifications" id="chk4">
  165. <label class="form-check-label" for="chk4">
  166. Block notifications from accounts I don't follow
  167. </label>
  168. </div> --}}
  169. </div>
  170. </div>
  171. <div class="modal-footer">
  172. <button type="button" class="btn btn-outline-secondary font-weight-bold py-0" data-dismiss="modal">Cancel</button>
  173. <button type="button" class="btn btn-primary font-weight-bold py-0" id="modal_confirm">Save</button>
  174. </div>
  175. </div>
  176. </div>
  177. </div>
  178. @endsection
  179. @push('scripts')
  180. <script type="text/javascript">
  181. $(document).ready(function() {
  182. $('#is_private').on('click', function(e) {
  183. let el = $(this);
  184. if(el[0].checked) {
  185. $('#pac_modal').modal('show');
  186. }
  187. });
  188. $('#modal_confirm').on('click', function(e) {
  189. $('#pac_modal').modal('hide')
  190. let mode = $('input[name="pfType"]:checked').val();
  191. let duration = $('select[name="pfDuration"]').val();
  192. // let newrequests = $('#allowFollowRequest')[0].checked;
  193. axios.post("{{route('settings.privacy.account')}}", {
  194. 'mode': mode,
  195. 'duration': duration,
  196. // 'newrequests': newrequests
  197. }).then(res => {
  198. window.location.href = window.location.href;
  199. }).catch(err => {
  200. swal('Error', 'An error occured. Please try again.', 'error');
  201. });
  202. });
  203. });
  204. </script>
  205. @endpush