privacy.blade.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. @extends('settings.template')
  2. @section('section')
  3. <div class="title">
  4. <h3 class="font-weight-bold">{{__('settings.privacy.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. Manually Review Follow Requests
  23. </label>
  24. <p class="text-muted small help-text">When you get a follow request, Pixelfed will not automatically approve it. You can instead manually confirm or deny the follow request. 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. {{__('settings.privacy.disable_search_engine_indexing')}}
  30. </label>
  31. <p class="text-muted small help-text">{{__('settings.privacy.when_your_account_is_visible_to_search_engines_etc')}} {!! $settings->is_private ? '<strong>'.__('settings.privacy.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. {{__('settings.privacy.include_public_posts_in_search_results')}}
  37. </label>
  38. <p class="text-muted small help-text">{{__('settings.privacy.your_public_posts_may_appear_in_search_results_etc')}} {!! $settings->is_private ? '<strong>'.__('settings.privacy.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. {{__('settings.privacy.show_on_directory')}}
  44. </label>
  45. <p class="text-muted small help-text">{{__('settings.privacy.when_this_option_is_enabled_your_profile_is_etc')}} {!! $settings->is_private ? '<strong>'.__('settings.privacy.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. {{__('settings.privacy.receive_direct_messages_from_anyone')}}
  51. </label>
  52. <p class="text-muted small help-text">{{__('settings.privacy.if_selected_you_will_be_able_to_receive_messages_etc')}}</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">{{__('settings.privacy.this_prevents_posts_with_potentially_sensitive_etc')}}</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">{{__('settings.privacy.use_this_to_eliminate_search_results_from_accounts_etc')}}</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">{{__('settings.privacy.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. {{__('settings.privacy.show_follower_count')}}
  79. </label>
  80. <p class="text-muted small help-text">{{__('settings.privacy.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. {{__('settings.privacy.show_following_count')}}
  86. </label>
  87. <p class="text-muted small help-text">{{__('settings.privacy.display_following_count_on_profile')}}</p>
  88. </div>
  89. <div class="form-check pb-3">
  90. <input class="form-check-input" type="checkbox" name="disable_embeds" id="disable_embeds" {{$settings->disable_embeds ? 'checked=""':''}}>
  91. <label class="form-check-label font-weight-bold" for="disable_embeds">
  92. {{__('settings.privacy.disable_embeds')}}
  93. </label>
  94. <p class="text-muted small help-text">{{__('settings.privacy.disable_post_and_profile_embeds')}}</p>
  95. </div>
  96. @if(!$settings->is_private)
  97. <div class="form-check pb-3">
  98. <input class="form-check-input" type="checkbox" name="show_atom" id="show_atom" {{$settings->show_atom ? 'checked=""':''}}>
  99. <label class="form-check-label font-weight-bold" for="show_atom">
  100. {{__('settings.privacy.enable_atom_feed')}}
  101. </label>
  102. <p class="text-muted small help-text mb-0">{{__('settings.privacy.enable_your_profile_atom_feed_only_public_profiles_etc')}}</p>
  103. @if($settings->show_atom)
  104. <p class="small">
  105. <a href="{{$profile->permalink('.atom')}}" class="text-success font-weight-bold small" target="_blank">
  106. {{ $profile->permalink('.atom') }}
  107. <i class="far fa-external-link ml-1 text-muted" style="opacity: 0.5"></i>
  108. </a>
  109. </p>
  110. @endif
  111. </div>
  112. @endif
  113. <div class="form-group row mt-5 pt-5">
  114. <div class="col-12 text-right">
  115. <hr>
  116. <button type="submit" class="btn btn-primary font-weight-bold py-0 px-5">{{__('settings.submit')}}</button>
  117. </div>
  118. </div>
  119. </form>
  120. <div class="modal" tabindex="-1" role="dialog" id="pac_modal">
  121. <div class="modal-dialog" role="document">
  122. <div class="modal-content">
  123. <div class="modal-header">
  124. <h5 class="modal-title">{{__('settings.privacy.confirm_this_action')}}</h5>
  125. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  126. <span aria-hidden="true">&times;</span>
  127. </button>
  128. </div>
  129. <div class="modal-body p-3">
  130. <p class="font-weight-bold">{{__('settings.privacy.please_select_the_type_of_private_account_you_etc')}}</p>
  131. <div>
  132. <div class="form-check">
  133. <input class="form-check-input" type="radio" id="fm-1" name="pfType" value="keep-all" checked>
  134. <label class="form-check-label pb-2 font-weight-bold" for="fm-1">
  135. {{__('settings.privacy.keep_existing_followers')}}
  136. </label>
  137. </div>
  138. <div class="form-check">
  139. <input class="form-check-input" type="radio" id="fm-2" name="pfType" value="mutual-only">
  140. <label class="form-check-label pb-2 font-weight-bold" for="fm-2">
  141. {{__('settings.privacy.only_keep_mutual_followers')}}
  142. </label>
  143. </div>
  144. <div class="form-check">
  145. <input class="form-check-input" type="radio" id="fm-3" name="pfType" value="only-followers">
  146. <label class="form-check-label pb-2 font-weight-bold" for="fm-3">
  147. {{__('settings.privacy.only_followers_that_have_followed_you_for_atleast')}} <select name="pfDuration">
  148. <option value="60">1 {{__('settings.privacy.hour')}}</option>
  149. <option value="1440">1 {{__('settings.privacy.day')}}</option>
  150. <option value="20160">2 {{__('settings.privacy.weeks')}}</option>
  151. <option value="43200">1 {{__('settings.privacy.month')}}</option>
  152. <option value="259200">6 {{__('settings.privacy.months')}}</option>
  153. <option value="525600">1 {{__('settings.privacy.year')}}</option>
  154. </select>
  155. </label>
  156. </div>
  157. <div class="form-check">
  158. <input class="form-check-input" type="radio" id="fm-4" name="pfType" value="remove-all">
  159. <label class="form-check-label font-weight-bold text-danger" for="fm-4">
  160. {{__('settings.privacy.remove_existing_followers')}}
  161. </label>
  162. </div>
  163. {{-- <hr>
  164. <div class="form-check pt-3">
  165. <input class="form-check-input" type="checkbox" id="allowFollowRequest">
  166. <label class="form-check-label" for="allowFollowRequest">
  167. {{__('settings.privacy.allow_new_follow_requests')}}
  168. </label>
  169. </div>
  170. <div class="form-check">
  171. <input class="form-check-input" type="checkbox" name="blockNotifications" id="chk4">
  172. <label class="form-check-label" for="chk4">
  173. {{__('settings.privacy.block_notifications_from_accounts_i_dont_follow')}}
  174. </label>
  175. </div> --}}
  176. </div>
  177. </div>
  178. <div class="modal-footer">
  179. <button type="button" class="btn btn-outline-secondary font-weight-bold py-0" data-dismiss="modal">{{__('settings.cancel')}}</button>
  180. <button type="button" class="btn btn-primary font-weight-bold py-0" id="modal_confirm">{{__('settings.save')}}</button>
  181. </div>
  182. </div>
  183. </div>
  184. </div>
  185. @endsection
  186. @push('scripts')
  187. <script type="text/javascript">
  188. $(document).ready(function() {
  189. $('#is_private').on('click', function(e) {
  190. let el = $(this);
  191. if(el[0].checked) {
  192. $('#pac_modal').modal('show');
  193. }
  194. });
  195. $('#modal_confirm').on('click', function(e) {
  196. $('#pac_modal').modal('hide')
  197. let mode = $('input[name="pfType"]:checked').val();
  198. let duration = $('select[name="pfDuration"]').val();
  199. // let newrequests = $('#allowFollowRequest')[0].checked;
  200. axios.post("{{route('settings.privacy.account')}}", {
  201. 'mode': mode,
  202. 'duration': duration,
  203. // 'newrequests': newrequests
  204. }).then(res => {
  205. window.location.href = window.location.href;
  206. }).catch(err => {
  207. swal('{{__('settings.error')}}', '{{__('settings.privacy.an_error_occured_please_try_again')}}', 'error');
  208. });
  209. });
  210. });
  211. </script>
  212. @endpush