add theme support
This commit is contained in:
parent
ee1526fa11
commit
9b7ca02f00
176 changed files with 11875 additions and 62 deletions
|
@ -7,6 +7,8 @@ use App\Models\Settings;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use Qirolab\Theme\Theme;
|
||||||
|
|
||||||
|
|
||||||
class System
|
class System
|
||||||
{
|
{
|
||||||
|
@ -102,6 +104,7 @@ class System
|
||||||
"SETTINGS::SYSTEM:ALERT_ENABLED" => "alert-enabled",
|
"SETTINGS::SYSTEM:ALERT_ENABLED" => "alert-enabled",
|
||||||
"SETTINGS::SYSTEM:ALERT_TYPE" => "alert-type",
|
"SETTINGS::SYSTEM:ALERT_TYPE" => "alert-type",
|
||||||
"SETTINGS::SYSTEM:ALERT_MESSAGE" => "alert-message",
|
"SETTINGS::SYSTEM:ALERT_MESSAGE" => "alert-message",
|
||||||
|
"SETTINGS::SYSTEM:THEME" => "theme",
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($values as $key => $value) {
|
foreach ($values as $key => $value) {
|
||||||
|
@ -111,6 +114,11 @@ class System
|
||||||
Cache::forget('setting'.':'.$key);
|
Cache::forget('setting'.':'.$key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//SET THEME
|
||||||
|
$theme = $request->get('theme');
|
||||||
|
Theme::set($theme);
|
||||||
|
|
||||||
|
|
||||||
return redirect(route('admin.settings.index').'#system')->with('success', __('System settings updated!'));
|
return redirect(route('admin.settings.index').'#system')->with('success', __('System settings updated!'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ use Illuminate\Contracts\Foundation\Application;
|
||||||
use Illuminate\Contracts\View\Factory;
|
use Illuminate\Contracts\View\Factory;
|
||||||
use Illuminate\Contracts\View\View;
|
use Illuminate\Contracts\View\View;
|
||||||
use Illuminate\Http\Response;
|
use Illuminate\Http\Response;
|
||||||
|
use Qirolab\Theme\Theme;
|
||||||
|
|
||||||
class SettingsController extends Controller
|
class SettingsController extends Controller
|
||||||
{
|
{
|
||||||
|
@ -17,12 +18,15 @@ class SettingsController extends Controller
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//Get all tabs as laravel view paths
|
//Get all tabs as laravel view paths
|
||||||
$tabs = [];
|
$tabs = [];
|
||||||
foreach (glob(resource_path('views/admin/settings/tabs/*.blade.php')) as $filename) {
|
foreach (glob(Theme::getViewPaths()[0] . '/admin/settings/tabs/*.blade.php') as $filename) {
|
||||||
$tabs[] = 'admin.settings.tabs.'.basename($filename, '.blade.php');
|
$tabs[] = 'admin.settings.tabs.'.basename($filename, '.blade.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Generate a html list item for each tab based on tabs file basename, set first tab as active
|
//Generate a html list item for each tab based on tabs file basename, set first tab as active
|
||||||
$tabListItems = [];
|
$tabListItems = [];
|
||||||
foreach ($tabs as $tab) {
|
foreach ($tabs as $tab) {
|
||||||
|
@ -33,9 +37,13 @@ class SettingsController extends Controller
|
||||||
</a></li>';
|
</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$themes = array_diff(scandir(base_path('themes')), array('..', '.'));
|
||||||
|
|
||||||
return view('admin.settings.index', [
|
return view('admin.settings.index', [
|
||||||
'tabs' => $tabs,
|
'tabs' => $tabs,
|
||||||
'tabListItems' => $tabListItems,
|
'tabListItems' => $tabListItems,
|
||||||
|
'themes' => $themes,
|
||||||
|
'active_theme' => Theme::active(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ use Illuminate\Support\Facades\Log;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
use Qirolab\Theme\Theme;
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
@ -60,6 +61,15 @@ class AppServiceProvider extends ServiceProvider
|
||||||
config([$setting->key => $setting->value]);
|
config([$setting->key => $setting->value]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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"));
|
||||||
|
}
|
||||||
|
|
||||||
// Set Mail Config
|
// Set Mail Config
|
||||||
//only update config if mail settings have changed in DB
|
//only update config if mail settings have changed in DB
|
||||||
if (
|
if (
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
"league/flysystem-aws-s3-v3": "^3.0",
|
"league/flysystem-aws-s3-v3": "^3.0",
|
||||||
"paypal/paypal-checkout-sdk": "^1.0",
|
"paypal/paypal-checkout-sdk": "^1.0",
|
||||||
"paypal/rest-api-sdk-php": "^1.14",
|
"paypal/rest-api-sdk-php": "^1.14",
|
||||||
|
"qirolab/laravel-themer": "^2.0",
|
||||||
"socialiteproviders/discord": "^4.1",
|
"socialiteproviders/discord": "^4.1",
|
||||||
"spatie/laravel-activitylog": "^4.4",
|
"spatie/laravel-activitylog": "^4.4",
|
||||||
"spatie/laravel-query-builder": "^5.0",
|
"spatie/laravel-query-builder": "^5.0",
|
||||||
|
|
125
composer.lock
generated
125
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "8c024e627a38373a5d538e20061aff8f",
|
"content-hash": "be76c9bab8622d363a4eb843794e9e3e",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "aws/aws-crt-php",
|
"name": "aws/aws-crt-php",
|
||||||
|
@ -1126,6 +1126,59 @@
|
||||||
],
|
],
|
||||||
"time": "2023-01-02T17:26:14+00:00"
|
"time": "2023-01-02T17:26:14+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "facade/ignition-contracts",
|
||||||
|
"version": "1.0.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/facade/ignition-contracts.git",
|
||||||
|
"reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/facade/ignition-contracts/zipball/3c921a1cdba35b68a7f0ccffc6dffc1995b18267",
|
||||||
|
"reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^7.3|^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"friendsofphp/php-cs-fixer": "^v2.15.8",
|
||||||
|
"phpunit/phpunit": "^9.3.11",
|
||||||
|
"vimeo/psalm": "^3.17.1"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Facade\\IgnitionContracts\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Freek Van der Herten",
|
||||||
|
"email": "freek@spatie.be",
|
||||||
|
"homepage": "https://flareapp.io",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Solution contracts for Ignition",
|
||||||
|
"homepage": "https://github.com/facade/ignition-contracts",
|
||||||
|
"keywords": [
|
||||||
|
"contracts",
|
||||||
|
"flare",
|
||||||
|
"ignition"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/facade/ignition-contracts/issues",
|
||||||
|
"source": "https://github.com/facade/ignition-contracts/tree/1.0.2"
|
||||||
|
},
|
||||||
|
"time": "2020-10-16T08:27:54+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "fruitcake/php-cors",
|
"name": "fruitcake/php-cors",
|
||||||
"version": "v1.2.0",
|
"version": "v1.2.0",
|
||||||
|
@ -4180,6 +4233,76 @@
|
||||||
},
|
},
|
||||||
"time": "2022-12-23T17:47:18+00:00"
|
"time": "2022-12-23T17:47:18+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "qirolab/laravel-themer",
|
||||||
|
"version": "2.0.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/qirolab/laravel-themer.git",
|
||||||
|
"reference": "9c4e17fe7334c921bf5c57395d926154cc25a1e8"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/qirolab/laravel-themer/zipball/9c4e17fe7334c921bf5c57395d926154cc25a1e8",
|
||||||
|
"reference": "9c4e17fe7334c921bf5c57395d926154cc25a1e8",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"facade/ignition-contracts": "^1.0",
|
||||||
|
"illuminate/support": "^9.19",
|
||||||
|
"php": ">=7.1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"orchestra/testbench": "^7.0",
|
||||||
|
"phpunit/phpunit": "^8.3|^9.0",
|
||||||
|
"vimeo/psalm": "^4.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"providers": [
|
||||||
|
"Qirolab\\Theme\\ThemeServiceProvider"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Qirolab\\Theme\\": "src",
|
||||||
|
"Qirolab\\Theme\\Database\\Factories\\": "database/factories"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Harish Kumar",
|
||||||
|
"email": "harish@qirolab.com",
|
||||||
|
"homepage": "https://qirolab.com",
|
||||||
|
"role": "Developer"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "A Laravel theme manager, that will help you organize and maintain your themes inside Laravel projects.",
|
||||||
|
"homepage": "https://qirolab.com",
|
||||||
|
"keywords": [
|
||||||
|
"laravel",
|
||||||
|
"laravel-theme",
|
||||||
|
"qirolab",
|
||||||
|
"theme"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/qirolab/laravel-themer/issues",
|
||||||
|
"source": "https://github.com/qirolab/laravel-themer/tree/2.0.2"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://www.buymeacoffee.com/qirolab",
|
||||||
|
"type": "other"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2022-09-03T21:30:32+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "ralouphie/getallheaders",
|
"name": "ralouphie/getallheaders",
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
|
|
34
config/theme.php
Normal file
34
config/theme.php
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Active Theme
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| It will assign the default active theme to be used if one is not set during
|
||||||
|
| runtime.
|
||||||
|
*/
|
||||||
|
'active' => null,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Parent Theme
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is a parent theme for the theme specified in the active config
|
||||||
|
| option. It works like the WordPress style theme hierarchy, if the blade
|
||||||
|
| file is not found in the currently active theme, then it will look for it
|
||||||
|
| in the parent theme.
|
||||||
|
*/
|
||||||
|
'parent' => "default",
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Base Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The base path where all the themes are located.
|
||||||
|
*/
|
||||||
|
'base_path' => base_path('themes')
|
||||||
|
];
|
|
@ -597,5 +597,12 @@ class SettingsSeeder extends Seeder
|
||||||
'type' => 'text',
|
'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',
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
169
package-lock.json
generated
169
package-lock.json
generated
|
@ -1,20 +1,20 @@
|
||||||
{
|
{
|
||||||
"name": "controllpanelgg",
|
"name": "dashboard",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"axios": "^0.21",
|
"axios": "^0.25",
|
||||||
"bootstrap": "^4.0.0",
|
"bootstrap": "^4.6.0",
|
||||||
"jquery": "^3.2",
|
"jquery": "^3.5",
|
||||||
"laravel-mix": "^6.0.6",
|
"laravel-mix": "^6.0.6",
|
||||||
"lodash": "^4.17.19",
|
"lodash": "^4.17.19",
|
||||||
"popper.js": "^1.12",
|
"popper.js": "^1.16",
|
||||||
"postcss": "^8.1.14",
|
"postcss": "^8.1.14",
|
||||||
"resolve-url-loader": "^3.1.2",
|
"resolve-url-loader": "^3.1.2",
|
||||||
"sass": "^1.15.2",
|
"sass": "^1.32.1",
|
||||||
"sass-loader": "^8.0.0"
|
"sass-loader": "^10.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@babel/code-frame": {
|
"node_modules/@babel/code-frame": {
|
||||||
|
@ -1633,9 +1633,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/json-schema": {
|
"node_modules/@types/json-schema": {
|
||||||
"version": "7.0.7",
|
"version": "7.0.11",
|
||||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
|
||||||
"integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==",
|
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/micromatch": {
|
"node_modules/@types/micromatch": {
|
||||||
|
@ -2262,12 +2262,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/axios": {
|
"node_modules/axios": {
|
||||||
"version": "0.21.1",
|
"version": "0.25.0",
|
||||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
|
"resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz",
|
||||||
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
|
"integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"follow-redirects": "^1.10.0"
|
"follow-redirects": "^1.14.7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/babel-loader": {
|
"node_modules/babel-loader": {
|
||||||
|
@ -5454,9 +5454,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/follow-redirects": {
|
"node_modules/follow-redirects": {
|
||||||
"version": "1.13.2",
|
"version": "1.15.2",
|
||||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
||||||
"integrity": "sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==",
|
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -11728,19 +11728,19 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/sass-loader": {
|
"node_modules/sass-loader": {
|
||||||
"version": "8.0.2",
|
"version": "10.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-8.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-10.4.1.tgz",
|
||||||
"integrity": "sha512-7o4dbSK8/Ol2KflEmSco4jTjQoV988bM82P9CZdmo9hR3RLnvNc0ufMNdMrB0caq38JQ/FgF4/7RcbcfKzxoFQ==",
|
"integrity": "sha512-aX/iJZTTpNUNx/OSYzo2KsjIUQHqvWsAhhUijFjAPdZTEhstjZI9zTNvkTTwsx+uNUJqUwOw5gacxQMx4hJxGQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"clone-deep": "^4.0.1",
|
"klona": "^2.0.4",
|
||||||
"loader-utils": "^1.2.3",
|
"loader-utils": "^2.0.0",
|
||||||
"neo-async": "^2.6.1",
|
"neo-async": "^2.6.2",
|
||||||
"schema-utils": "^2.6.1",
|
"schema-utils": "^3.0.0",
|
||||||
"semver": "^6.3.0"
|
"semver": "^7.3.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 8.9.0"
|
"node": ">= 10.13.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
|
@ -11748,7 +11748,7 @@
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"fibers": ">= 3.1.0",
|
"fibers": ">= 3.1.0",
|
||||||
"node-sass": "^4.0.0",
|
"node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0",
|
||||||
"sass": "^1.3.0",
|
"sass": "^1.3.0",
|
||||||
"webpack": "^4.36.0 || ^5.0.0"
|
"webpack": "^4.36.0 || ^5.0.0"
|
||||||
},
|
},
|
||||||
|
@ -11764,13 +11764,51 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/sass-loader/node_modules/semver": {
|
"node_modules/sass-loader/node_modules/loader-utils": {
|
||||||
"version": "6.3.0",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
|
||||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"big.js": "^5.2.2",
|
||||||
|
"emojis-list": "^3.0.0",
|
||||||
|
"json5": "^2.1.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/sass-loader/node_modules/schema-utils": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
|
||||||
|
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@types/json-schema": "^7.0.8",
|
||||||
|
"ajv": "^6.12.5",
|
||||||
|
"ajv-keywords": "^3.5.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10.13.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/webpack"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/sass-loader/node_modules/semver": {
|
||||||
|
"version": "7.3.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
||||||
|
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"lru-cache": "^6.0.0"
|
||||||
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"semver": "bin/semver.js"
|
"semver": "bin/semver.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/sax": {
|
"node_modules/sax": {
|
||||||
|
@ -15169,9 +15207,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/json-schema": {
|
"@types/json-schema": {
|
||||||
"version": "7.0.7",
|
"version": "7.0.11",
|
||||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
|
||||||
"integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==",
|
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/micromatch": {
|
"@types/micromatch": {
|
||||||
|
@ -15705,12 +15743,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"axios": {
|
"axios": {
|
||||||
"version": "0.21.1",
|
"version": "0.25.0",
|
||||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
|
"resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz",
|
||||||
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
|
"integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"follow-redirects": "^1.10.0"
|
"follow-redirects": "^1.14.7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"babel-loader": {
|
"babel-loader": {
|
||||||
|
@ -18293,9 +18331,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"follow-redirects": {
|
"follow-redirects": {
|
||||||
"version": "1.13.2",
|
"version": "1.15.2",
|
||||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
||||||
"integrity": "sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==",
|
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"for-in": {
|
"for-in": {
|
||||||
|
@ -23134,23 +23172,48 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sass-loader": {
|
"sass-loader": {
|
||||||
"version": "8.0.2",
|
"version": "10.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-8.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-10.4.1.tgz",
|
||||||
"integrity": "sha512-7o4dbSK8/Ol2KflEmSco4jTjQoV988bM82P9CZdmo9hR3RLnvNc0ufMNdMrB0caq38JQ/FgF4/7RcbcfKzxoFQ==",
|
"integrity": "sha512-aX/iJZTTpNUNx/OSYzo2KsjIUQHqvWsAhhUijFjAPdZTEhstjZI9zTNvkTTwsx+uNUJqUwOw5gacxQMx4hJxGQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"clone-deep": "^4.0.1",
|
"klona": "^2.0.4",
|
||||||
"loader-utils": "^1.2.3",
|
"loader-utils": "^2.0.0",
|
||||||
"neo-async": "^2.6.1",
|
"neo-async": "^2.6.2",
|
||||||
"schema-utils": "^2.6.1",
|
"schema-utils": "^3.0.0",
|
||||||
"semver": "^6.3.0"
|
"semver": "^7.3.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"loader-utils": {
|
||||||
|
"version": "2.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz",
|
||||||
|
"integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"big.js": "^5.2.2",
|
||||||
|
"emojis-list": "^3.0.0",
|
||||||
|
"json5": "^2.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"schema-utils": {
|
||||||
|
"version": "3.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
|
||||||
|
"integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/json-schema": "^7.0.8",
|
||||||
|
"ajv": "^6.12.5",
|
||||||
|
"ajv-keywords": "^3.5.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "6.3.0",
|
"version": "7.3.8",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
||||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"lru-cache": "^6.0.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
16
package.json
16
package.json
|
@ -7,18 +7,22 @@
|
||||||
"watch-poll": "mix watch -- --watch-options-poll=1000",
|
"watch-poll": "mix watch -- --watch-options-poll=1000",
|
||||||
"hot": "mix watch --hot",
|
"hot": "mix watch --hot",
|
||||||
"prod": "npm run production",
|
"prod": "npm run production",
|
||||||
"production": "mix --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"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"axios": "^0.25",
|
"axios": "^0.25",
|
||||||
"bootstrap": "^4.0.0",
|
"bootstrap": "^4.6.0",
|
||||||
"jquery": "^3.2",
|
"jquery": "^3.5",
|
||||||
"laravel-mix": "^6.0.6",
|
"laravel-mix": "^6.0.6",
|
||||||
"lodash": "^4.17.19",
|
"lodash": "^4.17.19",
|
||||||
"popper.js": "^1.12",
|
"popper.js": "^1.16",
|
||||||
"postcss": "^8.1.14",
|
"postcss": "^8.1.14",
|
||||||
"resolve-url-loader": "^3.1.2",
|
"resolve-url-loader": "^3.1.2",
|
||||||
"sass": "^1.15.2",
|
"sass": "^1.32.1",
|
||||||
"sass-loader": "^8.0.0"
|
"sass-loader": "^10.1.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
7
themes/1day2die/js/app.js
vendored
Normal file
7
themes/1day2die/js/app.js
vendored
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
/**
|
||||||
|
* First we will load all of this project's JavaScript dependencies which
|
||||||
|
* includes Vue and other libraries. It is a great starting point when
|
||||||
|
* building robust, powerful web applications using Vue and Laravel.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import "./bootstrap";
|
48
themes/1day2die/js/bootstrap.js
vendored
Normal file
48
themes/1day2die/js/bootstrap.js
vendored
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
import _ from "lodash";
|
||||||
|
window._ = _;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
|
||||||
|
* for JavaScript based Bootstrap features such as modals and tabs. This
|
||||||
|
* code may be modified to fit the specific needs of your application.
|
||||||
|
*/
|
||||||
|
import * as Popper from "popper.js";
|
||||||
|
window.Popper = Popper;
|
||||||
|
|
||||||
|
import jquery from "jquery";
|
||||||
|
window.$ = window.jQuery = jquery;
|
||||||
|
|
||||||
|
// Import all of Bootstrap's JS
|
||||||
|
import * as bootstrap from "bootstrap";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We'll load the axios HTTP library which allows us to easily issue requests
|
||||||
|
* to our Laravel back-end. This library automatically handles sending the
|
||||||
|
* CSRF token as a header based on the value of the "XSRF" token cookie.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import axios from "axios";
|
||||||
|
window.axios = axios;
|
||||||
|
|
||||||
|
window.axios.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Echo exposes an expressive API for subscribing to channels and listening
|
||||||
|
* for events that are broadcast by Laravel. Echo and event broadcasting
|
||||||
|
* allows your team to easily build robust real-time web applications.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// import Echo from 'laravel-echo';
|
||||||
|
|
||||||
|
// import Pusher from 'pusher-js';
|
||||||
|
// window.Pusher = Pusher;
|
||||||
|
|
||||||
|
// window.Echo = new Echo({
|
||||||
|
// broadcaster: 'pusher',
|
||||||
|
// key: import.meta.env.VITE_PUSHER_APP_KEY,
|
||||||
|
// wsHost: import.meta.env.VITE_PUSHER_HOST ?? `ws-${import.meta.env.VITE_PUSHER_CLUSTER}.pusher.com`,
|
||||||
|
// wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80,
|
||||||
|
// wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443,
|
||||||
|
// forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https',
|
||||||
|
// enabledTransports: ['ws', 'wss'],
|
||||||
|
// });
|
19
themes/1day2die/sass/_variables.scss
vendored
Normal file
19
themes/1day2die/sass/_variables.scss
vendored
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
// Body
|
||||||
|
$body-bg: #f8fafc;
|
||||||
|
|
||||||
|
// Typography
|
||||||
|
$font-family-sans-serif: 'Nunito', sans-serif;
|
||||||
|
$font-size-base: 0.9rem;
|
||||||
|
$line-height-base: 1.6;
|
||||||
|
|
||||||
|
// Colors
|
||||||
|
$blue: #3490dc;
|
||||||
|
$indigo: #6574cd;
|
||||||
|
$purple: #9561e2;
|
||||||
|
$pink: #f66d9b;
|
||||||
|
$red: #e3342f;
|
||||||
|
$orange: #f6993f;
|
||||||
|
$yellow: #ffed4a;
|
||||||
|
$green: #38c172;
|
||||||
|
$teal: #4dc0b5;
|
||||||
|
$cyan: #6cb2eb;
|
8
themes/1day2die/sass/app.scss
vendored
Normal file
8
themes/1day2die/sass/app.scss
vendored
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
// Fonts
|
||||||
|
@import url('https://fonts.googleapis.com/css?family=Nunito');
|
||||||
|
|
||||||
|
// Variables
|
||||||
|
@import 'variables';
|
||||||
|
|
||||||
|
// Bootstrap
|
||||||
|
@import '~bootstrap/scss/bootstrap';
|
|
@ -0,0 +1 @@
|
||||||
|
you shall not pass nigger
|
|
@ -227,7 +227,7 @@
|
||||||
:disabled="product.minimum_credits > user.credits||product.doesNotFit == true"
|
:disabled="product.minimum_credits > user.credits||product.doesNotFit == true"
|
||||||
:class="product.minimum_credits > user.credits ? 'disabled' : ''"
|
:class="product.minimum_credits > user.credits ? 'disabled' : ''"
|
||||||
class="btn btn-primary btn-block mt-2" @click="setProduct(product.id)"
|
class="btn btn-primary btn-block mt-2" @click="setProduct(product.id)"
|
||||||
x-text=" product.doesNotFit == true? '{{ __('Server can\'t fit on this node') }}' : (product.minimum_credits > user.credits ? '{{ __('Not enough') }} {{ CREDITS_DISPLAY_NAME }}!' : '{{ __('Create server') }}')">
|
x-text=" product.doesNotFit == true? '{{ __("Server cant fit on this Node") }}' : (product.minimum_credits > user.credits ? '{{ __('Not enough') }} {{ CREDITS_DISPLAY_NAME }}!' : '{{ __('Create server') }}')">
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
37
themes/1day2die/vite.config.js
vendored
Normal file
37
themes/1day2die/vite.config.js
vendored
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
import { defineConfig } from "vite";
|
||||||
|
import laravel from "laravel-vite-plugin";
|
||||||
|
import path from "path";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [
|
||||||
|
laravel({
|
||||||
|
input: [
|
||||||
|
"themes/1day2die/sass/app.scss",
|
||||||
|
"themes/1day2die/js/app.js"
|
||||||
|
],
|
||||||
|
buildDirectory: "1day2die",
|
||||||
|
}),
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
name: "blade",
|
||||||
|
handleHotUpdate({ file, server }) {
|
||||||
|
if (file.endsWith(".blade.php")) {
|
||||||
|
server.ws.send({
|
||||||
|
type: "full-reload",
|
||||||
|
path: "*",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'@': '/themes/1day2die/js',
|
||||||
|
'~bootstrap': path.resolve('node_modules/bootstrap'),
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
});
|
19
themes/default/sass/_variables.scss
vendored
Normal file
19
themes/default/sass/_variables.scss
vendored
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
// Body
|
||||||
|
$body-bg: #f8fafc;
|
||||||
|
|
||||||
|
// Typography
|
||||||
|
$font-family-sans-serif: 'Nunito', sans-serif;
|
||||||
|
$font-size-base: 0.9rem;
|
||||||
|
$line-height-base: 1.6;
|
||||||
|
|
||||||
|
// Colors
|
||||||
|
$blue: #3490dc;
|
||||||
|
$indigo: #6574cd;
|
||||||
|
$purple: #9561e2;
|
||||||
|
$pink: #f66d9b;
|
||||||
|
$red: #e3342f;
|
||||||
|
$orange: #f6993f;
|
||||||
|
$yellow: #ffed4a;
|
||||||
|
$green: #38c172;
|
||||||
|
$teal: #4dc0b5;
|
||||||
|
$cyan: #6cb2eb;
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue