This commit is contained in:
Pierre Jaury 2018-08-20 15:41:45 +02:00
commit 9f4bcd2a44
9 changed files with 264 additions and 5 deletions

View file

@ -92,7 +92,7 @@ class AccountController extends Controller
Mail::to($user->email)->send(new ConfirmEmail($verify)); Mail::to($user->email)->send(new ConfirmEmail($verify));
return redirect()->back()->with('status', 'Email verification email sent!'); return redirect()->back()->with('status', 'Verification email sent!');
} }
public function confirmVerifyEmail(Request $request, $userToken, $randomToken) public function confirmVerifyEmail(Request $request, $userToken, $randomToken)

View file

@ -0,0 +1,85 @@
<?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use Carbon\Carbon;
use App\{Comment, Like, Media, Profile, Report, Status, User};
use App\Http\Controllers\Controller;
trait AdminReportController
{
public function updateReport(Request $request, $id)
{
$this->validate($request, [
'action' => 'required|string'
]);
$action = $request->input('action');
$actions = [
'ignore',
'cw',
'unlist',
'delete',
'shadowban',
'ban'
];
if(!in_array($action, $actions)) {
return abort(403);
}
$report = Report::findOrFail($id);
$this->handleReportAction($report, $action);
return response()->json(['msg'=> 'Success']);
}
public function handleReportAction(Report $report, $action)
{
$item = $report->reported();
$report->admin_seen = Carbon::now();
switch ($action) {
case 'ignore':
$report->not_interested = true;
break;
case 'cw':
$item->is_nsfw = true;
$item->save();
$report->nsfw = true;
break;
case 'unlist':
$item->visibility = 'unlisted';
$item->save();
break;
case 'delete':
// Todo: fire delete job
$report->admin_seen = null;
break;
case 'shadowban':
// Todo: fire delete job
$report->admin_seen = null;
break;
case 'ban':
// Todo: fire delete job
$report->admin_seen = null;
break;
default:
$report->admin_seen = null;
break;
}
$report->save();
return $this;
}
}

View file

@ -21,7 +21,7 @@ class SiteController extends Controller
public function homeGuest() public function homeGuest()
{ {
return view('welcome'); return view('site.index');
} }
public function homeTimeline() public function homeTimeline()

View file

@ -23,7 +23,7 @@ return [
| This value is the version of your PixelFed instance. | This value is the version of your PixelFed instance.
| |
*/ */
'version' => '0.1.6', 'version' => '0.1.7',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

BIN
public/img/online_world.svg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
public/img/sample-post.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

View file

@ -9,5 +9,6 @@ return [
'settings' => 'הגדרות', 'settings' => 'הגדרות',
'admin' => 'מנהל', 'admin' => 'מנהל',
'logout' => 'התנתק', 'logout' => 'התנתק',
'directMessages' => 'הודעות ישירות',
]; ];

View file

@ -4,5 +4,6 @@ return [
'emptyTimeline' => 'למשתמש זה עדיין אין פוסטים!', 'emptyTimeline' => 'למשתמש זה עדיין אין פוסטים!',
'emptyFollowers' => 'למשתמש זה עדיין אין עוקבים!', 'emptyFollowers' => 'למשתמש זה עדיין אין עוקבים!',
'emptyFollowing' => 'משתמש זה עדיין אינו עוקב אחרי אף אחד!', 'emptyFollowing' => 'משתמש זה עדיין אינו עוקב אחרי אף אחד!',
'emptySaved' => 'עדיין לא שמרת שום פוסט!',
'savedWarning' => 'רק אתם יכולים לראות את מה ששמרתם', 'savedWarning' => 'רק אתם יכולים לראות את מה ששמרתם',
]; ];

View file

@ -0,0 +1,172 @@
@extends('layouts.app')
@section('content')
<div class="jumbotron jumbotron-fluid bg-alt text-white my-0">
<div class="container text-center mt-5">
<h1 class="display-4 font-weight-ultralight">Image Sharing for Everyone</h1>
<p class="h3 font-weight-ultralight">A free and ethical photo sharing platform.</p>
</div>
</div>
<div class="py-3"></div>
<div class="container slim d-none d-md-block">
<div class="row">
<div class="col-12 col-md-4 mb-4">
<div class="card bg-transparent" style="box-shadow: none;border:1px solid #fff">
<div class="card-body text-white text-center">
<p class="font-weight-bold lead mb-0">
Ad Free
</p>
<p class="font-weight-light mb-0">No Ads or Trackers</p>
</div>
</div>
</div>
<div class="col-12 col-md-4 mb-4">
<div class="card bg-transparent" style="box-shadow: none;border:1px solid #fff">
<div class="card-body text-white text-center">
<p class="font-weight-bold lead mb-0">
Chronological
</p>
<p class="font-weight-light mb-0">Timelines in order</p>
</div>
</div>
</div>
<div class="col-12 col-md-4 mb-4">
<div class="card bg-transparent" style="box-shadow: none;border:1px solid #fff">
<div class="card-body text-white text-center">
<p class="font-weight-bold lead mb-0">
Federated
</p>
<p class="font-weight-light mb-0">A network of millions</p>
</div>
</div>
</div>
<div class="col-12 col-md-4">
<div class="card bg-transparent" style="box-shadow: none;border:1px solid #fff">
<div class="card-body text-white text-center">
<p class="font-weight-bold lead mb-0">
Discover
</p>
<p class="font-weight-light mb-0">Discover popular posts</p>
</div>
</div>
</div>
<div class="col-12 col-md-4">
<div class="card bg-transparent" style="box-shadow: none;border:1px solid #fff">
<div class="card-body text-white text-center">
<p class="font-weight-bold lead mb-0">
Photo Filters
</p>
<p class="font-weight-light mb-0">Add an optional filter</p>
</div>
</div>
</div>
<div class="col-12 col-md-4">
<div class="card bg-transparent" style="box-shadow: none;border:1px solid #fff">
<div class="card-body text-white text-center">
<p class="font-weight-bold lead mb-0">
Stories
</p>
<p class="font-weight-light mb-0">Coming Soon!</p>
</div>
</div>
</div>
</div>
</div>
<div class="py-5 d-none d-md-block"></div>
<div class="container slim d-flex justify-content-center">
<div class="card" style="width:500px;">
<div class="card-header d-inline-flex align-items-center bg-white">
<img src="/storage/avatars/default.png" width="32px" height="32px" style="border-radius: 32px; border: 1px solid #ccc">
<span class="username font-weight-bold pl-2 text-dark">
username
</span>
</div>
<div class="card-body p-0">
<img class="img-fluid" src="/img/sample-post.jpeg">
</div>
<div class="card-footer bg-white">
<div class="likes font-weight-bold mb-2">
<span class="like-count">124k</span> likes
</div>
<div class="caption">
<p class="mb-1">
<span class="username font-weight-bold">
<bdi>username</bdi>
</span>
<span class="caption-body" data-processed="false">Hello world! <a href="#">#introduction</a></span>
</p>
</div>
</div>
</div>
</div>
<div class="py-5 my-5"></div>
<div class="container">
<div class="row d-flex align-items-center">
<div class="col-12 col-md-5">
<img src="/img/online_world.svg" class="img-fluid">
</div>
<div class="col-12 col-md-7 text-center">
<h1 class="h1">Create. Discover. Share.</h1>
<p class="h3 font-weight-light">
A feature rich photo sharing experience <br>
</p>
</div>
</div>
</div>
<div class="py-5 my-5"></div>
<div class="bg-white">
<section class="container slim mt-5">
<div class="row py-5">
<div class="col-12 my-5 py-5">
<div class="text-center">
<h1 class="display-4">Powered by People</h1>
<p class="h3 font-weight-light">
Pixelfed is an open-source, federated platform. <br>
You can run your own instance or join one. <br>
</p>
{{-- <p class="pt-5 mb-0">
<a class="btn btn-outline-secondary btn-lg font-weight-ultralight mr-3" href="{{route('site.about')}}">About this Instance</a>
<a class="btn btn-outline-secondary btn-lg font-weight-ultralight" href="{{route('login')}}">Login</a>
</p> --}}
</div>
</div>
</div>
</section>
</div>
@endsection
@push('meta')
<meta property="og:description" content="Federated Image Sharing">
<style type="text/css">
.container.slim {
width: auto;
max-width: 680px;
padding: 0 15px;
}
.bg-alt {
background: #FEAC5E;
background: -webkit-linear-gradient(to right, #4BC0C8, #C779D0, #FEAC5E);
background: linear-gradient(to right, #4BC0C8, #C779D0, #FEAC5E);
}
.jumbotron.bg-alt:before {
content: "";
position: absolute;
z-index: -1;
width: 100%;
height: 100%;
min-height: 900px;
top: 0;
-webkit-transform: skewY(-12deg);
transform: skewY(-12deg);
background: #FEAC5E;
background: -webkit-linear-gradient(to right, #4BC0C8, #C779D0, #FEAC5E);
background: linear-gradient(to right, #4BC0C8, #C779D0, #FEAC5E);
}
</style>
@endpush