瀏覽代碼

added TOS

1day2die 2 年之前
父節點
當前提交
d02d6e78ae

+ 2 - 0
app/Classes/Settings/System.php

@@ -48,6 +48,7 @@ public function checkPteroClientkey(){
             "enable-disable-servers" => "string",
             "show-imprint" => "string",
             "show-privacy" => "string",
+            "show-tos" => "string",
         ]);
 
         $validator->after(function ($validator) use ($request) {
@@ -91,6 +92,7 @@ public function checkPteroClientkey(){
             "SETTINGS::SYSTEM:CREATION_OF_NEW_USERS" => "enable-disable-new-users",
             "SETTINGS::SYSTEM:SHOW_IMPRINT" => "show-imprint",
             "SETTINGS::SYSTEM:SHOW_PRIVACY" => "show-privacy",
+            "SETTINGS::SYSTEM:SHOW_TOS" => "show-tos",
         ];
 
 

+ 13 - 0
resources/views/admin/settings/tabs/system.blade.php

@@ -13,6 +13,19 @@
                     </div>
                 </div>
                 <div class="form-group">
+                    <div class="custom-control mb-1 p-0">
+                        <div class="col m-0 p-0 d-flex justify-content-between align-items-center">
+                            <div>
+                                <input value="true" id="show-tos" name="show-tos"
+                                       {{ config('SETTINGS::SYSTEM:SHOW_TOS') == 'true' ? 'checked' : '' }}
+                                       type="checkbox">
+                                <label for="show-tos">{{ __('Show Terms of Service') }} </label>
+                            </div>
+                            <i data-toggle="popover" data-trigger="hover" data-html="true"
+                               data-content="{{ __('Show the TOS link in the footer of every page. <br> Edit the content in "resources/views/information/tos-content.blade.php"') }}"
+                               class="fas fa-info-circle"></i>
+                        </div>
+                    </div>
                     <div class="custom-control mb-1 p-0">
                         <div class="col m-0 p-0 d-flex justify-content-between align-items-center">
                             <div>

+ 3 - 0
resources/views/auth/login.blade.php

@@ -131,6 +131,9 @@
                 @if (config('SETTINGS::SYSTEM:SHOW_PRIVACY'))
                     <a href="{{ route('privacy') }}"><strong>{{ __('Privacy') }}</strong></a>
                 @endif
+                @if (config('SETTINGS::SYSTEM:SHOW_TOS'))
+                    | <a href="{{ route('tos') }}"><strong>{{ __('Terms of Service') }}</strong></a>
+                @endif
             </div>
         </div>
     </body>

+ 5 - 2
resources/views/auth/register.blade.php

@@ -171,10 +171,13 @@
         <div class="fixed-bottom ">
             <div class="container text-center">
                 @if (config('SETTINGS::SYSTEM:SHOW_IMPRINT'))
-                    <a href="{{ route('imprint') }}"><strong>{{ __('Imprint') }}</strong></a> |
+                    <a target="_blank" href="{{ route('imprint') }}"><strong>{{ __('Imprint') }}</strong></a> |
                 @endif
                 @if (config('SETTINGS::SYSTEM:SHOW_PRIVACY'))
-                    <a href="{{ route('privacy') }}"><strong>{{ __('Privacy') }}</strong></a>
+                    <a target="_blank" href="{{ route('privacy') }}"><strong>{{ __('Privacy') }}</strong></a>
+                @endif
+                @if (config('SETTINGS::SYSTEM:SHOW_TOS'))
+                    | <a target="_blank" href="{{ route('tos') }}"><strong>{{ __('Terms of Service') }}</strong></a>
                 @endif
             </div>
         </div>

文件差異過大導致無法顯示
+ 273 - 0
resources/views/information/tos-content.blade.php


+ 21 - 0
resources/views/information/tos.blade.php

@@ -0,0 +1,21 @@
+@extends('layouts.app')
+
+@section('content')
+
+    <body class="dark-mode">
+    <div class="container privacy-card">
+        <div class="row">
+            <div class="col-md-10" style="height: 20px;"></div>
+        </div>
+        <div class="row justify-content-center">
+            <div class="col-md-10">
+                <div class="card">
+                    <div class="card-header">{{ __('Terms of Service') }}</div>
+                    <div class="card-body">
+                        @include('information.tos-content')
+                    </div>
+                </div>
+            </div>
+        </div>
+    </body>
+@endsection

+ 5 - 2
resources/views/layouts/main.blade.php

@@ -429,11 +429,14 @@
             {{-- Show imprint and privacy link --}}
             <div class="float-right d-none d-sm-inline-block">
                 @if (config('SETTINGS::SYSTEM:SHOW_IMPRINT'))
-                    <a href="{{ route('imprint') }}"><strong>{{ __('Imprint') }}</strong></a> |
+                    <a target="_blank" href="{{ route('imprint') }}"><strong>{{ __('Imprint') }}</strong></a> |
                 @endif
                 @if (config('SETTINGS::SYSTEM:SHOW_PRIVACY'))
-                    <a href="{{ route('privacy') }}"><strong>{{ __('Privacy') }}</strong></a>
+                    <a target="_blank" href="{{ route('privacy') }}"><strong>{{ __('Privacy') }}</strong></a>
                 @endif
+                    @if (config('SETTINGS::SYSTEM:SHOW_TOS'))
+                       | <a target="_blank" href="{{ route('tos') }}"><strong>{{ __('Terms of Service') }}</strong></a>
+                    @endif
             </div>
         </footer>
 

+ 4 - 2
routes/web.php

@@ -59,7 +59,9 @@ Route::get('/privacy', function () {
 Route::get('/imprint', function () {
     return view('information.imprint');
 })->name('imprint');
-
+Route::get('/tos', function () {
+    return view('information.tos');
+})->name('tos');
 
 Route::middleware(['auth', 'checkSuspended'])->group(function () {
     #resend verification email
@@ -215,4 +217,4 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
     });
 
     Route::get('/home', [HomeController::class, 'index'])->name('home');
-});
+});

部分文件因文件數量過多而無法顯示