forked from mirror/pixelfed
Compare commits
5 Commits
dev
...
pixelfed.d
Author | SHA1 | Date |
---|---|---|
hnrd | 8caee23865 | |
hnrd | 1621a5eba0 | |
hnrd | d2e6e4179f | |
chris | 79c8dba872 | |
chris | a0737cc1d3 |
|
@ -70,7 +70,7 @@ class RegisterController extends Controller
|
||||||
$usernameRules = [
|
$usernameRules = [
|
||||||
'required',
|
'required',
|
||||||
'min:2',
|
'min:2',
|
||||||
'max:15',
|
'max:30',
|
||||||
'unique:users',
|
'unique:users',
|
||||||
function ($attribute, $value, $fail) {
|
function ($attribute, $value, $fail) {
|
||||||
$dash = substr_count($value, '-');
|
$dash = substr_count($value, '-');
|
||||||
|
|
|
@ -279,16 +279,16 @@ class DiscoverController extends Controller
|
||||||
}
|
}
|
||||||
return [
|
return [
|
||||||
'hashtags' => [
|
'hashtags' => [
|
||||||
'enabled' => false,
|
'enabled' => true,
|
||||||
],
|
],
|
||||||
'memories' => [
|
'memories' => [
|
||||||
'enabled' => false,
|
'enabled' => true,
|
||||||
],
|
],
|
||||||
'insights' => [
|
'insights' => [
|
||||||
'enabled' => false,
|
'enabled' => true,
|
||||||
],
|
],
|
||||||
'friends' => [
|
'friends' => [
|
||||||
'enabled' => false,
|
'enabled' => true,
|
||||||
],
|
],
|
||||||
'server' => [
|
'server' => [
|
||||||
'enabled' => false,
|
'enabled' => false,
|
||||||
|
|
|
@ -94,6 +94,15 @@ class SiteController extends Controller
|
||||||
return View::make('site.terms')->with(compact('page'))->render();
|
return View::make('site.terms')->with(compact('page'))->render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function legal(Request $request)
|
||||||
|
{
|
||||||
|
$page = Cache::remember('site:terms', now()->addDays(120), function() {
|
||||||
|
$slug = '/site/legal';
|
||||||
|
return Page::whereSlug($slug)->whereActive(true)->first();
|
||||||
|
});
|
||||||
|
return View::make('site.legal')->with(compact('page'))->render();
|
||||||
|
}
|
||||||
|
|
||||||
public function redirectUrl(Request $request)
|
public function redirectUrl(Request $request)
|
||||||
{
|
{
|
||||||
abort_if(!$request->user(), 404);
|
abort_if(!$request->user(), 404);
|
||||||
|
|
|
@ -112,6 +112,7 @@ class RemoteAuthService
|
||||||
}
|
}
|
||||||
|
|
||||||
return Cache::remember(self::CACHE_KEY . 'domain-compatible:' . $domain, 14400, function() use($domain) {
|
return Cache::remember(self::CACHE_KEY . 'domain-compatible:' . $domain, 14400, function() use($domain) {
|
||||||
|
return true;
|
||||||
try {
|
try {
|
||||||
$res = Http::timeout(20)->retry(3, 750)->get('https://beagle.pixelfed.net/api/v1/raa/domain?domain=' . $domain);
|
$res = Http::timeout(20)->retry(3, 750)->get('https://beagle.pixelfed.net/api/v1/raa/domain?domain=' . $domain);
|
||||||
if(!$res->ok()) {
|
if(!$res->ok()) {
|
||||||
|
@ -136,6 +137,7 @@ class RemoteAuthService
|
||||||
|
|
||||||
public static function lookupWebfingerUses($wf)
|
public static function lookupWebfingerUses($wf)
|
||||||
{
|
{
|
||||||
|
return 0;
|
||||||
try {
|
try {
|
||||||
$res = Http::timeout(20)->retry(3, 750)->get('https://beagle.pixelfed.net/api/v1/raa/lookup?webfinger=' . $wf);
|
$res = Http::timeout(20)->retry(3, 750)->get('https://beagle.pixelfed.net/api/v1/raa/lookup?webfinger=' . $wf);
|
||||||
if(!$res->ok()) {
|
if(!$res->ok()) {
|
||||||
|
@ -158,6 +160,7 @@ class RemoteAuthService
|
||||||
|
|
||||||
public static function submitToBeagle($ow, $ou, $dw, $du)
|
public static function submitToBeagle($ow, $ou, $dw, $du)
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
try {
|
try {
|
||||||
$url = 'https://beagle.pixelfed.net/api/v1/raa/submit';
|
$url = 'https://beagle.pixelfed.net/api/v1/raa/submit';
|
||||||
$res = Http::throw()->timeout(10)->get($url, [
|
$res = Http::throw()->timeout(10)->get($url, [
|
||||||
|
|
|
@ -16,4 +16,5 @@ return [
|
||||||
'contact-us' => 'Kontaktiere uns',
|
'contact-us' => 'Kontaktiere uns',
|
||||||
'places' => 'Orte',
|
'places' => 'Orte',
|
||||||
'profiles' => 'Profile',
|
'profiles' => 'Profile',
|
||||||
|
'legal' => 'Impressum',
|
||||||
];
|
];
|
||||||
|
|
|
@ -16,5 +16,6 @@ return [
|
||||||
'contact-us' => 'Contact Us',
|
'contact-us' => 'Contact Us',
|
||||||
'places' => 'Places',
|
'places' => 'Places',
|
||||||
'profiles' => 'Profiles',
|
'profiles' => 'Profiles',
|
||||||
|
'legal' => 'Legal Notice',
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
<a href="{{route('site.terms')}}" class="text-dark p-2">{{__('site.terms')}}</a>
|
<a href="{{route('site.terms')}}" class="text-dark p-2">{{__('site.terms')}}</a>
|
||||||
<a href="{{route('site.privacy')}}" class="text-dark p-2">{{__('site.privacy')}}</a>
|
<a href="{{route('site.privacy')}}" class="text-dark p-2">{{__('site.privacy')}}</a>
|
||||||
<a href="{{route('site.language')}}" class="text-dark p-2">{{__('site.language')}}</a>
|
<a href="{{route('site.language')}}" class="text-dark p-2">{{__('site.language')}}</a>
|
||||||
|
<a href="{{route('site.legal')}}" class="text-dark p-2">{{__('site.legal')}}</a>
|
||||||
@if(config_cache('instance.has_legal_notice'))
|
@if(config_cache('instance.has_legal_notice'))
|
||||||
<a href="/site/legal-notice" class="text-dark p-2">Legal Notice</a>
|
<a href="/site/legal-notice" class="text-dark p-2">Legal Notice</a>
|
||||||
@endif
|
@endif
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
@extends('layouts.app')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="container mt-5">
|
||||||
|
<div class="col-12">
|
||||||
|
<p class="font-weight-bold text-lighter text-uppercase">Legal Notice</p>
|
||||||
|
<div class="card border shadow-none">
|
||||||
|
<div class="card-body p-md-5 text-justify mx-md-3">
|
||||||
|
@if($page && $page->content)
|
||||||
|
{!! $page->content !!}
|
||||||
|
@else
|
||||||
|
<div class="terms">
|
||||||
|
<h5 class="font-weight-bold">Legal</h5>
|
||||||
|
<p class="">Hey</p>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@push('meta')
|
||||||
|
<meta property="og:description" content="Terms of Use">
|
||||||
|
@endpush
|
|
@ -575,6 +575,7 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact
|
||||||
Route::view('open-source', 'site.opensource')->name('site.opensource');
|
Route::view('open-source', 'site.opensource')->name('site.opensource');
|
||||||
Route::view('banned-instances', 'site.bannedinstances')->name('site.bannedinstances');
|
Route::view('banned-instances', 'site.bannedinstances')->name('site.bannedinstances');
|
||||||
Route::get('terms', 'SiteController@terms')->name('site.terms');
|
Route::get('terms', 'SiteController@terms')->name('site.terms');
|
||||||
|
Route::get('legal', 'SiteController@legal')->name('site.legal');
|
||||||
Route::get('privacy', 'SiteController@privacy')->name('site.privacy');
|
Route::get('privacy', 'SiteController@privacy')->name('site.privacy');
|
||||||
Route::view('platform', 'site.platform')->name('site.platform');
|
Route::view('platform', 'site.platform')->name('site.platform');
|
||||||
Route::view('language', 'site.language')->name('site.language');
|
Route::view('language', 'site.language')->name('site.language');
|
||||||
|
|
Loading…
Reference in New Issue