From 47deda23e52b03cd13b3337ef772a1b476b21a83 Mon Sep 17 00:00:00 2001 From: GeckoBoy84 <67899387+GeckoBoy84@users.noreply.github.com> Date: Mon, 16 Jan 2023 07:13:13 +0000 Subject: [PATCH 01/11] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1ebf3b22..6b83639d 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ - Stripe Integration - Referral System - Ticket System -- Upgrade/Downgrade Server Ressources +- Upgrade/Downgrade Server Resources - Store (credit system with hourly billing and invoices) - Email Verification - Audit Log - Admin Dashboard - User/Server Management -- Customizable server plans +- Customisable server plans - Vouchers - and so much more! From b8516c423edff638a40a851f56e708ecb1bbf222 Mon Sep 17 00:00:00 2001 From: 1day2die Date: Mon, 16 Jan 2023 18:30:25 +0100 Subject: [PATCH 02/11] fix user factory, fix loadingtimes of users table --- database/factories/UserFactory.php | 1 - themes/default/views/admin/users/index.blade.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index c5a9ff7b..b0ae6fc6 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -22,7 +22,6 @@ class UserFactory extends Factory 'email_verified_at' => $this->faker->dateTimeBetween('-30 days', now()), 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 'remember_token' => Str::random(10), - 'email_verified' => true, ]; } } diff --git a/themes/default/views/admin/users/index.blade.php b/themes/default/views/admin/users/index.blade.php index 530f47de..b6be7a74 100644 --- a/themes/default/views/admin/users/index.blade.php +++ b/themes/default/views/admin/users/index.blade.php @@ -77,7 +77,7 @@ url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{config("SETTINGS::LOCALE:DATATABLES")}}.json' }, processing: true, - serverSide: false, //increases loading times too much? change back to "true" if it does + serverSide: true, //why was this set to false before? increased loadingtimes by 10 seconds stateSave: true, ajax: "{{route('admin.users.datatable')}}", order: [[ 11, "asc" ]], From a088b81366cb9836966626b440dcc7d0114f744e Mon Sep 17 00:00:00 2001 From: 1day2die Date: Mon, 16 Jan 2023 18:53:09 +0100 Subject: [PATCH 03/11] remove unused imports --- app/Http/Controllers/Admin/PaymentController.php | 9 +++------ app/Http/Controllers/Auth/LoginController.php | 1 - app/Http/Controllers/Auth/RegisterController.php | 1 - app/Http/Controllers/ServerController.php | 1 - app/Providers/EventServiceProvider.php | 1 - 5 files changed, 3 insertions(+), 10 deletions(-) diff --git a/app/Http/Controllers/Admin/PaymentController.php b/app/Http/Controllers/Admin/PaymentController.php index 96c82664..ba60d20f 100644 --- a/app/Http/Controllers/Admin/PaymentController.php +++ b/app/Http/Controllers/Admin/PaymentController.php @@ -6,7 +6,6 @@ use App\Events\UserUpdateCreditsEvent; use App\Http\Controllers\Controller; use App\Models\PartnerDiscount; use App\Models\Payment; -use App\Models\Settings; use App\Models\ShopProduct; use App\Models\User; use App\Notifications\ConfirmPaymentNotification; @@ -20,7 +19,6 @@ use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; -use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Storage; use LaravelDaily\Invoices\Classes\Buyer; use LaravelDaily\Invoices\Classes\InvoiceItem; @@ -32,7 +30,6 @@ use PayPalCheckoutSdk\Core\SandboxEnvironment; use PayPalCheckoutSdk\Orders\OrdersCaptureRequest; use PayPalCheckoutSdk\Orders\OrdersCreateRequest; use PayPalHttp\HttpException; -use Stripe\Stripe; use Symfony\Component\Intl\Currencies; class PaymentController extends Controller @@ -75,7 +72,7 @@ class PaymentController extends Controller //dd($shopProduct); //check if the product is really free or the discount is 100% if($shopProduct->getTotalPrice()>0) return redirect()->route('home')->with('error', __('An error ocured. Please try again.')); - + //give product /** @var User $user */ $user = Auth::user(); @@ -90,7 +87,7 @@ class PaymentController extends Controller } //skipped the referral commission, because the user did not pay anything. - + //not giving client role //store payment @@ -811,7 +808,7 @@ class PaymentController extends Controller return datatables($query) ->addColumn('user', function (Payment $payment) { - return + return ($payment->user)?''.$payment->user->name.'':__('Unknown user'); }) diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index e809da37..848db48a 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -3,7 +3,6 @@ namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; -use App\Models\User; use App\Providers\RouteServiceProvider; use Illuminate\Foundation\Auth\AuthenticatesUsers; use Illuminate\Http\Request; diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 0aabb601..465535bf 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -12,7 +12,6 @@ use Illuminate\Foundation\Auth\RegistersUsers; use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Hash; -use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Str; use Illuminate\Validation\ValidationException; diff --git a/app/Http/Controllers/ServerController.php b/app/Http/Controllers/ServerController.php index 8ddd22a6..656064c3 100644 --- a/app/Http/Controllers/ServerController.php +++ b/app/Http/Controllers/ServerController.php @@ -9,7 +9,6 @@ use App\Models\Nest; use App\Models\Node; use App\Models\Product; use App\Models\Server; -use App\Models\Settings; use App\Notifications\ServerCreationError; use Exception; use Illuminate\Database\Eloquent\Builder; diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index b4befadf..cc8427ff 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -8,7 +8,6 @@ use App\Listeners\Verified; use Illuminate\Auth\Events\Registered; use Illuminate\Auth\Listeners\SendEmailVerificationNotification; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; -use Illuminate\Support\Facades\Event; use SocialiteProviders\Manager\SocialiteWasCalled; class EventServiceProvider extends ServiceProvider From 6e6102d12544cc402a6ede590bbf80ee20dbda8a Mon Sep 17 00:00:00 2001 From: GeckoBoy84 Date: Mon, 16 Jan 2023 20:46:07 +0000 Subject: [PATCH 04/11] Show minimum required credits --- lang/en.json | 1 + themes/default/views/servers/create.blade.php | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lang/en.json b/lang/en.json index 2dcc8acb..d3ac3920 100644 --- a/lang/en.json +++ b/lang/en.json @@ -535,6 +535,7 @@ "MB": "MB", "MySQL": "MySQL", "ports": "ports", + "to create this server": "to create this server", "Server can´t fit on this node": "Server can´t fit on this node", "Not enough": "Not enough", "Create server": "Create server", diff --git a/themes/default/views/servers/create.blade.php b/themes/default/views/servers/create.blade.php index a24d2284..fd62ca86 100644 --- a/themes/default/views/servers/create.blade.php +++ b/themes/default/views/servers/create.blade.php @@ -206,6 +206,11 @@ ({{ __('ports') }}) +
  • + + {{ __('Required') }} {{ CREDITS_DISPLAY_NAME }} {{ __('to create this server') }} + +
  • From e1b4a1b9b84e316fe7340ed56e0e916e96c4d4cd Mon Sep 17 00:00:00 2001 From: GeckoBoy84 Date: Mon, 16 Jan 2023 20:53:17 +0000 Subject: [PATCH 05/11] Add more info to create partner page --- themes/default/views/admin/partners/create.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/default/views/admin/partners/create.blade.php b/themes/default/views/admin/partners/create.blade.php index c2a56427..f635e51b 100644 --- a/themes/default/views/admin/partners/create.blade.php +++ b/themes/default/views/admin/partners/create.blade.php @@ -58,7 +58,7 @@
    From d42c25bf565abb87052460647ae39116535d1fda Mon Sep 17 00:00:00 2001 From: GeckoBoy84 Date: Mon, 16 Jan 2023 21:34:37 +0000 Subject: [PATCH 06/11] -1 shows the actual value --- themes/default/views/servers/create.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/default/views/servers/create.blade.php b/themes/default/views/servers/create.blade.php index fd62ca86..7ec7f2cc 100644 --- a/themes/default/views/servers/create.blade.php +++ b/themes/default/views/servers/create.blade.php @@ -209,7 +209,7 @@
  • {{ __('Required') }} {{ CREDITS_DISPLAY_NAME }} {{ __('to create this server') }} - +
  • From ca3b6cbb634bf4a4829e5ac4c842912622514328 Mon Sep 17 00:00:00 2001 From: GeckoBoy84 Date: Mon, 16 Jan 2023 21:58:10 +0000 Subject: [PATCH 07/11] Capitalise Imprint inline with TOS and Privacy Policy Capitalisation --- lang/en.json | 2 +- themes/default/views/admin/settings/tabs/system.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/en.json b/lang/en.json index d3ac3920..3cf6b1bc 100644 --- a/lang/en.json +++ b/lang/en.json @@ -324,7 +324,7 @@ "System": "System", "Show Terms of Service": "Show Terms of Service", "Show the TOS link in the footer of every page.
    Edit the content in \"resources\/views\/information\/tos-content.blade.php\"": "Show the TOS link in the footer of every page.
    Edit the content in \"resources\/views\/information\/tos-content.blade.php\"", - "Show imprint": "Show imprint", + "Show Imprint": "Show Imprint", "Show the imprint link in the footer of every page.
    Edit the content in \"resources\/views\/information\/imprint-content.blade.php\"": "Show the imprint link in the footer of every page.
    Edit the content in \"resources\/views\/information\/imprint-content.blade.php\"", "Show Privacy Policy": "Show Privacy Policy", "Show the privacy policy link in the footer of every page.
    Edit the content in \"resources\/views\/information\/privacy-content.blade.php\"": "Show the privacy policy link in the footer of every page.
    Edit the content in \"resources\/views\/information\/privacy-content.blade.php\"", diff --git a/themes/default/views/admin/settings/tabs/system.blade.php b/themes/default/views/admin/settings/tabs/system.blade.php index fa983254..dc1231af 100644 --- a/themes/default/views/admin/settings/tabs/system.blade.php +++ b/themes/default/views/admin/settings/tabs/system.blade.php @@ -33,7 +33,7 @@ - +
    ') }}" From f0e614fa2a5d95a7ade1d92f5bf9a2d09dada947 Mon Sep 17 00:00:00 2001 From: GeckoBoy84 Date: Mon, 16 Jan 2023 22:15:35 +0000 Subject: [PATCH 08/11] Show Unsuspended/Total Servers --- themes/default/views/admin/overview/index.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/default/views/admin/overview/index.blade.php b/themes/default/views/admin/overview/index.blade.php index 20fef894..062b50c6 100644 --- a/themes/default/views/admin/overview/index.blade.php +++ b/themes/default/views/admin/overview/index.blade.php @@ -59,7 +59,7 @@
    {{__('Servers')}} - {{$counters['servers']->total}} + {{$counters['servers']->active}}/{{$counters['servers']->total}}
    From a5ec206a089c513bfbc0a93a571a867969dd7385 Mon Sep 17 00:00:00 2001 From: 1day2die Date: Tue, 17 Jan 2023 14:28:13 +0100 Subject: [PATCH 09/11] fix installer php version --- public/install/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/install/functions.php b/public/install/functions.php index 7eed0735..ed983c57 100644 --- a/public/install/functions.php +++ b/public/install/functions.php @@ -4,7 +4,7 @@ $required_extentions = ['openssl', 'gd', 'mysql', 'PDO', 'mbstring', 'tokenizer' $requirements = [ 'minPhp' => '8.1', - 'maxPhp' => '8.1.9', // This version is not supported + 'maxPhp' => '8.2', // This version is not supported 'mysql' => '5.7.22', ]; From 3b2a851f4f50f45f41bfb400ff13080743c11a91 Mon Sep 17 00:00:00 2001 From: IceToast <> Date: Wed, 18 Jan 2023 23:50:52 +0100 Subject: [PATCH 10/11] =?UTF-8?q?fix:=20=F0=9F=9A=91=EF=B8=8F=20Create=20m?= =?UTF-8?q?ultiple=20servers=20when=20clicking=20submit=20multiple=20times?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/default/views/servers/create.blade.php | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/themes/default/views/servers/create.blade.php b/themes/default/views/servers/create.blade.php index 7ec7f2cc..1aec8f0d 100644 --- a/themes/default/views/servers/create.blade.php +++ b/themes/default/views/servers/create.blade.php @@ -23,10 +23,11 @@ -
    +
    -
    + @csrf
    @@ -227,13 +228,18 @@ x-text="product.price + ' {{ CREDITS_DISPLAY_NAME }}'">
    -
    - +
    + +
    +
    +
    @@ -251,7 +257,6 @@