This commit is contained in:
Dennis 2023-02-05 18:58:10 +01:00 committed by GitHub
commit 6b45719e79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 3626 additions and 23364 deletions

View file

@ -1,38 +0,0 @@
---
name: "\U0001F41B Bug report"
about: Create a report to help us improve
title: ''
labels: bug
assignees: RamonRobben, AVMG20
---
**Describe the bug 🐛**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View file

@ -1,31 +0,0 @@
---
name: "\U0001F680 Feature request"
about: Suggest a feature or idea for this project
title: "[feature] "
labels: enhancement
assignees: RamonRobben, AVMG20
---
# 🚀 Feature Request
### Is your proposal related to a problem?
*Provide a clear and concise description of what the problem is.
For example, "I can't change x and it makes me have to do manual work"*
(Write your answer here.)
### Describe the solution you'd like
*Provide a clear and concise description of what you want to happen.
For Example, "Automate the changing of x so I don't have to do it manually"*
(Describe your proposed solution here.)
### Additional context
*Is there anything else you can add about the proposal?
You might want to link to related issues here, if you haven't already.*
(Write your answer here.)

43
.github/ISSUE_TEMPLATE/bug.yml vendored Normal file
View file

@ -0,0 +1,43 @@
name: "\U0001F41B Bug report"
description: Create a report to help us improve
title: "[Bug]: "
labels: ["bug"]
body:
- type: textarea
id: what-happened
attributes:
label: What is your request about?
description: |
Provide a clear description of what the problem is.
validations:
required: true
- type: dropdown
id: version
attributes:
label: Branch
description: What branch are you on?
multiple: false
options:
- "main"
- "development"
validations:
required: true
- type: textarea
id: solution
attributes:
label: Solution idea
description: |
Provide a clear description of how you want this bug to be fixed (Optional)
validations:
required: false
- type: textarea
id: controlpanel-logs
attributes:
label: Controlpanel Logs
description: Please copy and paste your laravel-log output. You may also provide a link to it using the following command `tail -n 100 /var/www/controlpanel/storage/logs/laravel.log | nc pteropaste.com 99`
render: Shell
- type: textarea
id: additional-info
attributes:
label: Additional Info
description: Anything else that could be used to narrow down the issue, like your config.

24
.github/ISSUE_TEMPLATE/feature.yml vendored Normal file
View file

@ -0,0 +1,24 @@
name: "\U0001F680 Feature request"
description: Suggest a feature or idea for this project
title: "[Feature] "
labels: ["feature"]
body:
- type: textarea
id: feature-description
attributes:
label: Feature Description
description: Provide a clear description of what your idea is all about, what it tries to solve and why it should be implemented.
validations:
required: true
- type: textarea
id: solution
attributes:
label: Solution Idea
description: Provide a clear description how the idea should be implemented and why.
validations:
required: true
- type: textarea
id: additional-info
attributes:
label: Additional Info
description: Anything else that could be used to implement your idea.

View file

@ -3,6 +3,7 @@
- PayPal Integration
- Stripe Integration
- Referral System
- Partner System
- Ticket System
- Upgrade/Downgrade Server Resources
- Store (credit system with hourly billing and invoices)
@ -12,27 +13,29 @@
- User/Server Management
- Customisable server plans
- Vouchers
- Alert System
- Theme Support
- and so much more!
# ControlPanel-gg
![controlpanel](https://user-images.githubusercontent.com/45005889/123518824-06b05000-d6a8-11eb-91b9-d1ed36bd2317.png)
![controlpanel](https://user-images.githubusercontent.com/67899387/214684708-739c1d21-06e8-4dec-a4f1-81533a46cc7e.png)
![](https://img.shields.io/endpoint?label=v0.8%20Installations&url=https%3A%2F%2Fmarket.controlpanel.gg%2Fcallhome.php%3Fgetinstalls)
![](https://img.shields.io/endpoint?label=v0.9%20Installations&url=https%3A%2F%2Fmarket.controlpanel.gg%2Fcallhome.php%3Fgetinstalls)
![](https://img.shields.io/badge/Overall%20Installations-3500%2B-green)
![](https://img.shields.io/github/stars/ControlPanel-gg/dashboard) ![](https://img.shields.io/github/forks/ControlPanel-gg/dashboard) ![](https://img.shields.io/github/tag/ControlPanel-gg/dashboard) [![Crowdin](https://badges.crowdin.net/controlpanelgg/localized.svg)](https://crowdin.com/project/controlpanelgg) ![](https://img.shields.io/github/issues/ControlPanel-gg/dashboard) ![](https://img.shields.io/github/license/ControlPanel-gg/dashboard) ![](https://img.shields.io/discord/787829714483019826)
## About
ControlPanel's Dashboard is a dashboard application designed to offer clients a management tool to manage their pterodactyl servers. This dashboard comes with a credit-based billing solution that credits users hourly for each server they have and suspends them if they run out of credits.
This dashboard offers an easy to use and free billing solution for all starting and experienced hosting providers. This dashboard has many customization options and added discord 0auth verification to offer a solid link between your discord server and your dashboard. You can check our Demo here ([Demo](https://demo.controlpanel.gg "Demo"))
This dashboard offers an easy to use and free billing solution for all starting and experienced hosting providers. This dashboard has many customisation options and added discord Oauth verification to offer a solid link between your discord server and your dashboard. You can check our [Demo here](https://demo.controlpanel.gg "Demo").
### [Installation](https://controlpanel.gg/docs/intro "Installation")
### [Updating](https://controlpanel.gg/docs/Installation/updating "Updating")
### [Discord](https://discord.gg/4Y6HjD2uyU "discord")
### [Discord](https://discord.gg/4Y6HjD2uyU "Discord")
### [Contributing](https://controlpanel.gg/docs/Contributing/contributing "Contributing")
@ -43,15 +46,22 @@ This dashboard offers an easy to use and free billing solution for all starting
# Preview
### Server Creation
![image](https://user-images.githubusercontent.com/8725848/171575021-bc248f12-2aba-44e8-82aa-bdc907b1d3fc.png)
![image](https://user-images.githubusercontent.com/67899387/214687234-d1ae58c0-5667-4e99-ac39-adeaabfcc7f2.png)
### Overview
![image](https://user-images.githubusercontent.com/8725848/171575809-7620ed4f-5715-420f-8c25-8bfa1c4342f7.png)
![image](https://user-images.githubusercontent.com/67899387/214685859-03c8d9e1-c685-4a07-979f-df2e88ec3931.png)
### Example server products
![image](https://user-images.githubusercontent.com/8725848/171575987-c1398ff6-83fa-4cb8-bd1f-986cee4da565.png)
![image](https://user-images.githubusercontent.com/67899387/214686950-218e1ede-6a1f-4e53-b3f4-fe1abc371a9c.png)
### Ticket System
![image](https://user-images.githubusercontent.com/8725848/184131270-9d997ebf-8965-4910-90d2-b410ae37f201.png)
![image](https://user-images.githubusercontent.com/67899387/214687123-0a3d0f8f-b53c-4b0d-869a-4d5df45f5184.png)
### Voucher System
![image](https://user-images.githubusercontent.com/67899387/214686578-ec9f0b0f-6047-4665-835f-70594b56dfd5.png)
### Partner System
![image](https://user-images.githubusercontent.com/67899387/214686321-36ba97a3-4181-4e60-9ba3-c9b318fe66a8.png)

View file

@ -50,6 +50,7 @@ class System
'pterodactyl-admin-api-key' => 'required|string',
'enable-upgrades' => 'string',
'enable-disable-servers' => 'string',
'enable-disable-new-users' => 'string',
'show-imprint' => 'string',
'show-privacy' => 'string',
'show-tos' => 'string',

View file

@ -67,7 +67,7 @@ class ChargeCreditsCommand extends Command
$server->suspend();
//add user to notify list
if (! in_array($user, $this->usersToNotify)) {
if (!in_array($user, $this->usersToNotify)) {
array_push($this->usersToNotify, $user);
}
} catch (\Exception $exception) {
@ -85,7 +85,7 @@ class ChargeCreditsCommand extends Command
*/
public function notifyUsers()
{
if (! empty($this->usersToNotify)) {
if (!empty($this->usersToNotify)) {
/** @var User $user */
foreach ($this->usersToNotify as $user) {
$this->line("<fg=yellow>Notified user:</> <fg=blue>{$user->name}</>");

View file

@ -0,0 +1,42 @@
<?php
namespace App\Console\Commands;
use App\Models\Payment;
use Illuminate\Console\Command;
class CleanupPayments extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'payments:open:clear';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Clears all payments from the database that have state "open"';
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
// delete all payments that have state "open" and are older than 1 hour
try {
Payment::where('status', 'open')->where('updated_at', '<', now()->subHour())->delete();
} catch (\Exception $e) {
$this->error('Could not delete payments: ' . $e->getMessage());
return 1;
}
$this->info('Successfully deleted all open payments');
return Command::SUCCESS;
}
}

View file

@ -4,12 +4,16 @@ namespace App\Console\Commands;
use App\Classes\Pterodactyl;
use App\Models\User;
use App\Traits\Referral;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Str;
class MakeUserCommand extends Command
{
use Referral;
/**
* The name and signature of the console command.
*
@ -37,6 +41,7 @@ class MakeUserCommand extends Command
$this->pterodactyl = $pterodactyl;
}
/**
* Execute the console command.
*
@ -78,12 +83,12 @@ class MakeUserCommand extends Command
return 0;
}
$user = User::create([
'name' => $response['first_name'],
'email' => $response['email'],
'role' => 'admin',
'password' => Hash::make($password),
'referral_code' => $this->createReferralCode(),
'pterodactyl_id' => $response['id'],
]);
@ -93,6 +98,7 @@ class MakeUserCommand extends Command
['Username', $user->name],
['Ptero-ID', $user->pterodactyl_id],
['Admin', $user->role],
['Referral code', $user->referral_code],
]);
return 1;

View file

@ -18,10 +18,11 @@ class Kernel extends ConsoleKernel
{
$schedule->command('credits:charge')->hourly();
$schedule->command('cp:versioncheck:get')->daily();
$schedule->command('payments:open:clear')->daily();
//log cronjob activity
$schedule->call(function () {
Storage::disk('logs')->put('cron.log', 'Last activity from cronjobs - '.now());
Storage::disk('logs')->put('cron.log', 'Last activity from cronjobs - ' . now());
})->everyMinute();
}
@ -32,7 +33,7 @@ class Kernel extends ConsoleKernel
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');
$this->load(__DIR__ . '/Commands');
require base_path('routes/console.php');
}

View file

@ -0,0 +1,19 @@
<?php
namespace App\Enums;
enum UsefulLinkLocation:String
{
/**
* Top bar
* Only visible in the dashboard view
*/
case topbar = "topbar";
/**
* Dashboard
* Only visible in the dashboard view
*/
case dashboard = "dashboard";
}

View file

@ -8,5 +8,6 @@ function getConfig()
"name" => "PayPal",
"description" => "PayPal payment gateway",
"RoutesIgnoreCsrf" => [],
"enabled" => (config('SETTINGS::PAYMENTS:PAYPAL:SECRET') && config('SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID')) || (config('SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET') && config('SETTINGS::PAYMENTS:PAYPAL:SANDBOX_CLIENT_ID') && env("APP_ENV") === "local"),
];
}

View file

@ -10,5 +10,6 @@ function getConfig()
"RoutesIgnoreCsrf" => [
"payment/StripeWebhooks",
],
"enabled" => config('SETTINGS::PAYMENTS:STRIPE:SECRET') && config('SETTINGS::PAYMENTS:STRIPE:CLIENT_ID'),
];
}

View file

@ -0,0 +1,42 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\File;
use Qirolab\Theme\Theme;
class LegalController extends Controller
{
/**
* Display
*
* @return View
*/
public function index()
{
$tos = File::get(Theme::path($path = 'views', "default") . '/information/tos-content.blade.php');
$privacy = File::get(Theme::path($path = 'views', "default") . '/information/privacy-content.blade.php');
$imprint = File::get(Theme::path($path = 'views', "default") . '/information/imprint-content.blade.php');
return view('admin.legal.index')->with([
"tos" => $tos,
"privacy" => $privacy,
"imprint" => $imprint,
]);
}
public function update(Request $request){
$tos = $request->tos;
$privacy = $request->privacy;
$imprint = $request->imprint;
File::put(Theme::path($path = 'views', "default") . '/information/tos-content.blade.php', $tos);
File::put(Theme::path($path = 'views', "default") . '/information/privacy-content.blade.php', $privacy);
File::put(Theme::path($path = 'views', "default") . '/information/imprint-content.blade.php', $imprint);
return back()->with("success",__("Legal pages updated"));
}
}

View file

@ -1,7 +1,8 @@
<?php
namespace App\Http\Controllers;
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\PartnerDiscount;
use App\Models\User;
use Illuminate\Http\Request;
@ -40,26 +41,19 @@ class PartnerController extends Controller
'registered_user_discount' => 'required|integer|max:100|min:0',
]);
if(PartnerDiscount::where("user_id",$request->user_id)->exists()){
return redirect()->route('admin.partners.index')->with('error', __('Partner already exists'));
}
PartnerDiscount::create($request->all());
return redirect()->route('admin.partners.index')->with('success', __('partner has been created!'));
}
/**
* Display the specified resource.
*
* @param Voucher $voucher
* @return Response
*/
public function show(Voucher $voucher)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param Voucher $voucher
* @param Partner $partner
* @return Application|Factory|View
*/
public function edit(PartnerDiscount $partner)
@ -75,7 +69,7 @@ class PartnerController extends Controller
* Update the specified resource in storage.
*
* @param Request $request
* @param Voucher $voucher
* @param Partner $partner
* @return RedirectResponse
*/
public function update(Request $request, PartnerDiscount $partner)
@ -95,7 +89,7 @@ class PartnerController extends Controller
/**
* Remove the specified resource from storage.
*
* @param Voucher $voucher
* @param Partner $partner
* @return RedirectResponse
*/
public function destroy(PartnerDiscount $partner)
@ -105,81 +99,7 @@ class PartnerController extends Controller
return redirect()->back()->with('success', __('partner has been removed!'));
}
public function users(Voucher $voucher)
{
return view('admin.vouchers.users', [
'voucher' => $voucher,
]);
}
/**
* @param Request $request
* @return JsonResponse
*
* @throws ValidationException
*/
public function redeem(Request $request)
{
//general validations
$request->validate([
'code' => 'required|exists:vouchers,code',
]);
//get voucher by code
$voucher = Voucher::where('code', '=', $request->input('code'))->firstOrFail();
//extra validations
if ($voucher->getStatus() == 'USES_LIMIT_REACHED') {
throw ValidationException::withMessages([
'code' => __('This voucher has reached the maximum amount of uses'),
]);
}
if ($voucher->getStatus() == 'EXPIRED') {
throw ValidationException::withMessages([
'code' => __('This voucher has expired'),
]);
}
if (! $request->user()->vouchers()->where('id', '=', $voucher->id)->get()->isEmpty()) {
throw ValidationException::withMessages([
'code' => __('You already redeemed this voucher code'),
]);
}
if ($request->user()->credits + $voucher->credits >= 99999999) {
throw ValidationException::withMessages([
'code' => "You can't redeem this voucher because you would exceed the limit of ".CREDITS_DISPLAY_NAME,
]);
}
//redeem voucher
$voucher->redeem($request->user());
event(new UserUpdateCreditsEvent($request->user()));
return response()->json([
'success' => "{$voucher->credits} ".CREDITS_DISPLAY_NAME.' '.__('have been added to your balance!'),
]);
}
public function usersDataTable(Voucher $voucher)
{
$users = $voucher->users();
return datatables($users)
->editColumn('name', function (User $user) {
return '<a class="text-info" target="_blank" href="'.route('admin.users.show', $user->id).'">'.$user->name.'</a>';
})
->addColumn('credits', function (User $user) {
return '<i class="fas fa-coins mr-2"></i> '.$user->credits();
})
->addColumn('last_seen', function (User $user) {
return $user->last_seen ? $user->last_seen->diffForHumans() : '';
})
->rawColumns(['name', 'credits', 'last_seen'])
->make();
}
public function dataTable()
{

View file

@ -2,6 +2,7 @@
namespace App\Http\Controllers\Admin;
use App\Events\PaymentEvent;
use App\Events\UserUpdateCreditsEvent;
use App\Http\Controllers\Controller;
use App\Models\PartnerDiscount;
@ -38,19 +39,29 @@ class PaymentController extends Controller
*/
public function checkOut(ShopProduct $shopProduct)
{
$extensions = ExtensionHelper::getAllExtensionsByNamespace('PaymentGateways');
$discount = PartnerDiscount::getDiscount();
$price = $shopProduct->price - ($shopProduct->price * $discount / 100);
// build a paymentgateways array that contains the routes for the payment gateways and the image path for the payment gateway which lays in public/images/Extensions/PaymentGateways with the extensionname in lowercase
$paymentGateways = [];
foreach ($extensions as $extension) {
$extensionName = basename($extension);
$payment = new \stdClass();
$payment->name = ExtensionHelper::getExtensionConfig($extensionName, 'name');
$payment->image = asset('images/Extensions/PaymentGateways/' . strtolower($extensionName) . '_logo.png');
$paymentGateways[] = $payment;
if ($price > 0) {
$extensions = ExtensionHelper::getAllExtensionsByNamespace('PaymentGateways');
// build a paymentgateways array that contains the routes for the payment gateways and the image path for the payment gateway which lays in public/images/Extensions/PaymentGateways with the extensionname in lowercase
foreach ($extensions as $extension) {
$extensionName = basename($extension);
if (!ExtensionHelper::getExtensionConfig($extensionName, 'enabled')) continue; // skip if not enabled
$payment = new \stdClass();
$payment->name = ExtensionHelper::getExtensionConfig($extensionName, 'name');
$payment->image = asset('images/Extensions/PaymentGateways/' . strtolower($extensionName) . '_logo.png');
$paymentGateways[] = $payment;
}
}
$discount = PartnerDiscount::getDiscount();
return view('store.checkout')->with([
'product' => $shopProduct,
@ -61,6 +72,7 @@ class PaymentController extends Controller
'taxpercent' => $shopProduct->getTaxPercent(),
'total' => $shopProduct->getTotalPrice(),
'paymentGateways' => $paymentGateways,
'productIsFree' => $price <= 0,
]);
}
@ -69,29 +81,12 @@ class PaymentController extends Controller
* @param ShopProduct $shopProduct
* @return RedirectResponse
*/
public function FreePay(ShopProduct $shopProduct)
public function handleFreeProduct(ShopProduct $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();
//not updating server limit
//update User with bought item
if ($shopProduct->type == "Credits") {
$user->increment('credits', $shopProduct->quantity);
} elseif ($shopProduct->type == "Server slots") {
$user->increment('server_limit', $shopProduct->quantity);
}
//skipped the referral commission, because the user did not pay anything.
//not giving client role
//store payment
//create a payment
$payment = Payment::create([
'user_id' => $user->id,
'payment_id' => uniqid(),
@ -108,6 +103,7 @@ class PaymentController extends Controller
]);
event(new UserUpdateCreditsEvent($user));
event(new PaymentEvent($user, $payment, $shopProduct));
//not sending an invoice
@ -120,6 +116,12 @@ class PaymentController extends Controller
$product = ShopProduct::find($request->product_id);
$paymentGateway = $request->payment_method;
// on free products, we don't need to use a payment gateway
$realPrice = $product->price - ($product->price * PartnerDiscount::getDiscount() / 100);
if ($realPrice <= 0) {
return $this->handleFreeProduct($product);
}
return redirect()->route('payment.' . $paymentGateway . 'Pay', ['shopProduct' => $product->id]);
}

View file

@ -22,7 +22,13 @@ class SettingsController extends Controller
//Get all tabs as laravel view paths
$tabs = [];
foreach (glob(Theme::getViewPaths()[0] . '/admin/settings/tabs/*.blade.php') as $filename) {
if(file_exists(Theme::getViewPaths()[0] . '/admin/settings/tabs/')){
$tabspath = glob(Theme::getViewPaths()[0] . '/admin/settings/tabs/*.blade.php');
}else{
$tabspath = glob(Theme::path($path = 'views', $themeName = 'default').'/admin/settings/tabs/*.blade.php');
}
foreach ($tabspath as $filename) {
$tabs[] = 'admin.settings.tabs.'.basename($filename, '.blade.php');
}

View file

@ -2,6 +2,7 @@
namespace App\Http\Controllers\Admin;
use App\Enums\UsefulLinkLocation;
use App\Http\Controllers\Controller;
use App\Models\UsefulLink;
use Illuminate\Contracts\Foundation\Application;
@ -30,7 +31,8 @@ class UsefulLinkController extends Controller
*/
public function create()
{
return view('admin.usefullinks.create');
$positions = UsefulLinkLocation::cases();
return view('admin.usefullinks.create')->with('positions', $positions);
}
/**
@ -48,7 +50,14 @@ class UsefulLinkController extends Controller
'description' => 'required|string|max:2000',
]);
UsefulLink::create($request->all());
UsefulLink::create([
'icon' => $request->icon,
'title' => $request->title,
'link' => $request->link,
'description' => $request->description,
'position' => implode(",",$request->position),
]);
return redirect()->route('admin.usefullinks.index')->with('success', __('link has been created!'));
}
@ -72,8 +81,10 @@ class UsefulLinkController extends Controller
*/
public function edit(UsefulLink $usefullink)
{
$positions = UsefulLinkLocation::cases();
return view('admin.usefullinks.edit', [
'link' => $usefullink,
'positions' => $positions,
]);
}
@ -93,7 +104,13 @@ class UsefulLinkController extends Controller
'description' => 'required|string|max:2000',
]);
$usefullink->update($request->all());
$usefullink->update([
'icon' => $request->icon,
'title' => $request->title,
'link' => $request->link,
'description' => $request->description,
'position' => implode(",",$request->position),
]);
return redirect()->route('admin.usefullinks.index')->with('success', __('link has been updated!'));
}

View file

@ -8,6 +8,7 @@ use App\Http\Controllers\Controller;
use App\Models\DiscordUser;
use App\Models\User;
use App\Notifications\ReferralNotification;
use App\Traits\Referral;
use Carbon\Carbon;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
@ -27,6 +28,8 @@ use Spatie\QueryBuilder\QueryBuilder;
class UserController extends Controller
{
use Referral;
const ALLOWED_INCLUDES = ['servers', 'notifications', 'payments', 'vouchers', 'discordUser'];
const ALLOWED_FILTERS = ['name', 'server_limit', 'email', 'pterodactyl_id', 'role', 'suspended'];
@ -92,7 +95,7 @@ class UserController extends Controller
//Update Users Password on Pterodactyl
//Username,Mail,First and Lastname are required aswell
$response = Pterodactyl::client()->patch('/application/users/'.$user->pterodactyl_id, [
$response = Pterodactyl::client()->patch('/application/users/' . $user->pterodactyl_id, [
'username' => $request->name,
'first_name' => $request->name,
'last_name' => $request->name,
@ -229,7 +232,7 @@ class UserController extends Controller
$discordUser = DiscordUser::find($id);
$user = $discordUser ? $discordUser->user : User::findOrFail($id);
if (! $user->isSuspended()) {
if (!$user->isSuspended()) {
throw ValidationException::withMessages([
'error' => 'You cannot unsuspend an User who is not suspended.',
]);
@ -240,21 +243,6 @@ class UserController extends Controller
return $user;
}
/**
* Create a unique Referral Code for User
*
* @return string
*/
protected function createReferralCode()
{
$referralcode = STR::random(8);
if (User::where('referral_code', '=', $referralcode)->exists()) {
$this->createReferralCode();
}
return $referralcode;
}
/**
* @throws ValidationException
*/
@ -267,7 +255,7 @@ class UserController extends Controller
]);
// Prevent the creation of new users via API if this is enabled.
if (! config('SETTINGS::SYSTEM:CREATION_OF_NEW_USERS', 'true')) {
if (!config('SETTINGS::SYSTEM:CREATION_OF_NEW_USERS', 'true')) {
throw ValidationException::withMessages([
'error' => 'The creation of new users has been blocked by the system administrator.',
]);
@ -305,7 +293,7 @@ class UserController extends Controller
'pterodactyl_id' => $response->json()['attributes']['id'],
]);
//INCREMENT REFERRAL-USER CREDITS
if (! empty($request->input('referral_code'))) {
if (!empty($request->input('referral_code'))) {
$ref_code = $request->input('referral_code');
$new_user = $user->id;
if ($ref_user = User::query()->where('referral_code', '=', $ref_code)->first()) {

View file

@ -7,11 +7,13 @@ use App\Http\Controllers\Controller;
use App\Models\User;
use App\Notifications\ReferralNotification;
use App\Providers\RouteServiceProvider;
use App\Traits\Referral;
use Carbon\Carbon;
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;
@ -29,7 +31,7 @@ class RegisterController extends Controller
|
*/
use RegistersUsers;
use RegistersUsers, Referral;
/**
* Where to redirect users after registration.
@ -86,21 +88,6 @@ class RegisterController extends Controller
return Validator::make($data, $validationRules);
}
/**
* Create a unique Referral Code for User
*
* @return string
*/
protected function createReferralCode()
{
$referralcode = STR::random(8);
if (User::where('referral_code', '=', $referralcode)->exists()) {
$this->createReferralCode();
}
return $referralcode;
}
/**
* Create a new user instance after a valid registration.
*
@ -132,6 +119,7 @@ class RegisterController extends Controller
if ($response->failed()) {
$user->delete();
Log::error('Pterodactyl Registration Error: ' . $response->json()['errors'][0]['detail']);
throw ValidationException::withMessages([
'ptero_registration_error' => [__('Account already exists on Pterodactyl. Please contact the Support!')],
]);
@ -142,7 +130,7 @@ class RegisterController extends Controller
]);
//INCREMENT REFERRAL-USER CREDITS
if (! empty($data['referral_code'])) {
if (!empty($data['referral_code'])) {
$ref_code = $data['referral_code'];
$new_user = $user->id;
if ($ref_user = User::query()->where('referral_code', '=', $ref_code)->first()) {
@ -154,7 +142,7 @@ class RegisterController extends Controller
activity()
->performedOn($user)
->causedBy($ref_user)
->log('gained '.config('SETTINGS::REFERRAL::REWARD').' '.config('SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME').' for sign-up-referral of '.$user->name.' (ID:'.$user->id.')');
->log('gained ' . config('SETTINGS::REFERRAL::REWARD') . ' ' . config('SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME') . ' for sign-up-referral of ' . $user->name . ' (ID:' . $user->id . ')');
}
//INSERT INTO USER_REFERRALS TABLE
DB::table('user_referrals')->insert([

View file

@ -111,7 +111,7 @@ class HomeController extends Controller
return view('home')->with([
'usage' => $usage,
'credits' => $credits,
'useful_links' => UsefulLink::all()->sortBy('id'),
'useful_links_dashboard' => UsefulLink::where("position","like","%dashboard%")->get()->sortby("id"),
'bg' => $bg,
'boxText' => $boxText,
'unit' => $unit,

View file

@ -0,0 +1,117 @@
<?php
namespace App\Http\Controllers\Moderation;
use App\Http\Controllers\Controller;
use App\Models\Ticket;
use App\Models\TicketCategory;
use Illuminate\Http\Request;
class TicketCategoryController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$categories = TicketCategory::all();
return view('moderator.ticket.category')->with("categories",$categories);
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$request->validate([
'name' => 'required|string|max:191',
]);
TicketCategory::create($request->all());
return redirect(route("moderator.ticket.category.index"))->with("success",__("Category created"));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function update(Request $request)
{
$request->validate([
'category' => 'required|int',
'name' => 'required|string|max:191',
]);
$category = TicketCategory::where("id",$request->category)->firstOrFail();
$category->name = $request->name;
$category->save();
return redirect()->back()->with("success",__("Category name updated"));
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$category = TicketCategory::where("id",$id)->firstOrFail();
if($category->id == 5 ){ //cannot delete "other" category
return back()->with("error","You cannot delete that category");
}
$tickets = Ticket::where("ticketcategory_id",$category->id)->get();
foreach($tickets as $ticket){
$ticket->ticketcategory_id = "5";
$ticket->save();
}
$category->delete();
return redirect()
->route('moderator.ticket.category.index')
->with('success', __('Category removed'));
}
public function datatable()
{
$query = TicketCategory::withCount("tickets");
return datatables($query)
->addColumn('name', function ( TicketCategory $category) {
return $category->name;
})
->editColumn('tickets', function ( TicketCategory $category) {
return $category->tickets_count;
})
->addColumn('actions', function (TicketCategory $category) {
return '
<form class="d-inline" onsubmit="return submitResult();" method="post" action="'.route('moderator.ticket.category.destroy', $category->id).'">
'.csrf_field().'
'.method_field('DELETE').'
<button data-content="'.__('Delete').'" data-toggle="popover" data-trigger="hover" data-placement="top" class="btn btn-sm btn-danger mr-1"><i class="fas fa-trash"></i></button>
</form>
';
})
->editColumn('created_at', function (TicketCategory $category) {
return $category->created_at ? $category->created_at->diffForHumans() : '';
})
->rawColumns(['actions'])
->make();
}
}

View file

@ -50,7 +50,7 @@ class TicketsController extends Controller
$ticket = new Ticket([
'title' => $request->input('title'),
'user_id' => Auth::user()->id,
'ticket_id' => strtoupper(Str::random(5)),
'ticket_id' => strtoupper(Str::random(8)),
'ticketcategory_id' => $request->input('ticketcategory'),
'priority' => $request->input('priority'),
'message' => $request->input('message'),
@ -145,7 +145,8 @@ class TicketsController extends Controller
return __($tickets->priority);
})
->editColumn('updated_at', function (Ticket $tickets) {
return $tickets->updated_at ? $tickets->updated_at->diffForHumans() : '';
return ['display' => $tickets->updated_at ? $tickets->updated_at->diffForHumans() : '',
'raw' => $tickets->updated_at ? strtotime($tickets->updated_at) : ''];
})
->addColumn('actions', function (Ticket $tickets) {
return '

View file

@ -13,6 +13,7 @@ class Payment extends Model
use HasFactory;
public $incrementing = false;
protected $primaryKey = 'id';
/**
* @var string[]

View file

@ -10,6 +10,6 @@ class TicketCategory extends Model
public function tickets()
{
return $this->hasMany(Ticket::class);
return $this->hasMany(Ticket::class,'ticketcategory_id');
}
}

View file

@ -16,5 +16,6 @@ class UsefulLink extends Model
'title',
'link',
'description',
'position',
];
}

View file

@ -94,23 +94,16 @@ class User extends Authenticatable implements MustVerifyEmail
});
static::deleting(function (User $user) {
$user->servers()->chunk(10, function ($servers) {
foreach ($servers as $server) {
$server->delete();
}
// delete every server the user owns without using chunks
$user->servers()->each(function ($server) {
$server->delete();
});
$user->payments()->chunk(10, function ($payments) {
foreach ($payments as $payment) {
$payment->delete();
}
});
$user->payments()->delete();
$user->tickets()->chunk(10, function ($tickets) {
foreach ($tickets as $ticket) {
$ticket->delete();
}
});
$user->tickets()->delete();
$user->ticketBlackList()->delete();
@ -238,17 +231,17 @@ class User extends Authenticatable implements MustVerifyEmail
public function getAvatar()
{
//TODO loading the images to confirm they exist is causing to much load time. alternative has to be found :) maybe onerror tag on the <img tags>
// if ($this->discordUser()->exists()) {
// if(@getimagesize($this->discordUser->getAvatar())) {
// $avatar = $this->discordUser->getAvatar();
// } else {
// $avatar = "https://www.gravatar.com/avatar/" . md5(strtolower(trim($this->email)));
// }
// } else {
// $avatar = "https://www.gravatar.com/avatar/" . md5(strtolower(trim($this->email)));
// }
// if ($this->discordUser()->exists()) {
// if(@getimagesize($this->discordUser->getAvatar())) {
// $avatar = $this->discordUser->getAvatar();
// } else {
// $avatar = "https://www.gravatar.com/avatar/" . md5(strtolower(trim($this->email)));
// }
// } else {
// $avatar = "https://www.gravatar.com/avatar/" . md5(strtolower(trim($this->email)));
// }
return 'https://www.gravatar.com/avatar/'.md5(strtolower(trim($this->email)));
return 'https://www.gravatar.com/avatar/' . md5(strtolower(trim($this->email)));
}
/**
@ -298,9 +291,8 @@ class User extends Authenticatable implements MustVerifyEmail
public function getActivitylogOptions(): LogOptions
{
return LogOptions::defaults()
-> logOnly(['role', 'name', 'server_limit', 'pterodactyl_id', 'email'])
-> logOnlyDirty()
-> dontSubmitEmptyLogs();
->logOnly(['role', 'name', 'server_limit', 'pterodactyl_id', 'email'])
->logOnlyDirty()
->dontSubmitEmptyLogs();
}
}

View file

@ -3,6 +3,7 @@
namespace App\Providers;
use App\Models\Settings;
use App\Models\UsefulLink;
use Exception;
use Illuminate\Pagination\Paginator;
use Illuminate\Support\Facades\Artisan;
@ -53,6 +54,15 @@ class AppServiceProvider extends ServiceProvider
return $ok;
});
try {
if (Schema::hasColumn('useful_links', 'position')) {
$useful_links = UsefulLink::where("position", "like", "%topbar%")->get()->sortby("id");
view()->share('useful_links', $useful_links);
}
} catch (Exception $e) {
Log::error("Couldnt find useful_links. Probably the installation is not completet. ".$e);
}
//only run if the installer has been executed
try {
$settings = Settings::all();
@ -61,12 +71,12 @@ class AppServiceProvider extends ServiceProvider
config([$setting->key => $setting->value]);
}
if(!file_exists(base_path('themes')."/".config("SETTINGS::SYSTEM:THEME"))){
if(!file_exists(base_path('themes') . "/" . config("SETTINGS::SYSTEM:THEME"))){
config(['SETTINGS::SYSTEM:THEME' => "default"]);
}
if(config('theme.active') == null){
Theme::set(config("SETTINGS::SYSTEM:THEME","default"), "default");
if(config('SETTINGS::SYSTEM:THEME') !== config('theme.active')){
Theme::set(config("SETTINGS::SYSTEM:THEME"), "default");
}
// Set Mail Config
@ -125,7 +135,7 @@ class AppServiceProvider extends ServiceProvider
$branchname = $explodedstring[2]; //get the one that is always the branch name
} catch (Exception $e) {
$branchname = 'unknown';
Log::error($e);
Log::notice($e);
}
config(['BRANCHNAME' => $branchname]);

23
app/Traits/Referral.php Normal file
View file

@ -0,0 +1,23 @@
<?php
namespace App\Traits;
use App\Models\User;
use Illuminate\Support\Str;
trait Referral
{
public function createReferralCode()
{
$code = Str::random(8);
// check if code already exists
if (User::where('referral_code', $code)->exists()) {
// if exists, generate another code
return $this->generateReferralCode();
}
return $code;
}
}

View file

@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Facade;
return [
'version' => '0.9',
'version' => '0.9.1',
/*
|--------------------------------------------------------------------------

View file

@ -9,7 +9,7 @@ return [
| It will assign the default active theme to be used if one is not set during
| runtime.
*/
'active' => null,
'active' => "default",
/*
|--------------------------------------------------------------------------

View file

@ -1,6 +1,7 @@
<?php
use App\Models\User;
use App\Traits\Referral;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
@ -9,16 +10,13 @@ use Illuminate\Support\Str;
return new class extends Migration
{
public function generateCode($userid)
use Referral;
public function setReferralCode($userid)
{
$random = STR::random(8);
if (User::where('referral_code', '=', $random)->doesntExist()) {
DB::table('users')
->where('id', '=', $userid)
->update(['referral_code' => $random]);
} else {
$this->generateCode($userid);
}
$code = $this->createReferralCode();
DB::table('users')
->where('id', '=', $userid)
->update(['referral_code' => $code]);
}
/**
@ -35,7 +33,7 @@ return new class extends Migration
$existing_user = User::where('referral_code', '')->orWhere('referral_code', null)->get();
foreach ($existing_user as $user) {
$this->generateCode($user->id);
$this->setReferralCode($user->id);
}
}

View file

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('useful_links', function (Blueprint $table) {
$table->string('position')->after("description")->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('useful_links', function (Blueprint $table) {
$table->dropColumn('position');
});
}
};

View file

@ -131,7 +131,7 @@ class SettingsSeeder extends Seeder
], [
'value' => 'Credits',
'type' => 'string',
'description' => 'Set the display name of your currency :)',
'description' => 'The display name of your currency.',
]);
//credits display name
@ -148,7 +148,7 @@ class SettingsSeeder extends Seeder
], [
'value' => '0',
'type' => 'integer',
'description' => 'The %-value of tax that will be added to the product price on checkout',
'description' => 'The %-value of tax that will be added to the product price on checkout.',
]);
//Invoices enabled
Settings::firstOrCreate([
@ -156,7 +156,7 @@ class SettingsSeeder extends Seeder
], [
'value' => 'false',
'type' => 'boolean',
'description' => 'Enables or disables the invoice feature for payments',
'description' => 'Enables or disables the invoice feature for payments.',
]);
//Invoice company name
Settings::firstOrCreate([
@ -164,7 +164,7 @@ class SettingsSeeder extends Seeder
], [
'value' => '',
'type' => 'string',
'description' => 'The name of the Company on the Invoices',
'description' => 'The name of the Company on the Invoices.',
]);
//Invoice company address
Settings::firstOrCreate([
@ -172,7 +172,7 @@ class SettingsSeeder extends Seeder
], [
'value' => '',
'type' => 'string',
'description' => 'The address of the Company on the Invoices',
'description' => 'The address of the Company on the Invoices.',
]);
//Invoice company phone
Settings::firstOrCreate([
@ -180,7 +180,7 @@ class SettingsSeeder extends Seeder
], [
'value' => '',
'type' => 'string',
'description' => 'The phone number of the Company on the Invoices',
'description' => 'The phone number of the Company on the Invoices.',
]);
//Invoice company mail
@ -189,7 +189,7 @@ class SettingsSeeder extends Seeder
], [
'value' => '',
'type' => 'string',
'description' => 'The email address of the Company on the Invoices',
'description' => 'The email address of the Company on the Invoices.',
]);
//Invoice VAT
@ -198,7 +198,7 @@ class SettingsSeeder extends Seeder
], [
'value' => '',
'type' => 'string',
'description' => 'The VAT-Number of the Company on the Invoices',
'description' => 'The VAT-Number of the Company on the Invoices.',
]);
//Invoice Website
@ -207,7 +207,7 @@ class SettingsSeeder extends Seeder
], [
'value' => '',
'type' => 'string',
'description' => 'The Website of the Company on the Invoices',
'description' => 'The Website of the Company on the Invoices.',
]);
//Invoice Website
@ -216,7 +216,7 @@ class SettingsSeeder extends Seeder
], [
'value' => 'INV',
'type' => 'string',
'description' => 'The invoice prefix',
'description' => 'The invoice prefix.',
]);
//Locale
@ -225,7 +225,7 @@ class SettingsSeeder extends Seeder
], [
'value' => 'en',
'type' => 'string',
'description' => 'The default Language the dashboard will be shown in',
'description' => 'The default dashboard language.',
]);
//Dynamic locale
Settings::firstOrCreate([
@ -247,9 +247,9 @@ class SettingsSeeder extends Seeder
Settings::firstOrCreate([
'key' => 'SETTINGS::LOCALE:AVAILABLE',
], [
'value' => '',
'value' => 'en',
'type' => 'string',
'description' => 'The available languages',
'description' => 'The available languages.',
]);
//Locale
Settings::firstOrCreate([
@ -265,63 +265,63 @@ class SettingsSeeder extends Seeder
], [
'value' => env('PAYPAL_SECRET', ''),
'type' => 'string',
'description' => 'Your PayPal Secret-Key ( https://developer.paypal.com/docs/integration/direct/rest/)',
'description' => 'Your PayPal Secret-Key (https://developer.paypal.com/docs/integration/direct/rest/).',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID',
], [
'value' => env('PAYPAL_CLIENT_ID', ''),
'type' => 'string',
'description' => 'Your PayPal Client_ID',
'description' => 'Your PayPal Client_ID.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET',
], [
'value' => env('PAYPAL_SANDBOX_SECRET', ''),
'type' => 'string',
'description' => 'Your PayPal SANDBOX Secret-Key used for testing ',
'description' => 'Your PayPal SANDBOX Secret-Key used for testing.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::PAYMENTS:PAYPAL:SANDBOX_CLIENT_ID',
], [
'value' => env('PAYPAL_SANDBOX_CLIENT_ID', ''),
'type' => 'string',
'description' => 'Your PayPal SANDBOX Client-ID used for testing ',
'description' => 'Your PayPal SANDBOX Client-ID used for testing.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::PAYMENTS:STRIPE:SECRET',
], [
'value' => env('STRIPE_SECRET', ''),
'type' => 'string',
'description' => 'Your Stripe Secret-Key ( https://dashboard.stripe.com/account/apikeys )',
'description' => 'Your Stripe Secret-Key (https://dashboard.stripe.com/account/apikeys).',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET',
], [
'value' => env('STRIPE_ENDPOINT_SECRET', ''),
'type' => 'string',
'description' => 'Your Stripe endpoint secret-key',
'description' => 'Your Stripe endpoint secret-key.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::PAYMENTS:STRIPE:TEST_SECRET',
], [
'value' => env('STRIPE_TEST_SECRET', ''),
'type' => 'string',
'description' => 'Your Stripe test secret-key',
'description' => 'Your Stripe test secret-key.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::PAYMENTS:STRIPE:ENDPOINT_TEST_SECRET',
], [
'value' => env('STRIPE_ENDPOINT_TEST_SECRET', ''),
'type' => 'string',
'description' => 'Your Stripe endpoint test secret-key',
'description' => 'Your Stripe endpoint test secret-key.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::PAYMENTS:STRIPE:METHODS',
], [
'value' => env('STRIPE_METHODS', 'card,sepa_debit'),
'type' => 'string',
'description' => 'Comma seperated list of payment methods that are enabled (https://stripe.com/docs/payments/payment-methods/integration-options)',
'description' => 'Comma seperated list of payment methods that are enabled (https://stripe.com/docs/payments/payment-methods/integration-options).',
]);
Settings::firstOrCreate([
@ -329,7 +329,7 @@ class SettingsSeeder extends Seeder
], [
'value' => env('DISCORD_CLIENT_ID', ''),
'type' => 'string',
'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/',
'description' => 'Discord API Credentials (https://discordapp.com/developers/applications/).',
]);
Settings::firstOrCreate([
@ -337,14 +337,14 @@ class SettingsSeeder extends Seeder
], [
'value' => env('DISCORD_CLIENT_SECRET', ''),
'type' => 'string',
'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/',
'description' => 'Discord API Credentials (https://discordapp.com/developers/applications/).',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::DISCORD:BOT_TOKEN',
], [
'value' => env('DISCORD_BOT_TOKEN', ''),
'type' => 'string',
'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/',
'description' => 'Discord API Credentials (https://discordapp.com/developers/applications/).',
]);
Settings::firstOrCreate([
@ -352,7 +352,7 @@ class SettingsSeeder extends Seeder
], [
'value' => env('DISCORD_GUILD_ID', ''),
'type' => 'string',
'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/',
'description' => 'Discord API Credentials (https://discordapp.com/developers/applications/).',
]);
Settings::firstOrCreate([
@ -360,14 +360,14 @@ class SettingsSeeder extends Seeder
], [
'value' => env('DISCORD_ROLE_ID', ''),
'type' => 'string',
'description' => 'Discord role that will be assigned to users when they register',
'description' => 'Discord role that will be assigned to users when they register.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::DISCORD:INVITE_URL',
], [
'value' => env('DISCORD_INVITE_URL', ''),
'type' => 'string',
'description' => 'The invite URL to your Discord Server',
'description' => 'The invite URL to your Discord Server.',
]);
Settings::firstOrCreate([
@ -404,7 +404,7 @@ class SettingsSeeder extends Seeder
], [
'value' => env('RECAPTCHA_SITE_KEY', '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI'),
'type' => 'string',
'description' => 'Google Recaptcha API Credentials - https://www.google.com/recaptcha/admin - reCaptcha V2 (not v3)',
'description' => 'Google Recaptcha API Credentials (https://www.google.com/recaptcha/admin) - reCaptcha V2 (not v3)',
]);
Settings::firstOrCreate([
@ -412,14 +412,14 @@ class SettingsSeeder extends Seeder
], [
'value' => env('RECAPTCHA_SECRET_KEY', '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe'),
'type' => 'string',
'description' => 'Google Recaptcha API Credentials - https://www.google.com/recaptcha/admin - reCaptcha V2 (not v3)',
'description' => 'Google Recaptcha API Credentials (https://www.google.com/recaptcha/admin) - reCaptcha V2 (not v3)',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::RECAPTCHA:ENABLED',
], [
'value' => 'true',
'type' => 'boolean',
'description' => 'Enables or disables the ReCaptcha feature on the registration/login page',
'description' => 'Enables or disables the ReCaptcha feature on the registration/login page.',
]);
Settings::firstOrCreate([
@ -427,63 +427,63 @@ class SettingsSeeder extends Seeder
], [
'value' => env('MAIL_MAILER', 'smtp'),
'type' => 'string',
'description' => 'Selected Mailer (smtp, mailgun, sendgrid, mailtrap)',
'description' => 'Selected Mailer (smtp, mailgun, sendgrid, mailtrap).',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::MAIL:HOST',
], [
'value' => env('MAIL_HOST', 'localhost'),
'type' => 'string',
'description' => 'Mailer Host Address',
'description' => 'Mailer Host Address.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::MAIL:PORT',
], [
'value' => env('MAIL_PORT', '25'),
'type' => 'string',
'description' => 'Mailer Server Port',
'description' => 'Mailer Server Port.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::MAIL:USERNAME',
], [
'value' => env('MAIL_USERNAME', ''),
'type' => 'string',
'description' => 'Mailer Username',
'description' => 'Mailer Username.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::MAIL:PASSWORD',
], [
'value' => env('MAIL_PASSWORD', ''),
'type' => 'string',
'description' => 'Mailer Password',
'description' => 'Mailer Password.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::MAIL:ENCRYPTION',
], [
'value' => env('MAIL_ENCRYPTION', 'tls'),
'type' => 'string',
'description' => 'Mailer Encryption (tls, ssl)',
'description' => 'Mailer Encryption (tls, ssl).',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::MAIL:FROM_ADDRESS',
], [
'value' => env('MAIL_FROM_ADDRESS', ''),
'type' => 'string',
'description' => 'Mailer From Address',
'description' => 'Mailer From Address.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::MAIL:FROM_NAME',
], [
'value' => env('APP_NAME', 'Controlpanel'),
'type' => 'string',
'description' => 'Mailer From Name',
'description' => 'Mailer From Name.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::REFERRAL::ENABLED',
], [
'value' => 'false',
'type' => 'string',
'description' => 'Enable or disable the referral system',
'description' => 'Enable or disable the referral system.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::REFERRAL::ALWAYS_GIVE_COMMISSION',
@ -518,7 +518,7 @@ class SettingsSeeder extends Seeder
], [
'value' => 100,
'type' => 'integer',
'description' => 'The Percentage Value a referred user gets',
'description' => 'The Percentage value a referred user gets.',
]);
Settings::firstOrCreate([
@ -526,28 +526,28 @@ class SettingsSeeder extends Seeder
], [
'value' => '',
'type' => 'string',
'description' => 'The Client API Key of an Pterodactyl Admin Account',
'description' => 'The Client API Key of an Pterodactyl Admin Account.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::SYSTEM:ENABLE_UPGRADE',
], [
'value' => 'false',
'type' => 'boolean',
'description' => 'Enables the updgrade/downgrade feature for servers',
'description' => 'Enables the updgrade/downgrade feature for servers.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::SYSTEM:CREATION_OF_NEW_SERVERS',
], [
'value' => 'true',
'type' => 'boolean',
'description' => 'Enable/disable the creation of new servers',
'description' => 'Enable creation of new servers',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::SYSTEM:CREATION_OF_NEW_USERS',
], [
'value' => 'false',
'value' => 'true',
'type' => 'boolean',
'description' => 'Enable/disable the creation of new users',
'description' => 'Enable creation of new users',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::SYSTEM:SHOW_IMPRINT',
@ -555,7 +555,7 @@ class SettingsSeeder extends Seeder
'value' => "false",
'type' => 'boolean',
'description' => 'Enable/disable imprint in footer'
'description' => 'Enable imprint in footer.'
]);
Settings::firstOrCreate([
@ -564,7 +564,7 @@ class SettingsSeeder extends Seeder
'value' => "false",
'type' => 'boolean',
'description' => 'Enable/disable privacy policy in footer'
'description' => 'Enable privacy policy in footer.'
]);
Settings::firstOrCreate([
@ -572,7 +572,7 @@ class SettingsSeeder extends Seeder
], [
'value' => 'false',
'type' => 'boolean',
'description' => 'Enable/disable Terms of Service in footer',
'description' => 'Enable Terms of Service in footer.',
]);
Settings::firstOrCreate([
@ -580,14 +580,14 @@ class SettingsSeeder extends Seeder
], [
'value' => 'false',
'type' => 'boolean',
'description' => 'Enable/disable Alerts on Homepage',
'description' => 'Enable Alerts on Homepage.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::SYSTEM:ALERT_TYPE',
], [
'value' => 'dark',
'type' => 'text',
'description' => 'Changes the Color of the Alert',
'description' => 'Changes the Color of the Alert.',
]);
Settings::firstOrCreate([
@ -595,14 +595,14 @@ class SettingsSeeder extends Seeder
], [
'value' => '',
'type' => 'text',
'description' => 'Changes the Content the Alert',
'description' => 'Changes the Content the Alert.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::SYSTEM:THEME',
], [
'value' => 'default',
'type' => 'text',
'description' => 'Current active theme',
'description' => 'Current active theme.',
]);
Settings::firstOrCreate([
@ -610,7 +610,7 @@ class SettingsSeeder extends Seeder
], [
'value' => 'true',
'type' => 'boolean',
'description' => 'Enable/disable Useful Links on Homepage',
'description' => 'Enable Useful Links on Homepage.',
]);
Settings::firstOrCreate([
@ -618,7 +618,7 @@ class SettingsSeeder extends Seeder
], [
'value' => 'true',
'type' => 'boolean',
'description' => 'Enable/disable MOTD on Homepage',
'description' => 'Enable MOTD on Homepage.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::SYSTEM:MOTD_MESSAGE',
@ -628,14 +628,14 @@ class SettingsSeeder extends Seeder
<p><span style="font-size: 18pt;">If you have any questions, make sure to join our <a href="https://discord.com/invite/4Y6HjD2uyU" target="_blank" rel="noopener">Discord</a></span></p>
<p><span style="font-size: 10pt;">(you can change this message in the <a href="admin/settings#system">Settings</a> )</span></p>',
'type' => 'text',
'description' => 'MOTD Message',
'description' => 'MOTD Message.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::SYSTEM:SEO_TITLE',
], [
'value' => 'Controlpanel.gg',
'type' => 'text',
'description' => 'The SEO Title',
'description' => 'The SEO Title.',
]);
Settings::firstOrCreate([
@ -643,14 +643,14 @@ class SettingsSeeder extends Seeder
], [
'value' => 'Billing software for Pterodactyl Dashboard!',
'type' => 'text',
'description' => 'SEO Description',
'description' => 'SEO Description.',
]);
Settings::firstOrCreate([
'key' => 'SETTINGS::TICKET:NOTIFY',
], [
'value' => 'all',
'type' => 'text',
'description' => 'Who will get a Email Notifcation on new Tickets',
'description' => 'Who will get a Email Notifcation on new Tickets.',
]);
}
}

View file

@ -19,18 +19,21 @@ class UsefulLinksSeeder extends Seeder
'title' => 'Pterodactyl Panel',
'link' => env('PTERODACTYL_URL', 'http://localhost'),
'description' => 'Use your servers on our pterodactyl panel <small>(You can use the same login details)</small>',
'position' => 'dashboard',
]);
UsefulLink::create([
'icon' => 'fas fa-database',
'title' => 'phpMyAdmin',
'link' => env('PHPMYADMIN_URL', 'http://localhost'),
'description' => 'View your database online using phpMyAdmin',
'position' => 'dashboard,topbar',
]);
UsefulLink::create([
'icon' => 'fab fa-discord',
'title' => 'Discord',
'link' => env('DISCORD_INVITE_URL', 'https://discord.gg/4Y6HjD2uyU'),
'description' => 'Need a helping hand? Want to chat? Got any questions? Join our discord!',
'position' => 'dashboard',
]);
}
}

24755
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,23 +1,13 @@
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production",
"dev:default": "vite --config themes/default/vite.config.js",
"build:default": "vite build --config themes/default/vite.config.js",
"dev:1day2die": "vite --config themes/1day2die/vite.config.js",
"build:1day2die": "vite build --config themes/1day2die/vite.config.js"
"development": "vite",
"production": "vite build"
},
"devDependencies": {
"axios": "^0.25",
"bootstrap": "^4.6.0",
"jquery": "^3.5",
"laravel-mix": "^6.0.6",
"lodash": "^4.17.19",
"popper.js": "^1.16",
"postcss": "^8.1.14",
@ -26,6 +16,8 @@
"sass-loader": "^10.1.1"
},
"dependencies": {
"tinymce": "^6.3.1"
"tinymce": "^6.3.1",
"vite": "^4.0.4",
"laravel-vite-plugin": "^0.7.3"
}
}

11
public/build/assets/app-bac23d88.css vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,7 @@
{
"themes/default/sass/app.scss": {
"file": "assets/app-bac23d88.css",
"src": "themes/default/sass/app.scss",
"isEntry": true
}
}

View file

@ -1,4 +0,0 @@
{
"/js/app.js": "/js/app.js",
"/css/app.css": "/css/app.css"
}

1
public/themes/BlueInfinity/app.css vendored Normal file
View file

@ -0,0 +1 @@
@import "default.css";.layout-fixed .wrapper .sidebar{ height:calc(100vh - 3.5rem - 1px);background:radial-gradient(#061b29,black);}body:not(.sidebar-mini-md) .content-wrapper,body:not(.sidebar-mini-md) .main-footer,body:not(.sidebar-mini-md) .main-header{ transition:margin-left .3s ease-in-out;margin-left:250px;background:radial-gradient(#061b29,black);}[class*=sidebar-dark] .brand-link,[class*=sidebar-dark] .brand-link .pushmenu{ color:hsla(0,0%,100%,.8);background:radial-gradient(#061b29,black);}.main-sidebar .brand-text,.main-sidebar .logo-xl,.main-sidebar .logo-xs,.sidebar .nav-link p,.sidebar .user-panel .info{ transition:margin-left .3s linear,opacity .3s ease,visibility .3s ease;color:#d3d3d3;}.sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active,.sidebar-light-primary .nav-sidebar>.nav-item>.nav-link.active{ color:#fff;background:radial-gradient(#1b4b61,#fd030300);border-radius:50px;}.dark-mode .card{ background-color:#00000000;color:#ffffff99;border-width:3px;border-color:#f7f7f7;border-style:double;border-radius:15px;}.btn-info{ color:#ffffff;background-color:#b8171700;border-color:#ffffff;box-shadow:none;}.btn-warning{ color:#ffffff;background-color:#ffc10700;border-color:#ffffff;box-shadow:none;}.card-title{ float:left;font-size:1.1rem;font-weight:400;margin:0;color:white;}.dark-mode .text-muted{ color:#ffffff99!important;}.dark-mode .list-group-item{ background-color:#343a4000;border-color:#ffffff99;}.dark-mode .info-box{ background-color:#343a4000;color:#fff;border:3px;border-style:double;border-radius:15px;border-color:white;}label:not(.form-check-label):not(.custom-file-label){ font-weight:700;color:#ffffffc2;}.dark-mode .custom-control-label:before,.dark-mode .custom-file-label,.dark-mode .custom-file-label:after,.dark-mode .custom-select,.dark-mode .form-control,.dark-mode .input-group-text{ background-color:#007af400;color:#828282;}.alert-success{ color:#fff;background-color:#28a745;border-color:#ffffff;border-radius:15px;border-style:double;}.dark-mode{ color:#fff;background:radial-gradient(#061b29,black);}.dark-mode .invoice{ background-color:#343a4000;border:3px;border-radius:15px;border-color:white;border:double;}.dark-mode .nav-tabs .nav-item.show .nav-link,.dark-mode .nav-tabs .nav-link.active{ background-color:#ffffff1c;color:#fff;}.slim-crop-area img,.slim-image-editor img,.slim-popover img,.slim img{ background:black;}.dark-mode .callout{ background-color:#00ff0333;}.callout.callout-info{ border-left-color:#00e11d;}.p-3{ padding:1rem!important;background:#061b29;}.small-box>.small-box-footer{ color:hsla(0,0%,100%,.8);display:block;padding:3px 0;position:relative;text-align:center;text-decoration:none;z-index:10;background:#061b29;}.dark-mode .dropdown-menu{ background-color:#061b29;border-color:white;}.card-header:first-child{ border-radius:14px 14px 0px 0px;background:#061b29;}.card-body{ flex:1 1 auto;min-height:1px;padding:1.25rem;background:#061b29;}.justify-content-between{ justify-content:space-between!important;background:#061b29;}.dark-mode .card .card-footer{ background-color:#061b29;border-radius:0px 0px 14px 14px;}.dark-mode .select2-selection--single{ background-color:#061b29;border-color:#6c757d;}.select2-search--dropdown{ display:block;padding:4px;background:#061b29;}.select2-container--default .select2-results__option{ padding:6px 12px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background:blue;background:#061b29;}.dark-mode .select2-dropdown,.dark-mode .select2-dropdown .select2-search__field,.dark-mode .select2-search--inline .select2-search__field{ background-color:#061b29;border-color:#ffffff;color:#fff;}.modal-header{ background:#061b29;}.modal-body{ position:relative;flex:1 1 auto;padding:1rem;background:#061b29;}.dark-mode .modal-footer,.dark-mode .modal-header{ border-color:#ffffff;background:#061b29;}

File diff suppressed because one or more lines are too long

20
public/themes/BlueInfinity/default.css vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -8,7 +8,9 @@ use App\Classes\Settings\System;
use App\Http\Controllers\Admin\ActivityLogController;
use App\Http\Controllers\Admin\ApplicationApiController;
use App\Http\Controllers\Admin\InvoiceController;
use App\Http\Controllers\Admin\LegalController;
use App\Http\Controllers\Admin\OverViewController;
use App\Http\Controllers\Admin\PartnerController;
use App\Http\Controllers\Admin\PaymentController;
use App\Http\Controllers\Admin\ProductController;
use App\Http\Controllers\Admin\ServerController as AdminServerController;
@ -19,9 +21,9 @@ use App\Http\Controllers\Admin\UserController;
use App\Http\Controllers\Admin\VoucherController;
use App\Http\Controllers\Auth\SocialiteController;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\Moderation\TicketCategoryController;
use App\Http\Controllers\Moderation\TicketsController as ModTicketsController;
use App\Http\Controllers\NotificationController;
use App\Http\Controllers\PartnerController;
use App\Http\Controllers\ProductController as FrontProductController;
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\ServerController;
@ -118,6 +120,8 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
Route::prefix('admin')->name('admin.')->middleware('admin')->group(function () {
//overview
Route::get('legal', [OverViewController::class, 'index'])->name('overview.index');
Route::get('overview', [OverViewController::class, 'index'])->name('overview.index');
Route::get('overview/sync', [OverViewController::class, 'syncPterodactyl'])->name('overview.sync');
@ -178,6 +182,10 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
Route::get('usefullinks/datatable', [UsefulLinkController::class, 'datatable'])->name('usefullinks.datatable');
Route::resource('usefullinks', UsefulLinkController::class);
//legal
Route::get('legal', [LegalController::class, 'index'])->name('legal.index');
Route::patch('legal', [LegalController::class, 'update'])->name('legal.update');
//vouchers
Route::get('vouchers/datatable', [VoucherController::class, 'datatable'])->name('vouchers.datatable');
Route::get('vouchers/{voucher}/usersdatatable', [VoucherController::class, 'usersdatatable'])->name('vouchers.usersdatatable');
@ -211,6 +219,11 @@ Route::middleware(['auth', 'checkSuspended'])->group(function () {
Route::post('ticket/blacklist/delete/{id}', [ModTicketsController::class, 'blacklistDelete'])->name('ticket.blacklist.delete');
Route::post('ticket/blacklist/change/{id}', [ModTicketsController::class, 'blacklistChange'])->name('ticket.blacklist.change');
Route::get('ticket/blacklist/datatable', [ModTicketsController::class, 'dataTableBlacklist'])->name('ticket.blacklist.datatable');
Route::get('ticket/category/datatable', [TicketCategoryController::class, 'datatable'])->name('ticket.category.datatable');
Route::resource("ticket/category", TicketCategoryController::class,['as' => 'ticket']);
});
Route::get('/home', [HomeController::class, 'index'])->name('home');

View file

@ -0,0 +1,66 @@
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta content="{{ config('SETTINGS::SYSTEM:SEO_TITLE') }}" property="og:title">
<meta content="{{ config('SETTINGS::SYSTEM:SEO_DESCRIPTION') }}" property="og:description">
<meta content='{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('logo.png') ? asset('storage/logo.png') : asset('images/controlpanel_logo.png') }}' property="og:image">
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ config('app.name', 'Laravel') }}</title>
<link rel="icon"
href="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('favicon.ico') ? \Illuminate\Support\Facades\Storage::disk('public')->url('favicon.ico') : asset('favicon.ico') }}"
type="image/x-icon">
<script src="{{ asset('js/app.js') }}" defer></script>
<!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
<link rel="preload" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}" as="style"
onload="this.onload=null;this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}">
</noscript>
@if (config('SETTINGS::RECAPTCHA:ENABLED') == 'true')
{!! htmlScriptTagJsApi() !!}
@endif
<link rel="stylesheet" href="{{ asset('themes/BlueInfinity/app.css') }}">
</head>
@yield('content')
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10.14.1/dist/sweetalert2.all.min.js"></script>
<script>
@if (Session::has('error'))
Swal.fire({
icon: 'error',
title: 'Oops...',
html: '{{ Session::get('error') }}',
})
@endif
@if (Session::has('success'))
Swal.fire({
icon: 'success',
title: '{{ Session::get('success') }}',
position: 'top-end',
showConfirmButton: false,
background: '#343a40',
toast: true,
timer: 3000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
})
@endif
</script>
</html>

View file

@ -0,0 +1,544 @@
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta content="{{ config('SETTINGS::SYSTEM:SEO_TITLE') }}" property="og:title">
<meta content="{{ config('SETTINGS::SYSTEM:SEO_DESCRIPTION') }}" property="og:description">
<meta content='{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('logo.png') ? asset('storage/logo.png') : asset('images/controlpanel_logo.png') }}' property="og:image">
<title>{{ config('app.name', 'Laravel') }}</title>
<link rel="icon"
href="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('favicon.ico') ? asset('storage/favicon.ico') : asset('favicon.ico') }}"
type="image/x-icon">
<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>
{{-- <link rel="stylesheet" href="{{asset('css/adminlte.min.css')}}"> --}}
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs4/dt-1.10.24/datatables.min.css" />
{{-- summernote --}}
<link rel="stylesheet" href="{{ asset('plugins/summernote/summernote-bs4.min.css') }}">
{{-- datetimepicker --}}
<link rel="stylesheet"
href="{{ asset('plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css') }}">
{{-- select2 --}}
<link rel="stylesheet" href="{{ asset('plugins/select2/css/select2.min.css') }}">
<link rel="preload" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}" as="style"
onload="this.onload=null;this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}">
</noscript>
<script src="{{ asset('js/app.js') }}"></script>
<!-- tinymce -->
<script src={{ asset('plugins/tinymce/js/tinymce/tinymce.min.js') }}></script>
<link rel="stylesheet" href="{{ asset('themes/BlueInfinity/app.css') }}">
</head>
<body class="sidebar-mini layout-fixed dark-mode" style="height: auto;">
<div class="wrapper">
<!-- Navbar -->
<nav class="main-header sticky-top navbar navbar-expand navbar-dark navbar-light">
<!-- Left navbar links -->
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i
class="fas fa-bars"></i></a>
</li>
<li class="nav-item d-none d-sm-inline-block">
<a href="{{ route('home') }}" class="nav-link"><i
class="fas fa-home mr-2"></i>{{ __('Home') }}</a>
</li>
@if (config('SETTINGS::DISCORD:INVITE_URL'))
<li class="nav-item d-none d-sm-inline-block">
<a href="{{ config('SETTINGS::DISCORD:INVITE_URL') }}" class="nav-link" target="__blank"><i
class="fab fa-discord mr-2"></i>{{ __('Discord') }}</a>
</li>
@endif
<!-- Language Selection -->
@if (config('SETTINGS::LOCALE:CLIENTS_CAN_CHANGE') == 'true')
<li class="nav-item dropdown">
<a class="nav-link" href="#" id="languageDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<span class="mr-1 d-lg-inline text-gray-600">
<small><i class="fa fa-language mr-2"></i></small>{{ __('Language') }}
</span>
</a>
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
aria-labelledby="changeLocale">
<form method="post" action="{{ route('changeLocale') }}" class="nav-item text-center">
@csrf
@foreach (explode(',', config('SETTINGS::LOCALE:AVAILABLE')) as $key)
<button class="dropdown-item" name="inputLocale" value="{{ $key }}">
{{ __($key) }}
</button>
@endforeach
</form>
</div>
</li>
<!-- End Language Selection -->
@endif
@foreach($useful_links as $link)
<li class="nav-item d-none d-sm-inline-block">
<a href="{{ $link->link }}" class="nav-link" target="__blank"><i
class="{{$link->icon}}"></i> {{ $link->title }}</a>
</li>
@endforeach
</ul>
<!-- Right navbar links -->
<ul class="navbar-nav ml-auto">
<!-- Notifications Dropdown Menu -->
<li class="nav-item dropdown">
<a class="nav-link" data-toggle="dropdown" href="#">
<i class="far fa-bell"></i>
@if (Auth::user()->unreadNotifications->count() != 0)
<span
class="badge badge-warning navbar-badge">{{ Auth::user()->unreadNotifications->count() }}</span>
@endif
</a>
<div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
<span class="dropdown-item dropdown-header">{{ Auth::user()->unreadNotifications->count() }}
{{ __('Notifications') }}</span>
<div class="dropdown-divider"></div>
@foreach (Auth::user()->unreadNotifications->sortBy('created_at')->take(5) as $notification)
<a href="{{ route('notifications.show', $notification->id) }}" class="dropdown-item">
<span class="d-inline-block text-truncate" style="max-width: 150px;"><i
class="fas fa-envelope mr-2"></i>{{ $notification->data['title'] }}</span>
<span
class="float-right text-muted text-sm">{{ $notification->created_at->longAbsoluteDiffForHumans() }}
ago</span>
</a>
@endforeach
<div class="dropdown-divider"></div>
<a href="{{ route('notifications.index') }}"
class="dropdown-item dropdown-footer">{{ __('See all Notifications') }}</a>
<div class="dropdown-divider"></div>
<a href="{{ route('notifications.readAll') }}"
class="dropdown-item dropdown-footer">{{ __('Mark all as read') }}</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link" href="#" id="userDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<span class="mr-1 d-lg-inline text-gray-600">
<small><i class="fas fa-coins mr-2"></i></small>{{ Auth::user()->credits() }}
</span>
</a>
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
aria-labelledby="userDropdown">
<a class="dropdown-item" href="{{ route('store.index') }}">
<i class="fas fa-coins fa-sm fa-fw mr-2 text-gray-400"></i>
{{ __('Store') }}
</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" data-toggle="modal" data-target="#redeemVoucherModal"
href="javascript:void(0)">
<i class="fas fa-money-check-alt fa-sm fa-fw mr-2 text-gray-400"></i>
{{ __('Redeem code') }}
</a>
</div>
</li>
<li class="nav-item dropdown no-arrow">
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="mr-1 d-lg-inline text-gray-600 small">
{{ Auth::user()->name }}
<img width="28px" height="28px" class="rounded-circle ml-1"
src="{{ Auth::user()->getAvatar() }}">
</span>
</a>
<!-- Dropdown - User Information -->
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in"
aria-labelledby="userDropdown">
<a class="dropdown-item" href="{{ route('profile.index') }}">
<i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
{{ __('Profile') }}
</a>
{{-- <a class="dropdown-item" href="#"> --}}
{{-- <i class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i> --}}
{{-- Activity Log --}}
{{-- </a> --}}
@if (session()->get('previousUser'))
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{ route('users.logbackin') }}">
<i class="fas fa-sign-in-alt fa-sm fa-fw mr-2 text-gray-400"></i>
{{ __('Log back in') }}
</a>
@endif
<div class="dropdown-divider"></div>
<form method="post" action="{{ route('logout') }}">
@csrf
<button class="dropdown-item" href="#" data-toggle="modal"
data-target="#logoutModal">
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
{{ __('Logout') }}
</button>
</form>
</div>
</li>
</ul>
</nav>
<!-- /.navbar -->
<!-- Main Sidebar Container -->
<aside class="main-sidebar sidebar-open sidebar-dark-primary elevation-4">
<!-- Brand Logo -->
<a href="{{ route('home') }}" class="brand-link">
<img width="64" height="64"
src="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('icon.png') ? asset('storage/icon.png') : asset('images/controlpanel_logo.png') }}"
alt="{{ config('app.name', 'Laravel') }} Logo" class="brand-image img-circle"
style="opacity: .8">
<span class="brand-text font-weight-light">{{ config('app.name', 'Controlpanel.gg') }}</span>
</a>
<!-- Sidebar -->
<div class="sidebar" style="overflow-y: auto">
<!-- Sidebar Menu -->
<nav class="my-2">
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
data-accordion="false">
<!-- Add icons to the links using the .nav-icon class
with font-awesome or any other icon font library -->
<li class="nav-item">
<a href="{{ route('home') }}"
class="nav-link @if (Request::routeIs('home')) active @endif">
<i class="nav-icon fa fa-home"></i>
<p>{{ __('Dashboard') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('servers.index') }}"
class="nav-link @if (Request::routeIs('servers.*')) active @endif">
<i class="nav-icon fa fa-server"></i>
<p>{{ __('Servers') }}
<span class="badge badge-info right">{{ Auth::user()->servers()->count() }} /
{{ Auth::user()->server_limit }}</span>
</p>
</a>
</li>
@if (env('APP_ENV') == 'local' ||
(config('SETTINGS::PAYMENTS:PAYPAL:SECRET') && config('SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID')) ||
(config('SETTINGS::PAYMENTS:STRIPE:SECRET') &&
config('SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET') &&
config('SETTINGS::PAYMENTS:STRIPE:METHODS')))
<li class="nav-item">
<a href="{{ route('store.index') }}"
class="nav-link @if (Request::routeIs('store.*') || Request::routeIs('checkout')) active @endif">
<i class="nav-icon fa fa-coins"></i>
<p>{{ __('Store') }}</p>
</a>
</li>
@endif
@if (config('SETTINGS::TICKET:ENABLED'))
<li class="nav-item">
<a href="{{ route('ticket.index') }}"
class="nav-link @if (Request::routeIs('ticket.*')) active @endif">
<i class="nav-icon fas fas fa-ticket-alt"></i>
<p>{{ __('Support Ticket') }}</p>
</a>
</li>
@endif
@if ((Auth::user()->role == 'admin' || Auth::user()->role == 'moderator') && config('SETTINGS::TICKET:ENABLED'))
<li class="nav-header">{{ __('Moderation') }}</li>
<li class="nav-item">
<a href="{{ route('moderator.ticket.index') }}"
class="nav-link @if (Request::routeIs('moderator.ticket.index')) active @endif">
<i class="nav-icon fas fa-ticket-alt"></i>
<p>{{ __('Ticket List') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('moderator.ticket.blacklist') }}"
class="nav-link @if (Request::routeIs('moderator.ticket.blacklist')) active @endif">
<i class="nav-icon fas fa-user-times"></i>
<p>{{ __('Ticket Blacklist') }}</p>
</a>
</li>
@endif
@if (Auth::user()->role == 'admin')
<li class="nav-header">{{ __('Administration') }}</li>
<li class="nav-item">
<a href="{{ route('admin.overview.index') }}"
class="nav-link @if (Request::routeIs('admin.overview.*')) active @endif">
<i class="nav-icon fa fa-home"></i>
<p>{{ __('Overview') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.settings.index') }}"
class="nav-link @if (Request::routeIs('admin.settings.*')) active @endif">
<i class="nav-icon fas fa-tools"></i>
<p>{{ __('Settings') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.api.index') }}"
class="nav-link @if (Request::routeIs('admin.api.*')) active @endif">
<i class="nav-icon fa fa-gamepad"></i>
<p>{{ __('Application API') }}</p>
</a>
</li>
<li class="nav-header">{{ __('Management') }}</li>
<li class="nav-item">
<a href="{{ route('admin.users.index') }}"
class="nav-link @if (Request::routeIs('admin.users.*')) active @endif">
<i class="nav-icon fas fa-users"></i>
<p>{{ __('Users') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.servers.index') }}"
class="nav-link @if (Request::routeIs('admin.servers.*')) active @endif">
<i class="nav-icon fas fa-server"></i>
<p>{{ __('Servers') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.products.index') }}"
class="nav-link @if (Request::routeIs('admin.products.*')) active @endif">
<i class="nav-icon fas fa-sliders-h"></i>
<p>{{ __('Products') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.store.index') }}"
class="nav-link @if (Request::routeIs('admin.store.*')) active @endif">
<i class="nav-icon fas fa-shopping-basket"></i>
<p>{{ __('Store') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.vouchers.index') }}"
class="nav-link @if (Request::routeIs('admin.vouchers.*')) active @endif">
<i class="nav-icon fas fa-money-check-alt"></i>
<p>{{ __('Vouchers') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.partners.index') }}"
class="nav-link @if (Request::routeIs('admin.partners.*')) active @endif">
<i class="nav-icon fas fa-handshake"></i>
<p>{{ __('Partners') }}</p>
</a>
</li>
{{-- <li class="nav-header">Pterodactyl</li> --}}
{{-- <li class="nav-item"> --}}
{{-- <a href="{{route('admin.nodes.index')}}" --}}
{{-- class="nav-link @if (Request::routeIs('admin.nodes.*')) active @endif"> --}}
{{-- <i class="nav-icon fas fa-sitemap"></i> --}}
{{-- <p>Nodes</p> --}}
{{-- </a> --}}
{{-- </li> --}}
{{-- <li class="nav-item"> --}}
{{-- <a href="{{route('admin.nests.index')}}" --}}
{{-- class="nav-link @if (Request::routeIs('admin.nests.*')) active @endif"> --}}
{{-- <i class="nav-icon fas fa-th-large"></i> --}}
{{-- <p>Nests</p> --}}
{{-- </a> --}}
{{-- </li> --}}
<li class="nav-header">{{ __('Other') }}</li>
<li class="nav-item">
<a href="{{ route('admin.usefullinks.index') }}"
class="nav-link @if (Request::routeIs('admin.usefullinks.*')) active @endif">
<i class="nav-icon fas fa-link"></i>
<p>{{ __('Useful Links') }}</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.legal.index') }}"
class="nav-link @if (Request::routeIs('admin.legal.*')) active @endif">
<i class="nav-icon fas fa-link"></i>
<p>{{ __('Legal Sites') }}</p>
</a>
</li>
<li class="nav-header">{{ __('Logs') }}</li>
<li class="nav-item">
<a href="{{ route('admin.payments.index') }}"
class="nav-link @if (Request::routeIs('admin.payments.*')) active @endif">
<i class="nav-icon fas fa-money-bill-wave"></i>
<p>{{ __('Payments') }}
<span
class="badge badge-success right">{{ \App\Models\Payment::count() }}</span>
</p>
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.activitylogs.index') }}"
class="nav-link @if (Request::routeIs('admin.activitylogs.*')) active @endif">
<i class="nav-icon fas fa-clipboard-list"></i>
<p>{{ __('Activity Logs') }}</p>
</a>
</li>
@endif
</ul>
</nav>
<!-- /.sidebar-menu -->
</div>
<!-- /.sidebar -->
</aside>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
@if (!Auth::user()->hasVerifiedEmail())
@if (Auth::user()->created_at->diffInHours(now(), false) > 1)
<div class="alert alert-warning p-2 m-2">
<h5><i class="icon fas fa-exclamation-circle"></i> {{ __('Warning!') }}</h5>
{{ __('You have not yet verified your email address') }} <a class="text-primary"
href="{{ route('verification.send') }}">{{ __('Click here to resend verification email') }}</a>
<br>
{{ __('Please contact support If you didnt receive your verification email.') }}
</div>
@endif
@endif
@yield('content')
@include('models.redeem_voucher_modal')
</div>
<!-- /.content-wrapper -->
<footer class="main-footer">
<strong>Copyright &copy; 2021-{{ date('Y') }} <a
href="{{ url('/') }}">{{ env('APP_NAME', 'Laravel') }}</a>.</strong>
All rights
reserved. Powered by <a href="https://controlpanel.gg">ControlPanel</a>.
@if (!str_contains(config('BRANCHNAME'), 'main') && !str_contains(config('BRANCHNAME'), 'unknown'))
Version <b>{{ config('app')['version'] }} - {{ config('BRANCHNAME') }}</b>
@endif
{{-- Show imprint and privacy link --}}
<div class="float-right d-none d-sm-inline-block">
@if (config('SETTINGS::SYSTEM:SHOW_IMPRINT') == "true")
<a target="_blank" href="{{ route('imprint') }}"><strong>{{ __('Imprint') }}</strong></a> |
@endif
@if (config('SETTINGS::SYSTEM:SHOW_PRIVACY') == "true")
<a target="_blank" href="{{ route('privacy') }}"><strong>{{ __('Privacy') }}</strong></a>
@endif
@if (config('SETTINGS::SYSTEM:SHOW_TOS') == "true")
| <a target="_blank" href="{{ route('tos') }}"><strong>{{ __('Terms of Service') }}</strong></a>
@endif
</div>
</footer>
<!-- Control Sidebar -->
<aside class="control-sidebar control-sidebar-dark">
<!-- Control sidebar content goes here -->
</aside>
<!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->
<!-- Scripts -->
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10.14.1/dist/sweetalert2.all.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/v/bs4/dt-1.10.24/datatables.min.js"></script>
<!-- Summernote -->
<script src="{{ asset('plugins/summernote/summernote-bs4.min.js') }}"></script>
<!-- select2 -->
<script src="{{ asset('plugins/select2/js/select2.min.js') }}"></script>
<!-- Moment.js -->
<script src="{{ asset('plugins/moment/moment.min.js') }}"></script>
<!-- Datetimepicker -->
<script src="{{ asset('plugins/tempusdominus-bootstrap-4/js/tempusdominus-bootstrap-4.min.js') }}"></script>
<!-- Select2 -->
<script src={{ asset('plugins/select2/js/select2.min.js') }}></script>
<script>
$(document).ready(function() {
$('[data-toggle="popover"]').popover();
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
});
</script>
<script>
@if (Session::has('error'))
Swal.fire({
icon: 'error',
title: 'Oops...',
html: '{{ Session::get('error') }}',
})
@endif
@if (Session::has('success'))
Swal.fire({
icon: 'success',
title: '{{ Session::get('success') }}',
position: 'top-end',
showConfirmButton: false,
background: '#343a40',
toast: true,
timer: 3000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
})
@endif
@if (Session::has('info'))
Swal.fire({
icon: 'info',
title: '{{ Session::get('info') }}',
position: 'top-end',
showConfirmButton: false,
background: '#343a40',
toast: true,
timer: 3000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
})
@endif
</script>
</body>
</html>

View file

@ -0,0 +1,113 @@
@extends('layouts.main')
@section('content')
<!-- CONTENT HEADER -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>{{__('Legal')}}</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{route('home')}}">{{__('Dashboard')}}</a></li>
<li class="breadcrumb-item"><a class="text-muted"
href="{{route('admin.legal.index')}}">{{__('Legal')}}</a></li>
</ol>
</div>
</div>
</div>
</section>
<!-- END CONTENT HEADER -->
<!-- MAIN CONTENT -->
<section class="content">
<div class="container-fluid">
<form method="POST" enctype="multipart/form-data" class="mb-3"
action="{{ route('admin.legal.update') }}">
@csrf
@method('PATCH')
<div class="row">
<div class="col-md-6">
{{-- TOS --}}
<div class="row mb-2">
<div class="col text-center">
<h1>{{__("Terms of Service")}}</h1>
</div>
</div>
<div class="custom-control mb-3 p-0">
<textarea x-model="tos" id="tos" name="tos"
class="form-control @error('tos') is-invalid @enderror">
{{ $tos }}
</textarea>
@error('motd-message')
<div class="text-danger">
{{ $message }}
</div>
@enderror
</div>
</div>
<div class="col-md-6">
{{-- PRIVACY --}}
<div class="row mb-2">
<div class="col text-center">
<h1>{{__("Privacy Policy")}}</h1>
</div>
</div>
<div class="custom-control mb-3 p-0">
<textarea x-model="privacy" id="privacy" name="privacy"
class="form-control @error('privacy') is-invalid @enderror">
{{ $privacy }}
</textarea>
@error('privacy')
<div class="text-danger">
{{ $message }}
</div>
@enderror
</div>
</div>
<div class="col-md-6">
{{-- Imprint --}}
<div class="row mb-2">
<div class="col text-center">
<h1>{{__("Imprint")}}</h1>
</div>
</div>
<div class="custom-control mb-3 p-0">
<textarea x-model="imprint" id="imprint" name="imprint"
class="form-control @error('imprint') is-invalid @enderror">
{{ $imprint }}
</textarea>
@error('imprint')
<div class="text-danger">
{{ $message }}
</div>
@enderror
</div>
</div>
</div>
<div class="row">
<button class="btn btn-primary ml-3 mt-3">{{ __('Save') }}</button>
</div>
</form>
</div>
<!-- END CUSTOM CONTENT -->
</section>
<!-- END CONTENT -->
<script>tinymce.init({selector:'textarea',promotion: false,skin: "oxide-dark",
content_css: "dark",branding: false, height: 500,
plugins: ['image','link'],});
</script>
@endsection

View file

@ -6,12 +6,12 @@
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>{{__('Vouchers')}}</h1>
<h1>{{__('Partner')}}</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{route('home')}}">{{__('Dashboard')}}</a></li>
<li class="breadcrumb-item"><a href="{{route('admin.partners.index')}}">{{__('Vouchers')}}</a>
<li class="breadcrumb-item"><a href="{{route('admin.partners.index')}}">{{__('Partner')}}</a>
</li>
<li class="breadcrumb-item"><a class="text-muted"
href="{{route('admin.partners.create')}}">{{__('Create')}}</a>
@ -40,19 +40,14 @@
@csrf
<div class="form-group">
<label for="user_id">{{__('User')}}</label>
<select id="user_id" style="width:100%"
class="custom-select @error('user') is-invalid @enderror" name="user_id" autocomplete="off">
@foreach($users as $user)
<option @if($partners->contains('user_id' , $user->id)) disabled @endif
value="{{$user->id}}">{{$user->name}} ({{$user->email}})</option>
@endforeach
</select>
@error('user')
<div class="text-danger">
{{$message}}
<div class="custom-control mb-3 p-0">
<label for="user_id">{{ __('User') }}:
</label>
<select id="user_id" style="width:100%" class="custom-select" name="user_id" required
autocomplete="off" @error('user_id') is-invalid @enderror>
</select>
</div>
@enderror
</div>
<div class="form-group">
@ -143,5 +138,75 @@
})
</script>
<script type="application/javascript">
function initUserIdSelect(data) {
function escapeHtml(str) {
var div = document.createElement('div');
div.appendChild(document.createTextNode(str));
return div.innerHTML;
}
@endsection
$('#user_id').select2({
ajax: {
url: '/admin/users.json',
dataType: 'json',
delay: 250,
data: function (params) {
return {
filter: { name: params.term },
page: params.page,
};
},
processResults: function (data, params) {
return { results: data };
},
cache: true,
},
data: data,
escapeMarkup: function (markup) { return markup; },
minimumInputLength: 2,
templateResult: function (data) {
if (data.loading) return escapeHtml(data.text);
return '<div class="user-block"> \
<img class="img-circle img-bordered-xs" src="' + escapeHtml(data.avatarUrl) + '?s=120" alt="User Image"> \
<span class="username"> \
<a href="#">' + escapeHtml(data.name) +'</a> \
</span> \
<span class="description"><strong>' + escapeHtml(data.email) + '</strong>' + '</span> \
</div>';
},
templateSelection: function (data) {
return '<div> \
<span> \
<img class="img-rounded img-bordered-xs" src="' + escapeHtml(data.avatarUrl) + '?s=120" style="height:28px;margin-top:-4px;" alt="User Image"> \
</span> \
<span style="padding-left:5px;"> \
' + escapeHtml(data.name) + ' (<strong>' + escapeHtml(data.email) + '</strong>) \
</span> \
</div>';
}
});
}
$(document).ready(function() {
@if (old('user_id'))
$.ajax({
url: '/admin/users.json?user_id={{ old('user_id') }}',
dataType: 'json',
}).then(function (data) {
initUserIdSelect([ data ]);
});
@else
initUserIdSelect();
@endif
});
</script>
@endsection

View file

@ -20,11 +20,9 @@
<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>
<label for="show-tos">{{ __('Show Terms of Service') }} <small><a href="/admin/legal">({{ __('edit content') }})</a></small> </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 <b>'.Qirolab\Theme\Theme::path($path = "views").'/information/tos-content.blade.php</b>') }}"
class="fas fa-info-circle"></i>
</div>
</div>
<div class="custom-control mb-1 p-0">
@ -33,11 +31,9 @@
<input value="true" id="show-imprint" name="show-imprint"
{{ config('SETTINGS::SYSTEM:SHOW_IMPRINT') == 'true' ? 'checked' : '' }}
type="checkbox">
<label for="show-imprint">{{ __('Show Imprint') }} </label>
<label for="show-imprint">{{ __('Show Imprint') }} <small><a href="/admin/legal">({{ __('edit content') }})</a></small> </label>
</div>
<i data-toggle="popover" data-trigger="hover" data-html="true"
data-content="{{ __('Show the imprint link in the footer of every page. <br> Edit the content in <b>'.Qirolab\Theme\Theme::path($path = "views").'/resources/views/information/imprint-content.blade.php</b>') }}"
class="fas fa-info-circle"></i>
</div>
</div>
<div class="custom-control mb-1 p-0">
@ -46,11 +42,9 @@
<input value="true" id="show-privacy" name="show-privacy"
{{ config('SETTINGS::SYSTEM:SHOW_PRIVACY') == 'true' ? 'checked' : '' }}
type="checkbox">
<label for="show-privacy">{{ __('Show Privacy Policy') }} </label>
<label for="show-privacy">{{ __('Show Privacy Policy') }} <small><a href="/admin/legal">({{ __('edit content') }})</a></small> </label>
</div>
<i data-toggle="popover" data-trigger="hover" data-html="true"
data-content="{{ __('Show the privacy policy link in the footer of every page. <br> Edit the content in <b>'.Qirolab\Theme\Theme::path($path = "views").'/resources/views/information/privacy-content.blade.php</b>') }}"
class="fas fa-info-circle"></i>
</div>
</div>
<div class="custom-control mb-1 p-0">
@ -184,7 +178,7 @@
type="checkbox">
<label for="enable-disable-new-users">{{ __('Creation of new users') }} </label>
<i data-toggle="popover" data-trigger="hover" data-html="true" class="fas fa-info-circle"
data-content="{{ __('If unchecked, it will disable the registration of new users in the system, and this will also apply to the API.') }}">
data-content="{{ __('Enable the registration of new users on the system.') }}">
</i>
</div>
@ -271,7 +265,7 @@
<label for="enable-disable-servers">{{ __('Creation of new servers') }} </label>
</div>
<i data-toggle="popover" data-trigger="hover" data-html="true"
data-content="{{ __('If unchecked, it will disable the creation of new servers for regular users and system moderators, this has no effect for administrators.') }}"
data-content="{{ __('Enables the creation of new servers for regular users.') }}"
class="fas fa-info-circle"></i>
</div>
</div>
@ -481,7 +475,7 @@
</div>
</form>
</div>
<script>tinymce.init({selector:'textarea',skin: "oxide-dark",
<script>tinymce.init({selector:'textarea',promotion: false,skin: "oxide-dark",
content_css: "dark",branding: false, height: 500,
plugins: ['image','link'],});
</script>

View file

@ -94,6 +94,23 @@
@enderror
</div>
<div class="form-group">
<label for="position">{{__('Position')}}</label>
<select id="position" style="width:100%" class="custom-select" name="position[]"
required multiple autocomplete="off" @error('position') is-invalid @enderror>
@foreach ($positions as $position)
<option id="{{$position->value}}" value="{{ $position->value }}">
{{ __($position->value) }}
</option>
@endforeach
</select>
@error('position')
<div class="text-danger">
{{$message}}
</div>
@enderror
</div>
<div class="form-group text-right">
<button type="submit" class="btn btn-primary">
@ -111,6 +128,7 @@
<!-- END CONTENT -->
<script>
document.addEventListener('DOMContentLoaded', (event) => {
$('.custom-select').select2();
// Summernote
$('#description').summernote({
height: 100,
@ -127,6 +145,8 @@
]
})
})
</script>
@endsection

View file

@ -95,6 +95,23 @@
@enderror
</div>
<div class="form-group">
<label for="position">{{__('Position')}}</label>
<select id="position" style="width:100%" class="custom-select" name="position[]"
required multiple autocomplete="off" @error('position') is-invalid @enderror>
@foreach ($positions as $position)
<option id="{{$position->value}}" value="{{ $position->value }}" @if (strpos($link->position, $position->value) !== false) selected @endif>
{{ __($position->value) }}
</option>
@endforeach
</select>
@error('position')
<div class="text-danger">
{{$message}}
</div>
@enderror
</div>
<div class="form-group text-right">
<button type="submit" class="btn btn-primary">
@ -113,6 +130,7 @@
<script>
document.addEventListener('DOMContentLoaded', (event) => {
$('.custom-select').select2();
// Summernote
$('#description').summernote({
height: 100,

View file

@ -41,6 +41,7 @@
<th width="50">{{__('Icon')}}</th>
<th>{{__('Title')}}</th>
<th>{{__('Link')}}</th>
<th>{{__('Position')}}</th>
<th>{{__('Created at')}}</th>
<th></th>
</tr>
@ -79,6 +80,7 @@
{data: 'icon'},
{data: 'title'},
{data: 'link'},
{data: 'position'},
{data: 'created_at'},
{data: 'actions', sortable: false},
],

View file

@ -133,7 +133,7 @@
</div>
<!-- /.card-header -->
<div class="card-body">
@foreach ($useful_links as $useful_link)
@foreach ($useful_links_dashboard as $useful_link)
<div class="alert alert-dismissible">
<button type="button" class="close" data-dismiss="alert"
aria-hidden="true">×</button>

View file

@ -16,24 +16,21 @@
href="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('favicon.ico') ? \Illuminate\Support\Facades\Storage::disk('public')->url('favicon.ico') : asset('favicon.ico') }}"
type="image/x-icon">
<!-- Scripts -->
<script src="{{ asset('js/app.js') }}" defer></script>
<!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
<link rel="preload" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}" as="style"
onload="this.onload=null;this.rel='stylesheet'">
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
<noscript>
<link rel="stylesheet" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}">
</noscript>
@if (config('SETTINGS::RECAPTCHA:ENABLED') == 'true')
{!! htmlScriptTagJsApi() !!}
@endif
@vite('themes/default/sass/app.scss')
</head>
@yield('content')

View file

@ -22,8 +22,6 @@
{{-- summernote --}}
<link rel="stylesheet" href="{{ asset('plugins/summernote/summernote-bs4.min.css') }}">
{{-- datetimepicker --}}
<link rel="stylesheet"
href="{{ asset('plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css') }}">
@ -31,7 +29,6 @@
{{-- select2 --}}
<link rel="stylesheet" href="{{ asset('plugins/select2/css/select2.min.css') }}">
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
<link rel="preload" href="{{ asset('plugins/fontawesome-free/css/all.min.css') }}" as="style"
onload="this.onload=null;this.rel='stylesheet'">
<noscript>
@ -40,6 +37,7 @@
<script src="{{ asset('js/app.js') }}"></script>
<!-- tinymce -->
<script src={{ asset('plugins/tinymce/js/tinymce/tinymce.min.js') }}></script>
@vite('themes/default/sass/app.scss')
</head>
<body class="sidebar-mini layout-fixed dark-mode" style="height: auto;">
@ -62,6 +60,7 @@
class="fab fa-discord mr-2"></i>{{ __('Discord') }}</a>
</li>
@endif
<!-- Language Selection -->
@if (config('SETTINGS::LOCALE:CLIENTS_CAN_CHANGE') == 'true')
<li class="nav-item dropdown">
@ -86,6 +85,12 @@
</li>
<!-- End Language Selection -->
@endif
@foreach($useful_links as $link)
<li class="nav-item d-none d-sm-inline-block">
<a href="{{ $link->link }}" class="nav-link" target="__blank"><i
class="{{$link->icon}}"></i> {{ $link->title }}</a>
</li>
@endforeach
</ul>
<!-- Right navbar links -->
@ -374,6 +379,14 @@
</a>
</li>
<li class="nav-item">
<a href="{{ route('admin.legal.index') }}"
class="nav-link @if (Request::routeIs('admin.legal.*')) active @endif">
<i class="nav-icon fas fa-link"></i>
<p>{{ __('Legal Sites') }}</p>
</a>
</li>
<li class="nav-header">{{ __('Logs') }}</li>
<li class="nav-item">
@ -429,7 +442,7 @@
href="{{ url('/') }}">{{ env('APP_NAME', 'Laravel') }}</a>.</strong>
All rights
reserved. Powered by <a href="https://controlpanel.gg">ControlPanel</a>.
@if (!str_contains(config('BRANCHNAME'), 'main'))
@if (!str_contains(config('BRANCHNAME'), 'main') && !str_contains(config('BRANCHNAME'), 'unknown'))
Version <b>{{ config('app')['version'] }} - {{ config('BRANCHNAME') }}</b>
@endif

View file

@ -0,0 +1,132 @@
@extends('layouts.main')
@section('content')
<!-- CONTENT HEADER -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>{{ __('Ticket Categories') }}</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item"><a href="{{ route('home') }}">{{ __('Dashboard') }}</a></li>
<li class="breadcrumb-item"><a class="text-muted"
href="{{ route("moderator.ticket.category.index") }}">{{ __('Ticket Categories') }}</a>
</li>
</ol>
</div>
</div>
</div>
</section>
<!-- END CONTENT HEADER -->
<!-- MAIN CONTENT -->
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-lg-8">
<div class="card">
<div class="card-header">
<div class="d-flex justify-content-between">
<h5 class="card-title"><i class="fas fas fa-users mr-2"></i>{{__('Categories')}}</h5>
</div>
</div>
<div class="card-body table-responsive">
<table id="datatable" class="table table-striped">
<thead>
<tr>
<th>{{__('ID')}}</th>
<th>{{__('Name')}}</th>
<th>{{__('Tickets')}}</th>
<th>{{__('Created At')}}</th>
<th>{{__('Actions')}}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="card">
<div class="card-header">
<h5 class="card-title">{{__('Add Category')}}
</div>
<div class="card-body">
<form action="{{route("moderator.ticket.category.store")}}" method="POST" class="ticket-form">
@csrf
<div class="form-group ">
<label for="name" class="control-label">{{__("Name")}}</label>
<input id="name" type="text" class="form-control" name="name" required>
</div>
<button type="submit" class="btn btn-primary">
{{__('Submit')}}
</button>
</form>
</div>
</div>
<div class="card">
<div class="card-header">
<h5 class="card-title">{{__('Edit Category')}}
</div>
<div class="card-body">
<form action="{{route("moderator.ticket.category.update","1")}}" method="POST" class="ticket-form">
@csrf
@method('PATCH')
<select id="category" style="width:100%" class="custom-select" name="category"
required autocomplete="off" @error('category') is-invalid @enderror>
@foreach ($categories as $category)
<option value="{{ $category->id }}">{{ __($category->name) }}</option>
@endforeach
</select>
<div class="form-group ">
<label for="name" class="control-label">{{__("New Name")}}</label>
<input id="name" type="text" class="form-control" name="name" required>
</div>
<button type="submit" class="btn btn-primary">
{{__('Submit')}}
</button>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- END CONTENT -->
<script>
document.addEventListener("DOMContentLoaded", function () {
$('#datatable').DataTable({
language: {
url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{config("SETTINGS::LOCALE:DATATABLES")}}.json'
},
processing: true,
serverSide: true,
stateSave: true,
ajax: "{{route('moderator.ticket.category.datatable')}}",
columns: [
{data: 'id'},
{data: 'name'},
{data: 'tickets'},
{data: 'created_at', sortable: false},
{data: 'actions', sortable: false},
],
fnDrawCallback: function( oSettings ) {
$('[data-toggle="popover"]').popover();
}
});
});
document.addEventListener('DOMContentLoaded', (event) => {
$('.custom-select').select2();
})
</script>
@endsection

View file

@ -30,8 +30,11 @@
<div class="d-flex justify-content-between">
<h5 class="card-title"><i class="fas fa-ticket-alt mr-2"></i>{{__('Ticket List')}}</h5>
</div>
<a href="{{route("moderator.ticket.category.index")}}"><button class="btn btn-primary float-right">+ {{__("Add Category")}}</button></a>
</div>
<div class="card-body table-responsive">
<table id="datatable" class="table table-striped">

View file

@ -35,22 +35,40 @@
<div class="card-body">
<div class="ticket-info">
@if(!empty($server))
<p><b>Server:</b> <a href="{{ config("SETTINGS::SYSTEM:PTERODACTYL:URL") . '/admin/servers/view/' . $server->pterodactyl_id }}" target="__blank">{{ $server->name }}</a></p>
<p><b>{{__("Server")}}:</b> <a href="{{ config("SETTINGS::SYSTEM:PTERODACTYL:URL") . '/admin/servers/view/' . $server->pterodactyl_id }}" target="__blank">{{ $server->name }}</a></p>
@endif
<p><b>Title:</b> {{ $ticket->title }}</p>
<p><b>Category:</b> {{ $ticketcategory->name }}</p>
<p>
@if ($ticket->status === 'Open')
<b>Status:</b> <span class="badge badge-success">Open</span>
@elseif ($ticket->status === 'Closed')
<b>Status:</b> <span class="badge badge-danger">Closed</span>
@elseif ($ticket->status === 'Answered')
<b>Status:</b> <span class="badge badge-info">Answered</span>
@elseif ($ticket->status === 'Client Reply')
<b>Status:</b> <span class="badge badge-warning">Client Reply</span>
@endif
<p><b>{{__("Title")}}:</b> {{ $ticket->title }}</p>
<p><b>{{__("Category")}}:</b> {{ $ticketcategory->name }}</p>
<p><b>{{__("Status")}}:</b>
@switch($ticket->status)
@case("Open")
<span class="badge badge-success">{{__("Open")}}</span>
@break
@case("Closed")
<span class="badge badge-danger">{{__("Closed")}}</span>
@break
@case("Answered")
<span class="badge badge-info">{{__("Answered")}}</span>
@break
@case("Client Reply")
<span class="badge badge-warning">{{__("Client Reply")}}</span>
@break
@endswitch
</p>
<p><b>Created on:</b> {{ $ticket->created_at->diffForHumans() }}</p>
<p><b>Priority:</b>
@switch($ticket->priority)
@case("Low")
<span class="badge badge-success">{{__("Low")}}</span>
@break
@case("Medium")
<span class="badge badge-warning">{{__("Closed")}}</span>
@break
@case("High")
<span class="badge badge-danger">{{__("Answered")}}</span>
@break
@endswitch
</p>
<p><b>{{__("Created on")}}:</b> {{ $ticket->created_at->diffForHumans() }}</p>
@if($ticket->status!='Closed')
<form class="d-inline" method="post" action="{{route('moderator.ticket.close', ['ticket_id' => $ticket->ticket_id ])}}">
{{csrf_field()}}

View file

@ -212,7 +212,7 @@
{{ __('Required') }} {{ CREDITS_DISPLAY_NAME }}
{{ __('to create this server') }}</span>
<span class="d-inline-block"
x-text="product.minimum_credits === -1 ? {{ config('SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER') }} : product.minimum_credit"></span>
x-text="product.minimum_credits == -1 ? {{ config('SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER') }} : product.minimum_credits"></span>
</li>
</ul>
</div>

View file

@ -77,21 +77,25 @@
<div class="row">
<!-- accepted payments column -->
<div class="col-6">
<p class="lead">{{ __('Payment Methods') }}:</p>
@if (!$productIsFree)
<p class="lead">{{ __('Payment Methods') }}:</p>
<div class="d-flex flex-wrap flex-direction-row">
@foreach ($paymentGateways as $gateway)
<div class="ml-2">
<label class="text-center" for="{{ $gateway->name }}">
<img class="mb-3" height="50" src="{{ $gateway->image }}"></br>
<input x-on:click="console.log(payment_method)" x-model="payment_method"
type="radio" id="{{ $gateway->name }}"
value="{{ $gateway->name }}">
</input>
</label>
</div>
@endforeach
</div>
<div class="d-flex flex-wrap flex-direction-row">
@foreach ($paymentGateways as $gateway)
<div class="ml-2">
<label class="text-center" for="{{ $gateway->name }}">
<img class="mb-3" height="50"
src="{{ $gateway->image }}"></br>
<input x-on:click="console.log(payment_method)"
x-model="payment_method" type="radio"
id="{{ $gateway->name }}" value="{{ $gateway->name }}">
</input>
</label>
</div>
@endforeach
</div>
@endif
</div>
<!-- /.col -->
@ -129,11 +133,15 @@
<!-- this row will not appear when printing -->
<div class="row no-print">
<div class="col-12">
<button :disabled="!payment_method || clicked"
:class="!payment_method || clicked ? 'disabled' : ''"
<button :disabled="(!payment_method || clicked) && {{ !$productIsFree }}"
:class="(!payment_method || clicked) && {{ !$productIsFree }} ? 'disabled' : ''"
class="btn btn-success float-right"><i class="far fa-credit-card mr-2"
@click="clicked = true"></i>
{{ __('Submit Payment') }}
@if ($productIsFree)
{{ __('Get for free') }}
@else
{{ __('Submit Payment') }}
@endif
</button>
</div>
</div>

View file

@ -46,14 +46,14 @@
</div>
@if ($servers->count() >= 1)
<div class="form-group col-sm-12 {{ $errors->has('server') ? ' has-error' : '' }}">
<label for="server" class="control-label">Servers</label>
<label for="server" class="control-label">{{__("Server")}}</label>
<select id="server" type="server" class="form-control" name="server">
<option value="">Select Servers</option>
<option value="">{{__("Select Servers")}}</option>
@foreach ($servers as $server)
<option value="{{ $server->id }}">{{ $server->name }}</option>
@endforeach
</select>
@if ($errors->has('category'))
<span class="help-block">
<strong>{{ $errors->first('ticketcategory') }}</strong>
@ -62,14 +62,14 @@
</div>
@endif
<div class="form-group col-sm-12 {{ $errors->has('ticketcategory') ? ' has-error' : '' }}">
<label for="ticketcategory" class="control-label">Category</label>
<select id="ticketcategory" type="ticketcategory" class="form-control" name="ticketcategory">
<option value="">Select Category</option>
<label for="ticketcategory" class="control-label">{{__("Category")}}</label>
<select id="ticketcategory" type="ticketcategory" class="form-control" required name="ticketcategory">
<option value="" disabled selected>{{__("Select Category")}}</option>
@foreach ($ticketcategories as $ticketcategory)
<option value="{{ $ticketcategory->id }}">{{ $ticketcategory->name }}</option>
@endforeach
</select>
@if ($errors->has('category'))
<span class="help-block">
<strong>{{ $errors->first('ticketcategory') }}</strong>
@ -79,10 +79,10 @@
<div class="form-group col-sm-12 {{ $errors->has('priority') ? ' has-error' : '' }}">
<label for="priority" class="control-label">Priority</label>
<select id="priority" type="" class="form-control" name="priority">
<option value="">Select Priority</option>
<option value="Low">Low</option>
<option value="Medium">Medium</option>
<option value="High">High</option>
<option value="" disabled selected>{{__("Select Priority")}}</option>
<option value="Low">{{__("Low")}}</option>
<option value="Medium">{{__("Medium")}}</option>
<option value="High">{{__("High")}}</option>
</select>
@if ($errors->has('priority'))
<span class="help-block">
@ -108,7 +108,7 @@
<div class="card-body">
<div class="form-group col-sm-12 {{ $errors->has('message') ? ' has-error' : '' }}">
<label for="message" class="control-label">Message</label>
<textarea rows="8" id="message" class="form-control" name="message"></textarea>
<textarea rows="8" id="message" class="form-control" name="message">{{old("message")}}</textarea>
@if ($errors->has('message'))
<span class="help-block">
<strong>{{ $errors->first('message') }}</strong>
@ -124,12 +124,12 @@
</section>
<!-- END CONTENT -->
<script type="text/javascript">
$(".ticket-form").submit(function (e) {
$(".ticket-once").attr("disabled", true);
$(".ticket-form").submit(function (e) {
$(".ticket-once").attr("disabled", true);
return true;
})
</script>
@endsection

View file

@ -86,12 +86,13 @@
serverSide: true,
stateSave: true,
ajax: "{{route('ticket.datatable')}}",
order: [[ 4, "desc" ]],
columns: [
{data: 'category'},
{data: 'title'},
{data: 'priority'},
{data: 'status'},
{data: 'updated_at', sortable: false},
{data: 'updated_at', type: 'num', render: {_: 'display', sort: 'raw'}},
{data: 'actions', sortable: false},
],
fnDrawCallback: function( oSettings ) {

View file

@ -35,22 +35,40 @@
<div class="card-body">
<div class="ticket-info">
@if(!empty($server))
<p><b>Server:</b> <a href="{{ config('SETTINGS::SYSTEM:PTERODACTYL:URL') }}/server/{{ $server->identifier }}" target="__blank">{{ $server->name }} </a></p>
<p><b>{{__("Server")}}:</b> <a href="{{ config('SETTINGS::SYSTEM:PTERODACTYL:URL') }}/server/{{ $server->identifier }}" target="__blank">{{ $server->name }} </a></p>
@endif
<p><b>Title:</b> {{ $ticket->title }}</p>
<p><b>Category:</b> {{ $ticketcategory->name }}</p>
<p>
@if ($ticket->status === 'Open')
<b>Status:</b> <span class="badge badge-success">Open</span>
@elseif ($ticket->status === 'Closed')
<b>Status:</b> <span class="badge badge-danger">Closed</span>
@elseif ($ticket->status === 'Answered')
<b>Status:</b> <span class="badge badge-info">Answered</span>
@elseif ($ticket->status === 'Client Reply')
<b>Status:</b> <span class="badge badge-warning">Client Reply</span>
@endif
</p>
<p><b>Created on:</b> {{ $ticket->created_at->diffForHumans() }}</p>
<p><b>{{__("Title")}}:</b> {{ $ticket->title }}</p>
<p><b>{{__("Category")}}:</b> {{ $ticketcategory->name }}</p>
<p><b>{{__("Status")}}:</b>
@switch($ticket->status)
@case("Open")
<span class="badge badge-success">{{__("Open")}}</span>
@break
@case("Closed")
<span class="badge badge-danger">{{__("Closed")}}</span>
@break
@case("Answered")
<span class="badge badge-info">{{__("Answered")}}</span>
@break
@case("Client Reply")
<span class="badge badge-warning">{{__("Client Reply")}}</span>
@break
@endswitch
</p>
<p><b>Priority:</b>
@switch($ticket->priority)
@case("Low")
<span class="badge badge-success">{{__("Low")}}</span>
@break
@case("Medium")
<span class="badge badge-warning">{{__("Closed")}}</span>
@break
@case("High")
<span class="badge badge-danger">{{__("Answered")}}</span>
@break
@endswitch
</p>
<p><b>{{__("Created on")}}:</b> {{ $ticket->created_at->diffForHumans() }}</p>
@if($ticket->status!='Closed')
<form class="d-inline" method="post"
action="{{route('ticket.close', ['ticket_id' => $ticket->ticket_id ])}}">
@ -145,12 +163,12 @@
</section>
<!-- END CONTENT -->
<script type="text/javascript">
$(".reply-form").submit(function (e) {
$(".reply-once").attr("disabled", true);
$(".reply-form").submit(function (e) {
$(".reply-once").attr("disabled", true);
return true;
})
</script>
@endsection

View file

@ -11,7 +11,7 @@ export default defineConfig({
"themes/default/sass/app.scss",
"themes/default/js/app.js"
],
buildDirectory: "default",
buildDirectory: "build",
}),

16
webpack.mix.js vendored
View file

@ -1,16 +0,0 @@
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css')
.sourceMaps();