mirror of https://github.com/pixelfed/pixelfed
commit
ab35ed3547
@ -0,0 +1,49 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
use App\FailedJob;
|
||||||
|
|
||||||
|
class FailedJobGC extends Command
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The name and signature of the console command.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $signature = 'gc:failedjobs';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'Delete failed jobs over 1 month old';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new command instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
FailedJob::chunk(50, function($jobs) {
|
||||||
|
foreach($jobs as $job) {
|
||||||
|
if($job->failed_at->lt(now()->subMonth())) {
|
||||||
|
$job->delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
use App\EmailVerification;
|
||||||
|
|
||||||
|
class PasswordResetGC extends Command
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The name and signature of the console command.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $signature = 'gc:passwordreset';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'Delete password reset tokens over 24 hours old';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new command instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
EmailVerification::where('created_at', '<', now()->subMinutes(1441))
|
||||||
|
->chunk(50, function($emails) {
|
||||||
|
foreach($emails as $em) {
|
||||||
|
$em->delete();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -1,12 +1,17 @@
|
|||||||
@component('mail::message')
|
@component('mail::message')
|
||||||
# Email Confirmation
|
# Email Confirmation
|
||||||
|
|
||||||
Please confirm your email address.
|
Hello <b>@{{$verify->user->username}}</b>, please confirm your email address.
|
||||||
|
|
||||||
|
If you did not create this account, please disregard this email.
|
||||||
|
|
||||||
@component('mail::button', ['url' => $verify->url()])
|
@component('mail::button', ['url' => $verify->url()])
|
||||||
Confirm Email
|
Confirm Email
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
|
||||||
|
<p>This link expires after 24 hours.</p>
|
||||||
|
<br>
|
||||||
|
|
||||||
Thanks,<br>
|
Thanks,<br>
|
||||||
{{ config('pixelfed.domain.app') }}
|
<a href="{{ config('app.url') }}">{{ config('pixelfed.domain.app') }}</a>
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
@ -1,107 +1,118 @@
|
|||||||
<nav class="navbar navbar-expand navbar-light navbar-laravel shadow-none border-bottom border sticky-top py-1">
|
<nav class="navbar navbar-expand navbar-light navbar-laravel shadow-none border-bottom sticky-top py-1">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<a class="navbar-brand d-flex align-items-center" href="{{ route('timeline.personal') }}" title="Logo">
|
<a class="navbar-brand d-flex align-items-center" href="{{ route('timeline.personal') }}" title="Logo">
|
||||||
<img src="/img/pixelfed-icon-color.svg" height="30px" class="px-2" loading="eager">
|
<img src="/img/pixelfed-icon-color.svg" height="30px" class="px-2" loading="eager">
|
||||||
<span class="font-weight-bold mb-0 d-none d-sm-block" style="font-size:20px;">{{ config('app.name', 'pixelfed') }}</span>
|
<span class="font-weight-bold mb-0 d-none d-sm-block" style="font-size:20px;">{{ config('app.name', 'pixelfed') }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="collapse navbar-collapse">
|
<div class="collapse navbar-collapse">
|
||||||
@auth
|
@auth
|
||||||
<ul class="navbar-nav d-none d-md-block mx-auto">
|
<ul class="navbar-nav d-none d-md-block mx-auto">
|
||||||
<form class="form-inline search-bar" method="get" action="/i/results">
|
<form class="form-inline search-bar" method="get" action="/i/results">
|
||||||
<input class="form-control form-control-sm" name="q" placeholder="{{__('navmenu.search')}}" aria-label="search" autocomplete="off" required style="line-height: 0.6;width:200px">
|
<input class="form-control form-control-sm" name="q" placeholder="{{__('navmenu.search')}}" aria-label="search" autocomplete="off" required style="line-height: 0.6;width:200px">
|
||||||
</form>
|
</form>
|
||||||
</ul>
|
</ul>
|
||||||
@endauth
|
@endauth
|
||||||
|
|
||||||
@guest
|
@guest
|
||||||
|
|
||||||
<ul class="navbar-nav ml-auto">
|
<ul class="navbar-nav ml-auto">
|
||||||
<li>
|
|
||||||
<a class="nav-link font-weight-bold text-primary" href="{{ route('login') }}" title="Login">
|
|
||||||
{{ __('Login') }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
@if(config('pixelfed.open_registration'))
|
|
||||||
<li>
|
<li>
|
||||||
<a class="nav-link font-weight-bold" href="{{ route('register') }}" title="Register">
|
<a class="nav-link font-weight-bold text-primary" href="{{ route('login') }}" title="Login">
|
||||||
{{ __('Register') }}
|
{{ __('Login') }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
@if(config('pixelfed.open_registration') && config('instance.restricted.enabled') == false)
|
||||||
@else
|
<li>
|
||||||
<div class="ml-auto">
|
<a class="nav-link font-weight-bold" href="{{ route('register') }}" title="Register">
|
||||||
<ul class="navbar-nav">
|
{{ __('Register') }}
|
||||||
<div class="d-none d-md-block">
|
|
||||||
<li class="nav-item px-md-2">
|
|
||||||
<a class="nav-link font-weight-bold text-muted" href="/" title="Home Timeline" data-toggle="tooltip" data-placement="bottom">
|
|
||||||
<i class="fas fa-home fa-lg"></i>
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</div>
|
@endif
|
||||||
<li class="d-block d-md-none"></li>
|
@else
|
||||||
<div class="d-none d-md-block">
|
<div class="ml-auto">
|
||||||
<li class="nav-item px-md-2">
|
<ul class="navbar-nav">
|
||||||
<a class="nav-link font-weight-bold text-muted" href="{{route('discover')}}" title="Discover" data-toggle="tooltip" data-placement="bottom">
|
<div class="d-none d-md-block">
|
||||||
<i class="far fa-compass fa-lg"></i>
|
<li class="nav-item px-md-2">
|
||||||
|
<a class="nav-link font-weight-bold text-muted" href="{{route('discover')}}" title="Discover" data-toggle="tooltip" data-placement="bottom">
|
||||||
|
<i class="far fa-compass fa-lg"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
|
<div class="d-none d-md-block">
|
||||||
|
<li class="nav-item px-md-2">
|
||||||
|
<a class="nav-link font-weight-bold text-muted" href="/account/activity" title="Notifications" data-toggle="tooltip" data-placement="bottom">
|
||||||
|
<i class="far fa-bell fa-lg"></i>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
|
<li class="nav-item dropdown ml-2">
|
||||||
|
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="User Menu" data-toggle="tooltip" data-placement="bottom">
|
||||||
|
<i class="far fa-user fa-lg text-muted"></i>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
|
||||||
</div>
|
|
||||||
<li class="nav-item dropdown ml-2">
|
|
||||||
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="User Menu" data-toggle="tooltip" data-placement="bottom">
|
|
||||||
<i class="far fa-user fa-lg text-muted"></i>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
|
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
|
||||||
<div class="dropdown-item font-weight-bold cursor-pointer" onclick="App.util.compose.post()">
|
<div class="dropdown-item font-weight-bold cursor-pointer" onclick="App.util.compose.post()">
|
||||||
<span class="fas fa-camera-retro pr-1"></span>
|
<span class="fas fa-plus-square pr-2 text-lighter"></span>
|
||||||
{{__('navmenu.composePost')}}
|
New Post
|
||||||
</div>
|
</div>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item font-weight-bold" href="/i/me">
|
<a class="dropdown-item font-weight-bold" href="{{route('timeline.public')}}">
|
||||||
<span class="far fa-user pr-1"></span>
|
<span class="fas fa-home pr-2 text-lighter"></span>
|
||||||
{{__('navmenu.myProfile')}}
|
Home
|
||||||
</a>
|
</a>
|
||||||
<a class="d-block d-md-none dropdown-item font-weight-bold" href="{{route('discover')}}">
|
<a class="dropdown-item font-weight-bold" href="{{route('timeline.public')}}">
|
||||||
<span class="far fa-compass pr-1"></span>
|
<span class="fas fa-stream pr-2 text-lighter"></span>
|
||||||
{{__('navmenu.discover')}}
|
Local
|
||||||
</a>
|
</a>
|
||||||
<a class="dropdown-item font-weight-bold" href="{{route('notifications')}}">
|
{{-- <a class="dropdown-item font-weight-bold" href="#">
|
||||||
<span class="far fa-bell pr-1"></span>
|
<span class="fas fa-circle-notch pr-2 text-lighter"></span>
|
||||||
Notifications
|
Circles
|
||||||
</a>
|
</a> --}}
|
||||||
<div class="dropdown-divider"></div>
|
{{-- <a class="dropdown-item font-weight-bold" href="{{route('timeline.public')}}">
|
||||||
<a class="dropdown-item font-weight-bold" href="{{route('timeline.public')}}">
|
<span class="fas fa-project-diagram fa-sm pr-2 text-lighter"></span>
|
||||||
<span class="far fa-map pr-1"></span>
|
Network
|
||||||
{{__('navmenu.publicTimeline')}}
|
</a> --}}
|
||||||
</a>
|
<div class="dropdown-divider"></div>
|
||||||
<div class="dropdown-divider"></div>
|
<a class="dropdown-item font-weight-bold" href="/i/me">
|
||||||
<a class="dropdown-item font-weight-bold" href="{{route('settings')}}">
|
<span class="far fa-user pr-2 text-lighter"></span>
|
||||||
<span class="fas fa-cog pr-1"></span>
|
{{__('navmenu.myProfile')}}
|
||||||
{{__('navmenu.settings')}}
|
</a>
|
||||||
</a>
|
<a class="d-block d-md-none dropdown-item font-weight-bold" href="{{route('discover')}}">
|
||||||
@if(Auth::user()->is_admin == true)
|
<span class="far fa-compass pr-2 text-lighter"></span>
|
||||||
<a class="dropdown-item font-weight-bold" href="{{ route('admin.home') }}">
|
{{__('navmenu.discover')}}
|
||||||
<span class="fas fa-cogs pr-1"></span>
|
</a>
|
||||||
{{__('navmenu.admin')}}
|
<a class="dropdown-item font-weight-bold" href="{{route('notifications')}}">
|
||||||
</a>
|
<span class="far fa-bell pr-2 text-lighter"></span>
|
||||||
@endif
|
Notifications
|
||||||
<div class="dropdown-divider"></div>
|
</a>
|
||||||
<a class="dropdown-item font-weight-bold" href="{{ route('logout') }}"
|
<a class="dropdown-item font-weight-bold" href="{{route('settings')}}">
|
||||||
onclick="event.preventDefault();
|
<span class="fas fa-cog pr-2 text-lighter"></span>
|
||||||
document.getElementById('logout-form').submit();">
|
{{__('navmenu.settings')}}
|
||||||
<span class="fas fa-sign-out-alt pr-1"></span>
|
</a>
|
||||||
{{ __('navmenu.logout') }}
|
@if(Auth::user()->is_admin == true)
|
||||||
</a>
|
<div class="dropdown-divider"></div>
|
||||||
|
<a class="dropdown-item font-weight-bold" href="{{ route('admin.home') }}">
|
||||||
|
<span class="fas fa-shield-alt fa-sm pr-2 text-lighter"></span>
|
||||||
|
{{__('navmenu.admin')}}
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
<div class="dropdown-divider"></div>
|
||||||
|
<a class="dropdown-item font-weight-bold" href="{{ route('logout') }}"
|
||||||
|
onclick="event.preventDefault();
|
||||||
|
document.getElementById('logout-form').submit();">
|
||||||
|
<span class="fas fa-sign-out-alt pr-2"></span>
|
||||||
|
{{ __('navmenu.logout') }}
|
||||||
|
</a>
|
||||||
|
|
||||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
|
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
|
||||||
@csrf
|
@csrf
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
@endguest
|
@endguest
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
Loading…
Reference in New Issue