mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-22 21:13:16 +00:00
Merge pull request #1469 from pixelfed/frontend-ui-refactor
Add Community Guidelines
This commit is contained in:
commit
2202bb2285
9 changed files with 138 additions and 101 deletions
|
@ -18,6 +18,7 @@ class PageController extends Controller
|
|||
'/site/about' => 'site:about',
|
||||
'/site/privacy' => 'site:privacy',
|
||||
'/site/terms' => 'site:terms',
|
||||
'/site/kb/community-guidelines' => 'site:help:community-guidelines'
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -81,7 +82,7 @@ class PageController extends Controller
|
|||
public function generatePage(Request $request)
|
||||
{
|
||||
$this->validate($request, [
|
||||
'page' => 'required|string|in:about,terms,privacy',
|
||||
'page' => 'required|string|in:about,terms,privacy,community_guidelines',
|
||||
]);
|
||||
|
||||
$page = $request->input('page');
|
||||
|
@ -98,6 +99,10 @@ class PageController extends Controller
|
|||
case 'terms':
|
||||
Page::firstOrCreate(['slug' => '/site/terms']);
|
||||
break;
|
||||
|
||||
case 'community_guidelines':
|
||||
Page::firstOrCreate(['slug' => '/site/kb/community-guidelines']);
|
||||
break;
|
||||
}
|
||||
|
||||
return redirect(route('admin.settings.pages'));
|
||||
|
|
|
@ -4,74 +4,43 @@ namespace App\Util\Webfinger;
|
|||
|
||||
class Webfinger
|
||||
{
|
||||
public $user;
|
||||
public $subject;
|
||||
public $aliases;
|
||||
public $links;
|
||||
protected $user;
|
||||
protected $subject;
|
||||
protected $aliases;
|
||||
protected $links;
|
||||
|
||||
public function __construct($user)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->subject = '';
|
||||
$this->aliases = [];
|
||||
$this->links = [];
|
||||
}
|
||||
public function __construct($user)
|
||||
{
|
||||
$this->subject = 'acct:'.$user->username.'@'.parse_url(config('app.url'), PHP_URL_HOST);
|
||||
$this->aliases = [
|
||||
$user->url(),
|
||||
$user->permalink(),
|
||||
];
|
||||
$this->links = [
|
||||
[
|
||||
'rel' => 'http://webfinger.net/rel/profile-page',
|
||||
'type' => 'text/html',
|
||||
'href' => $user->url(),
|
||||
],
|
||||
[
|
||||
'rel' => 'http://schemas.google.com/g/2010#updates-from',
|
||||
'type' => 'application/atom+xml',
|
||||
'href' => $user->permalink('.atom'),
|
||||
],
|
||||
[
|
||||
'rel' => 'self',
|
||||
'type' => 'application/activity+json',
|
||||
'href' => $user->permalink(),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function setSubject()
|
||||
{
|
||||
$host = parse_url(config('app.url'), PHP_URL_HOST);
|
||||
$username = $this->user->username;
|
||||
|
||||
$this->subject = 'acct:'.$username.'@'.$host;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function generateAliases()
|
||||
{
|
||||
$this->aliases = [
|
||||
$this->user->url(),
|
||||
$this->user->permalink(),
|
||||
];
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function generateLinks()
|
||||
{
|
||||
$user = $this->user;
|
||||
|
||||
$this->links = [
|
||||
[
|
||||
'rel' => 'http://webfinger.net/rel/profile-page',
|
||||
'type' => 'text/html',
|
||||
'href' => $user->url(),
|
||||
],
|
||||
[
|
||||
'rel' => 'http://schemas.google.com/g/2010#updates-from',
|
||||
'type' => 'application/atom+xml',
|
||||
'href' => $user->permalink('.atom'),
|
||||
],
|
||||
[
|
||||
'rel' => 'self',
|
||||
'type' => 'application/activity+json',
|
||||
'href' => $user->permalink(),
|
||||
],
|
||||
];
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function generate()
|
||||
{
|
||||
$this->setSubject();
|
||||
$this->generateAliases();
|
||||
$this->generateLinks();
|
||||
|
||||
return [
|
||||
'subject' => $this->subject,
|
||||
'aliases' => $this->aliases,
|
||||
'links' => $this->links,
|
||||
];
|
||||
}
|
||||
public function generate()
|
||||
{
|
||||
return [
|
||||
'subject' => $this->subject,
|
||||
'aliases' => $this->aliases,
|
||||
'links' => $this->links,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,4 +7,9 @@ return [
|
|||
'enabled' => env('INSTANCE_CONTACT_FORM', false),
|
||||
'max_per_day' => env('INSTANCE_CONTACT_MAX_PER_DAY', 1),
|
||||
],
|
||||
|
||||
'announcement' => [
|
||||
'enabled' => env('INSTANCE_ANNOUNCEMENT_ENABLED', true),
|
||||
'message' => env('INSTANCE_ANNOUNCEMENT_MESSAGE', 'Example announcement message.<br><span class="font-weight-normal">Something else here</span>')
|
||||
]
|
||||
];
|
|
@ -449,6 +449,13 @@
|
|||
this.config = res.data;
|
||||
this.fetchProfile();
|
||||
this.fetchTimelineApi();
|
||||
|
||||
// if(this.config.announcement.enabled == true) {
|
||||
// let msg = $('<div>')
|
||||
// .addClass('alert alert-warning mb-0 rounded-0 text-center font-weight-bold')
|
||||
// .html(this.config.announcement.message);
|
||||
// $('body').prepend(msg);
|
||||
// }
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -748,7 +755,9 @@
|
|||
type: 'status',
|
||||
item: status.id
|
||||
}).then(res => {
|
||||
this.feed.splice(index,1);
|
||||
this.feed = this.feed.filter(s => {
|
||||
return s.id != status.id;
|
||||
})
|
||||
swal('Success', 'You have successfully deleted this post', 'success');
|
||||
}).catch(err => {
|
||||
swal('Error', 'Something went wrong. Please try again later.', 'error');
|
||||
|
|
|
@ -49,17 +49,22 @@
|
|||
<form class="form-inline mr-1" method="post" action="/i/admin/settings/pages/create">
|
||||
@csrf
|
||||
<input type="hidden" name="page" value="about">
|
||||
<button type="submit" class="btn btn-outline-secondary font-weight-bold">Create About Page</button>
|
||||
<button type="submit" class="btn btn-outline-secondary font-weight-bold">Create About</button>
|
||||
</form>
|
||||
<form class="form-inline mr-1" method="post" action="/i/admin/settings/pages/create">
|
||||
@csrf
|
||||
<input type="hidden" name="page" value="privacy">
|
||||
<button type="submit" class="btn btn-outline-secondary font-weight-bold">Create Privacy Page</button>
|
||||
<button type="submit" class="btn btn-outline-secondary font-weight-bold">Create Privacy</button>
|
||||
</form>
|
||||
<form class="form-inline mr-1" method="post" action="/i/admin/settings/pages/create">
|
||||
@csrf
|
||||
<input type="hidden" name="page" value="terms">
|
||||
<button type="submit" class="btn btn-outline-secondary font-weight-bold">Create Terms</button>
|
||||
</form>
|
||||
<form class="form-inline" method="post" action="/i/admin/settings/pages/create">
|
||||
@csrf
|
||||
<input type="hidden" name="page" value="terms">
|
||||
<button type="submit" class="btn btn-outline-secondary font-weight-bold">Create Terms Page</button>
|
||||
<input type="hidden" name="page" value="community_guidelines">
|
||||
<button type="submit" class="btn btn-outline-secondary font-weight-bold">Create Guidelines</button>
|
||||
</form>
|
||||
</div>
|
||||
@else
|
||||
|
@ -73,17 +78,22 @@
|
|||
<form class="form-inline mr-1" method="post" action="/i/admin/settings/pages/create">
|
||||
@csrf
|
||||
<input type="hidden" name="page" value="about">
|
||||
<button type="submit" class="btn btn-outline-secondary font-weight-bold">Create About Page</button>
|
||||
<button type="submit" class="btn btn-outline-secondary font-weight-bold">Create About</button>
|
||||
</form>
|
||||
<form class="form-inline mr-1" method="post" action="/i/admin/settings/pages/create">
|
||||
@csrf
|
||||
<input type="hidden" name="page" value="privacy">
|
||||
<button type="submit" class="btn btn-outline-secondary font-weight-bold">Create Privacy Page</button>
|
||||
<button type="submit" class="btn btn-outline-secondary font-weight-bold">Create Privacy</button>
|
||||
</form>
|
||||
<form class="form-inline mr-1" method="post" action="/i/admin/settings/pages/create">
|
||||
@csrf
|
||||
<input type="hidden" name="page" value="terms">
|
||||
<button type="submit" class="btn btn-outline-secondary font-weight-bold">Create Terms</button>
|
||||
</form>
|
||||
<form class="form-inline" method="post" action="/i/admin/settings/pages/create">
|
||||
@csrf
|
||||
<input type="hidden" name="page" value="terms">
|
||||
<button type="submit" class="btn btn-outline-secondary font-weight-bold">Create Terms Page</button>
|
||||
<input type="hidden" name="page" value="community_guidelines">
|
||||
<button type="submit" class="btn btn-outline-secondary font-weight-bold">Create Guidelines</button>
|
||||
</form>
|
||||
</div>
|
||||
@endif
|
||||
|
|
|
@ -149,7 +149,7 @@
|
|||
</a>
|
||||
</div>
|
||||
|
||||
{{-- <div class="col-12 col-md-6 mb-3">
|
||||
<div class="col-12 col-md-6 mb-3">
|
||||
<a href="{{route('help.community-guidelines')}}" class="text-decoration-none">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
@ -158,13 +158,13 @@
|
|||
</p>
|
||||
<p class="text-center text-muted font-weight-bold h4 mb-0">{{__('helpcenter.communityGuidelines')}}</p>
|
||||
<div class="text-center pt-3">
|
||||
<p class="small text-dark font-weight-bold mb-0"> </p>
|
||||
<p class="small text-dark font-weight-bold mb-0"> </p>
|
||||
<p class="small text-dark font-weight-bold mb-0">Content that will be removed</p>
|
||||
<p class="small text-dark font-weight-bold mb-0">Content that is explicitly disallowed</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div> --}}
|
||||
</div>
|
||||
{{-- <div class="col-12 col-md-6 mb-3">
|
||||
<a href="{{route('help.blocking-accounts')}}" class="text-decoration-none">
|
||||
<div class="card">
|
||||
|
|
|
@ -6,21 +6,58 @@
|
|||
<h3 class="font-weight-bold">Community Guidelines</h3>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-3 text-center">
|
||||
<div class="icon-wrapper">
|
||||
<i class="far fa-question-circle fa-3x text-light"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-9 d-flex align-items-center">
|
||||
<div class="text-center">
|
||||
<p class="h3 font-weight-bold mb-0">This page isn't available</p>
|
||||
<p class="font-weight-light mb-0">We haven't finished it yet, it will be updated soon!</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if($page)
|
||||
<div>
|
||||
{!!$page->content!!}
|
||||
<hr>
|
||||
<p class="">This document was last updated {{$page->created_at->format('M d, Y')}}.</p>
|
||||
<p class="">Originally adapted from the <a href="https://mastodon.social/about/more">Mastodon</a> Code of Conduct.</p>
|
||||
</div>
|
||||
@else
|
||||
<div>
|
||||
<p class="lead mb-5">The following guidelines are not a legal document, and final interpretation is up to the administration of {{config('pixelfed.domain.app')}}; they are here to provide you with an insight into our content moderation policies:</p>
|
||||
<div class="py-4">
|
||||
<h5 class="pb-3">The following types of content will be removed from the public timeline:</h5>
|
||||
<ul>
|
||||
<li class="mb-3">Excessive advertising</li>
|
||||
<li class="mb-3">Uncurated news bots posting from third-party news sources</li>
|
||||
<li class="mb-3">Untagged nudity, pornography and sexually explicit content, including artistic depictions</li>
|
||||
<li class="mb-3">Untagged gore and extremely graphic violence, including artistic depictions</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="py-4">
|
||||
<h5 class="pb-3">The following types of content will be removed from the public timeline, and may result in account suspension and revocation of access to the service:</h5>
|
||||
<ul>
|
||||
<li class="mb-3">Racism or advocation of racism</li>
|
||||
<li class="mb-3">Sexism or advocation of sexism</li>
|
||||
<li class="mb-3">Discrimination against gender and sexual minorities, or advocation thereof</li>
|
||||
<li class="mb-3">Xenophobic and/or violent nationalism</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="py-4">
|
||||
<h5 class="pb-3">The following types of content are explicitly disallowed and will result in revocation of access to the service:</h5>
|
||||
<ul>
|
||||
<li class="mb-3">Sexual depictions of children</li>
|
||||
<li class="mb-3">Content illegal in Canada, Germany and/or France, such as holocaust denial or Nazi symbolism</li>
|
||||
<li class="mb-3">Conduct promoting the ideology of National Socialism</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="py-4">
|
||||
<h5 class="pb-3">Any conduct intended to stalk or harass other users, or to impede other users from utilizing the service, or to degrade the performance of the service, or to harass other users, or to incite other users to perform any of the aforementioned actions, is also disallowed, and subject to punishment up to and including revocation of access to the service. This includes, but is not limited to, the following behaviors:</h5>
|
||||
<ul>
|
||||
<li class="mb-3">Continuing to engage in conversation with a user that has specifically has requested for said engagement with that user to cease and desist may be considered harassment, regardless of platform-specific privacy tools employed.</li>
|
||||
<li class="mb-3">Aggregating, posting, and/or disseminating a person's demographic, personal, or private data without express permission (informally called doxing or dropping dox) may be considered harassment.</li>
|
||||
<li class="mb-3">Inciting users to engage another user in continued interaction or discussion after a user has requested for said engagement with that user to cease and desist (informally called brigading or dogpiling) may be considered harassment.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr>
|
||||
<p>These provisions notwithstanding, the administration of the service reserves the right to revoke any user's access permissions, at any time, for any reason, except as limited by law.</p>
|
||||
<hr>
|
||||
<p class="">This document was last updated Jun 26, 2019.</p>
|
||||
<p class="">Originally adapted from the <a href="https://mastodon.social/about/more">Mastodon</a> Code of Conduct.</p>
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
|
|
|
@ -30,11 +30,11 @@
|
|||
<li class="nav-item">
|
||||
<hr>
|
||||
</li>
|
||||
{{-- <li class="nav-item {{request()->is('*/community-guidelines')?'active':''}}">
|
||||
<li class="nav-item {{request()->is('*/community-guidelines')?'active':''}}">
|
||||
<a class="nav-link font-weight-light text-muted" href="{{route('help.community-guidelines')}}">
|
||||
{{__('helpcenter.communityGuidelines')}}
|
||||
</a>
|
||||
</li> --}}
|
||||
</li>
|
||||
{{-- <li class="nav-item {{request()->is('*/what-is-the-fediverse')?'active':''}}">
|
||||
<a class="nav-link font-weight-light text-muted" href="{{route('help.what-is-fediverse')}}">{{__('helpcenter.whatIsTheFediverse')}}</a>
|
||||
</li> --}}
|
||||
|
|
|
@ -43,7 +43,9 @@
|
|||
<p class="">Pixelfed may revise these terms of service for its website at any time without notice. By using this website you are agreeing to be bound by the then current version of these terms of service.</p>
|
||||
<h5 class="font-weight-bold">8. Governing Law</h5>
|
||||
<p class="">These terms and conditions are governed by and construed in accordance with the laws of Canada and you irrevocably submit to the exclusive jurisdiction of the courts in that State or location.</p>
|
||||
<h5 class="font-weight-bold">9. Additional Rules</h5>
|
||||
<h5 class="font-weight-bold">9. Community Guidelines</h5>
|
||||
<p class="">You can view our Community Guidelines <a href="{{route('help.community-guidelines')}}">here</a>.</p>
|
||||
<h5 class="font-weight-bold">10. Additional Rules</h5>
|
||||
<p class="">This website does not have any additional rules.</p>
|
||||
@endif
|
||||
@endsection
|
||||
|
|
Loading…
Reference in a new issue