From b8963bb345f9e5fd8a65a61b05dcb6c06c3be041 Mon Sep 17 00:00:00 2001
From: originalaidn <45371311+originalaidn@users.noreply.github.com>
Date: Fri, 18 Oct 2024 17:14:02 +0200
Subject: [PATCH 01/22] editing appeal's reason
---
resources/views/appeals/list.blade.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/resources/views/appeals/list.blade.php b/resources/views/appeals/list.blade.php
index c9e629a..250a00e 100755
--- a/resources/views/appeals/list.blade.php
+++ b/resources/views/appeals/list.blade.php
@@ -36,7 +36,11 @@
{{ $appeal->ban_type }} |
{{ $appeal->ban_type == 'Steam ID' ? $appeal->steamid : $appeal->ip }} |
{{ $appeal->name }} |
- {{ Str::length($appeal->reason) > 35 ? substr($appeal->reason, 0, 35) . '...' : $appeal->reason }} |
+
+
+
+
+ |
{{ $appeal->email }} |
From 32a83d84f6276ac3bd55ce82f49020b55e1a8bdd Mon Sep 17 00:00:00 2001
From: originalaidn <45371311+originalaidn@users.noreply.github.com>
Date: Fri, 18 Oct 2024 18:17:40 +0200
Subject: [PATCH 02/22] adding appeals, reports disable method and after
updating settings excepting the _token
---
.env.example | 2 ++
.env.vercel.example | 3 +-
app/Http/Controllers/SettingsController.php | 7 +++-
.../components/menu/vertical-menu.blade.php | 8 +++++
resources/views/settings/index.blade.php | 2 +-
routes/web.php | 32 ++++++++++---------
6 files changed, 36 insertions(+), 18 deletions(-)
diff --git a/.env.example b/.env.example
index 40479a1..b68204f 100755
--- a/.env.example
+++ b/.env.example
@@ -65,6 +65,8 @@ DEFAULT_THEME_DARK = true
RANKS="Disabled"
VIP="Disabled"
SKINS="Disabled"
+REPORTS="Disabled"
+APPEALS="Disabled"
#============MODULES DB===============
DB_HOST_VIP=
DB_DATABASE_VIP=
diff --git a/.env.vercel.example b/.env.vercel.example
index 1df4616..130199e 100755
--- a/.env.vercel.example
+++ b/.env.vercel.example
@@ -13,7 +13,8 @@
RANKS="Disabled"
VIP="Disabled"
SKINS="Disabled"
-
+REPORTS="Disabled"
+APPEALS="Disabled"
#-------------------- MODULES DB ----------------------
DB_HOST_VIP=
DB_DATABASE_VIP=
diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php
index adc2971..ac67c78 100755
--- a/app/Http/Controllers/SettingsController.php
+++ b/app/Http/Controllers/SettingsController.php
@@ -27,6 +27,8 @@ public function showSettings()
'RANKS' => env('RANKS'),
'VIP' => env('VIP'),
'SKINS' => env('SKINS'),
+ 'REPORTS' => env('REPORTS'),
+ 'APPEALS' => env('APPEALS'),
'K4LegacySupport' => env('K4LegacySupport')
],
'VIP Module' => [
@@ -57,13 +59,16 @@ public function showSettings()
public function updateSettings(Request $request)
{
- $data = $request->all();
+ $data = $request->except(['_token']);
// Update the .env file or settings storage
foreach ($data as $key => $value) {
$this->setEnvironmentValue($key, $value);
}
+ \Artisan::call('config:clear');
+ \Artisan::call('cache:clear');
+
return redirect()->back()->with('success', 'Settings updated successfully.');
}
diff --git a/resources/views/components/menu/vertical-menu.blade.php b/resources/views/components/menu/vertical-menu.blade.php
index 4e21966..40d28a5 100755
--- a/resources/views/components/menu/vertical-menu.blade.php
+++ b/resources/views/components/menu/vertical-menu.blade.php
@@ -119,6 +119,7 @@ class="feather feather-chevron-right">
+ @if(env('APPEALS') == 'Enabled')
@@ -126,6 +127,8 @@ class="feather feather-chevron-right">
+ @endif
+ @if(env('REPORTS') == 'Enabled')
@@ -133,7 +136,9 @@ class="feather feather-chevron-right">
+ @endif
@if(in_array(true, $onlyManageAdminPerms))
+ @if(env('APPEALS') == 'Enabled')
@@ -152,6 +157,8 @@ class="feather feather-message-circle badge-icon">
+ @endif
+ @if(env('REPORTS') == 'Enabled')
@@ -170,6 +177,7 @@ class="feather feather-message-circle badge-icon">
+ @endif
@endif
diff --git a/resources/views/settings/index.blade.php b/resources/views/settings/index.blade.php
index a2a763e..d9bc66f 100755
--- a/resources/views/settings/index.blade.php
+++ b/resources/views/settings/index.blade.php
@@ -31,7 +31,7 @@
@foreach($group as $key => $value)
- @if(in_array($key, ['RANKS', 'VIP', 'SKINS']))
+ @if(in_array($key, ['RANKS', 'VIP', 'SKINS' 'REPORTS', 'APPEALS']))
|