Adding full theme Support
Adding full theme Support
This commit is contained in:
commit
409255dd5c
96 changed files with 384 additions and 62 deletions
app
Classes/Settings
Http/Controllers/Admin
Providers
config
database/seeders/Seeds
package-lock.jsonpackage.jsonthemes/default
css
js
sass
views
admin
activitylogs
api
nests
nodes
overview
partners
payments
products
servers
settings
index.blade.php
tabs
store
usefullinks
users
vouchers
auth
home.blade.phpinformation
imprint-content.blade.phpimprint.blade.phpprivacy-content.blade.phpprivacy.blade.phptos-content.blade.phptos.blade.php
layouts
mail
payment
ticket
models
moderator/ticket
notifications
profile
servers
store
ticket
vendor/invoices/templates
|
@ -7,6 +7,8 @@ use App\Models\Settings;
|
|||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Qirolab\Theme\Theme;
|
||||
|
||||
|
||||
class System
|
||||
{
|
||||
|
@ -102,6 +104,7 @@ class System
|
|||
"SETTINGS::SYSTEM:ALERT_ENABLED" => "alert-enabled",
|
||||
"SETTINGS::SYSTEM:ALERT_TYPE" => "alert-type",
|
||||
"SETTINGS::SYSTEM:ALERT_MESSAGE" => "alert-message",
|
||||
"SETTINGS::SYSTEM:THEME" => "theme",
|
||||
];
|
||||
|
||||
foreach ($values as $key => $value) {
|
||||
|
@ -111,6 +114,11 @@ class System
|
|||
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!'));
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ use Illuminate\Contracts\Foundation\Application;
|
|||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Http\Response;
|
||||
use Qirolab\Theme\Theme;
|
||||
|
||||
class SettingsController extends Controller
|
||||
{
|
||||
|
@ -17,12 +18,15 @@ class SettingsController extends Controller
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
|
||||
//Get all tabs as laravel view paths
|
||||
$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');
|
||||
}
|
||||
|
||||
|
||||
//Generate a html list item for each tab based on tabs file basename, set first tab as active
|
||||
$tabListItems = [];
|
||||
foreach ($tabs as $tab) {
|
||||
|
@ -33,9 +37,13 @@ class SettingsController extends Controller
|
|||
</a></li>';
|
||||
}
|
||||
|
||||
$themes = array_diff(scandir(base_path('themes')), array('..', '.'));
|
||||
|
||||
return view('admin.settings.index', [
|
||||
'tabs' => $tabs,
|
||||
'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\Validator;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Qirolab\Theme\Theme;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
@ -60,6 +61,14 @@ class AppServiceProvider extends ServiceProvider
|
|||
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"), "default");
|
||||
}
|
||||
|
||||
// Set Mail Config
|
||||
//only update config if mail settings have changed in DB
|
||||
if (
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
"league/flysystem-aws-s3-v3": "^3.0",
|
||||
"paypal/paypal-checkout-sdk": "^1.0",
|
||||
"paypal/rest-api-sdk-php": "^1.14",
|
||||
"qirolab/laravel-themer": "^2.0",
|
||||
"socialiteproviders/discord": "^4.1",
|
||||
"spatie/laravel-activitylog": "^4.4",
|
||||
"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",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "8c024e627a38373a5d538e20061aff8f",
|
||||
"content-hash": "be76c9bab8622d363a4eb843794e9e3e",
|
||||
"packages": [
|
||||
{
|
||||
"name": "aws/aws-crt-php",
|
||||
|
@ -1126,6 +1126,59 @@
|
|||
],
|
||||
"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",
|
||||
"version": "v1.2.0",
|
||||
|
@ -4180,6 +4233,76 @@
|
|||
},
|
||||
"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",
|
||||
"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',
|
||||
'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,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"devDependencies": {
|
||||
"axios": "^0.21",
|
||||
"bootstrap": "^4.0.0",
|
||||
"jquery": "^3.2",
|
||||
"axios": "^0.25",
|
||||
"bootstrap": "^4.6.0",
|
||||
"jquery": "^3.5",
|
||||
"laravel-mix": "^6.0.6",
|
||||
"lodash": "^4.17.19",
|
||||
"popper.js": "^1.12",
|
||||
"popper.js": "^1.16",
|
||||
"postcss": "^8.1.14",
|
||||
"resolve-url-loader": "^3.1.2",
|
||||
"sass": "^1.15.2",
|
||||
"sass-loader": "^8.0.0"
|
||||
"sass": "^1.32.1",
|
||||
"sass-loader": "^10.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
|
@ -1633,9 +1633,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@types/json-schema": {
|
||||
"version": "7.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz",
|
||||
"integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==",
|
||||
"version": "7.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
|
||||
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/micromatch": {
|
||||
|
@ -2262,12 +2262,12 @@
|
|||
}
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "0.21.1",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
|
||||
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
|
||||
"version": "0.25.0",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz",
|
||||
"integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.10.0"
|
||||
"follow-redirects": "^1.14.7"
|
||||
}
|
||||
},
|
||||
"node_modules/babel-loader": {
|
||||
|
@ -5454,9 +5454,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.13.2",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz",
|
||||
"integrity": "sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==",
|
||||
"version": "1.15.2",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
||||
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
|
@ -11728,19 +11728,19 @@
|
|||
}
|
||||
},
|
||||
"node_modules/sass-loader": {
|
||||
"version": "8.0.2",
|
||||
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-8.0.2.tgz",
|
||||
"integrity": "sha512-7o4dbSK8/Ol2KflEmSco4jTjQoV988bM82P9CZdmo9hR3RLnvNc0ufMNdMrB0caq38JQ/FgF4/7RcbcfKzxoFQ==",
|
||||
"version": "10.4.1",
|
||||
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-10.4.1.tgz",
|
||||
"integrity": "sha512-aX/iJZTTpNUNx/OSYzo2KsjIUQHqvWsAhhUijFjAPdZTEhstjZI9zTNvkTTwsx+uNUJqUwOw5gacxQMx4hJxGQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"clone-deep": "^4.0.1",
|
||||
"loader-utils": "^1.2.3",
|
||||
"neo-async": "^2.6.1",
|
||||
"schema-utils": "^2.6.1",
|
||||
"semver": "^6.3.0"
|
||||
"klona": "^2.0.4",
|
||||
"loader-utils": "^2.0.0",
|
||||
"neo-async": "^2.6.2",
|
||||
"schema-utils": "^3.0.0",
|
||||
"semver": "^7.3.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.9.0"
|
||||
"node": ">= 10.13.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
@ -11748,7 +11748,7 @@
|
|||
},
|
||||
"peerDependencies": {
|
||||
"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",
|
||||
"webpack": "^4.36.0 || ^5.0.0"
|
||||
},
|
||||
|
@ -11764,13 +11764,51 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"node_modules/sass-loader/node_modules/semver": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
||||
"node_modules/sass-loader/node_modules/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,
|
||||
"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": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/sax": {
|
||||
|
@ -15169,9 +15207,9 @@
|
|||
}
|
||||
},
|
||||
"@types/json-schema": {
|
||||
"version": "7.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz",
|
||||
"integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==",
|
||||
"version": "7.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
|
||||
"integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/micromatch": {
|
||||
|
@ -15705,12 +15743,12 @@
|
|||
}
|
||||
},
|
||||
"axios": {
|
||||
"version": "0.21.1",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
|
||||
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
|
||||
"version": "0.25.0",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz",
|
||||
"integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"follow-redirects": "^1.10.0"
|
||||
"follow-redirects": "^1.14.7"
|
||||
}
|
||||
},
|
||||
"babel-loader": {
|
||||
|
@ -18293,9 +18331,9 @@
|
|||
}
|
||||
},
|
||||
"follow-redirects": {
|
||||
"version": "1.13.2",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz",
|
||||
"integrity": "sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==",
|
||||
"version": "1.15.2",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
||||
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
|
||||
"dev": true
|
||||
},
|
||||
"for-in": {
|
||||
|
@ -23134,23 +23172,48 @@
|
|||
}
|
||||
},
|
||||
"sass-loader": {
|
||||
"version": "8.0.2",
|
||||
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-8.0.2.tgz",
|
||||
"integrity": "sha512-7o4dbSK8/Ol2KflEmSco4jTjQoV988bM82P9CZdmo9hR3RLnvNc0ufMNdMrB0caq38JQ/FgF4/7RcbcfKzxoFQ==",
|
||||
"version": "10.4.1",
|
||||
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-10.4.1.tgz",
|
||||
"integrity": "sha512-aX/iJZTTpNUNx/OSYzo2KsjIUQHqvWsAhhUijFjAPdZTEhstjZI9zTNvkTTwsx+uNUJqUwOw5gacxQMx4hJxGQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"clone-deep": "^4.0.1",
|
||||
"loader-utils": "^1.2.3",
|
||||
"neo-async": "^2.6.1",
|
||||
"schema-utils": "^2.6.1",
|
||||
"semver": "^6.3.0"
|
||||
"klona": "^2.0.4",
|
||||
"loader-utils": "^2.0.0",
|
||||
"neo-async": "^2.6.2",
|
||||
"schema-utils": "^3.0.0",
|
||||
"semver": "^7.3.2"
|
||||
},
|
||||
"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": {
|
||||
"version": "6.3.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
|
||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
||||
"dev": true
|
||||
"version": "7.3.8",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
|
||||
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
|
||||
"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",
|
||||
"hot": "mix watch --hot",
|
||||
"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": {
|
||||
"axios": "^0.25",
|
||||
"bootstrap": "^4.0.0",
|
||||
"jquery": "^3.2",
|
||||
"bootstrap": "^4.6.0",
|
||||
"jquery": "^3.5",
|
||||
"laravel-mix": "^6.0.6",
|
||||
"lodash": "^4.17.19",
|
||||
"popper.js": "^1.12",
|
||||
"popper.js": "^1.16",
|
||||
"postcss": "^8.1.14",
|
||||
"resolve-url-loader": "^3.1.2",
|
||||
"sass": "^1.15.2",
|
||||
"sass-loader": "^8.0.0"
|
||||
"sass": "^1.32.1",
|
||||
"sass-loader": "^10.1.1"
|
||||
}
|
||||
}
|
||||
|
|
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;
|
|
@ -349,6 +349,15 @@
|
|||
<h1>{{ __('Design') }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="custom-control mb-3 p-0">
|
||||
<label for="alert-type">{{ __('Theme') }}</label>
|
||||
<select id="theme" style="width:100%" class="custom-select" name="theme" required
|
||||
autocomplete="off" @error('theme') is-invalid @enderror>
|
||||
@foreach($themes as $theme)
|
||||
<option value="{{$theme}}" @if ($active_theme == $theme) selected @endif>{{$theme}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="custom-control mb-3 p-0">
|
||||
<input value="true" id="enable-login-logo" name="enable-login-logo"
|
||||
{{ config('SETTINGS::SYSTEM:ENABLE_LOGIN_LOGO') == 'true' ? 'checked' : '' }} type="checkbox">
|
|
@ -227,7 +227,7 @@
|
|||
:disabled="product.minimum_credits > user.credits||product.doesNotFit == true"
|
||||
:class="product.minimum_credits > user.credits ? 'disabled' : ''"
|
||||
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>
|
||||
</div>
|
||||
</div>
|
37
themes/default/vite.config.js
vendored
Normal file
37
themes/default/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/default/sass/app.scss",
|
||||
"themes/default/js/app.js"
|
||||
],
|
||||
buildDirectory: "default",
|
||||
}),
|
||||
|
||||
|
||||
{
|
||||
name: "blade",
|
||||
handleHotUpdate({ file, server }) {
|
||||
if (file.endsWith(".blade.php")) {
|
||||
server.ws.send({
|
||||
type: "full-reload",
|
||||
path: "*",
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': '/themes/default/js',
|
||||
'~bootstrap': path.resolve('node_modules/bootstrap'),
|
||||
}
|
||||
},
|
||||
|
||||
});
|
Loading…
Add table
Reference in a new issue