mirror of
https://github.com/LinkStackOrg/LinkStack.git
synced 2025-02-16 12:00:50 +01:00
Updated config editor
This commit is contained in:
parent
86143392a2
commit
8350373262
@ -8,6 +8,14 @@ use Illuminate\Auth\Events\Registered;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Facades\File;
|
||||
|
||||
use GeoSot\EnvEditor\Controllers\EnvController;
|
||||
use GeoSot\EnvEditor\Exceptions\EnvException;
|
||||
use GeoSot\EnvEditor\Helpers\EnvFileContentManager;
|
||||
use GeoSot\EnvEditor\Helpers\EnvFilesManager;
|
||||
use GeoSot\EnvEditor\Helpers\EnvKeysManager;
|
||||
use GeoSot\EnvEditor\Facades\EnvEditor;
|
||||
use GeoSot\EnvEditor\ServiceProvider;
|
||||
|
||||
use Auth;
|
||||
use Exception;
|
||||
use ZipArchive;
|
||||
@ -289,11 +297,11 @@ class AdminController extends Controller
|
||||
//Saves .env config
|
||||
public function editENV(request $request)
|
||||
{
|
||||
$AdvancedConfig = $request->AdvancedConfig;
|
||||
$config = $request->altConfig;
|
||||
|
||||
file_put_contents('.env', $AdvancedConfig);
|
||||
file_put_contents('.env', $config);
|
||||
|
||||
return view('/panel/config');
|
||||
return Redirect('/panel/config');
|
||||
}
|
||||
|
||||
//Shows config file editor page
|
||||
@ -458,6 +466,64 @@ class AdminController extends Controller
|
||||
}
|
||||
|
||||
//Shows config file editor page
|
||||
public function showConfig(request $request)
|
||||
{
|
||||
return view('/panel/config-editor');
|
||||
}
|
||||
|
||||
//Shows config file editor page
|
||||
public function editConfig(request $request)
|
||||
{
|
||||
|
||||
$type = $request->type;
|
||||
$entry = $request->entry;
|
||||
$value = $request->value;
|
||||
|
||||
if($type === "toggle"){
|
||||
if($request->toggle != ''){$value = "auth";}else{$value = "false";}
|
||||
if(EnvEditor::keyExists($entry)){EnvEditor::editKey($entry, $value);}
|
||||
} elseif($type === "toggle2") {
|
||||
if($request->toggle != ''){$value = "verified";}else{$value = "auth";}
|
||||
if(EnvEditor::keyExists($entry)){EnvEditor::editKey($entry, $value);}
|
||||
} elseif($type === "text") {
|
||||
if(EnvEditor::keyExists($entry)){EnvEditor::editKey($entry, '"' . $value . '"');}
|
||||
} elseif($type === "debug") {
|
||||
if($request->toggle != ''){
|
||||
if(EnvEditor::keyExists('APP_DEBUG')){EnvEditor::editKey('APP_DEBUG', 'true');}
|
||||
if(EnvEditor::keyExists('APP_ENV')){EnvEditor::editKey('APP_ENV', 'local');}
|
||||
if(EnvEditor::keyExists('LOG_LEVEL')){EnvEditor::editKey('LOG_LEVEL', 'debug');}
|
||||
} else {
|
||||
if(EnvEditor::keyExists('APP_DEBUG')){EnvEditor::editKey('APP_DEBUG', 'false');}
|
||||
if(EnvEditor::keyExists('APP_ENV')){EnvEditor::editKey('APP_ENV', 'production');}
|
||||
if(EnvEditor::keyExists('LOG_LEVEL')){EnvEditor::editKey('LOG_LEVEL', 'error');}
|
||||
}
|
||||
} elseif($type === "register") {
|
||||
if($request->toggle != ''){$register = "true";}else{$register = "false";}
|
||||
Page::first()->update(['register' => $register]);
|
||||
} elseif($type === "smtp") {
|
||||
if($request->toggle != ''){$value = "built-in";}else{$value = "smtp";}
|
||||
if(EnvEditor::keyExists('MAIL_MAILER')){EnvEditor::editKey('MAIL_MAILER', $value);}
|
||||
|
||||
if(EnvEditor::keyExists('MAIL_HOST')){EnvEditor::editKey('MAIL_HOST', $request->MAIL_HOST);}
|
||||
if(EnvEditor::keyExists('MAIL_PORT')){EnvEditor::editKey('MAIL_PORT', $request->MAIL_PORT);}
|
||||
if(EnvEditor::keyExists('MAIL_USERNAME')){EnvEditor::editKey('MAIL_USERNAME', $request->MAIL_USERNAME);}
|
||||
if(EnvEditor::keyExists('MAIL_PASSWORD')){EnvEditor::editKey('MAIL_PASSWORD', $request->MAIL_PASSWORD);}
|
||||
if(EnvEditor::keyExists('MAIL_ENCRYPTION')){EnvEditor::editKey('MAIL_ENCRYPTION', $request->MAIL_ENCRYPTION);}
|
||||
if(EnvEditor::keyExists('MAIL_FROM_ADDRESS')){EnvEditor::editKey('MAIL_FROM_ADDRESS', $request->MAIL_FROM_ADDRESS);}
|
||||
} elseif($type === "homeurl") {
|
||||
if($request->value == 'default'){$value = "";}else{$value = '"' . $request->value . '"';}
|
||||
if(EnvEditor::keyExists($entry)){EnvEditor::editKey($entry, $value);}
|
||||
} else {
|
||||
if(EnvEditor::keyExists($entry)){EnvEditor::editKey($entry, $value);}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return Redirect('/panel/config');
|
||||
}
|
||||
|
||||
//Shows theme editor page
|
||||
public function showThemes(request $request)
|
||||
{
|
||||
return view('/panel/theme');
|
||||
|
0
backups/CANUPDATE
Normal file
0
backups/CANUPDATE
Normal file
BIN
backups/updater-backups/2022-11-15-22-02-04.zip
Normal file
BIN
backups/updater-backups/2022-11-15-22-02-04.zip
Normal file
Binary file not shown.
BIN
backups/updater-backups/2022-11-17-13-50-08.zip
Normal file
BIN
backups/updater-backups/2022-11-17-13-50-08.zip
Normal file
Binary file not shown.
2106
composer.lock
generated
2106
composer.lock
generated
File diff suppressed because it is too large
Load Diff
293
config/advanced-config.php
Normal file
293
config/advanced-config.php
Normal file
@ -0,0 +1,293 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
$analytics =
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Analytics
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Add external analytics services to your LittleLink Custom instance by adding them below.
|
||||
| Everything you enter below will be added to the <head> tag of every page.
|
||||
| Formatting in plain HTML is expected.
|
||||
|
|
||||
*/
|
||||
|
||||
<<<EOD
|
||||
<!----------Insert your analytics code here:---------->
|
||||
|
||||
|
||||
|
||||
<!--------------------------------------------------->
|
||||
EOD;;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default source repository type
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Will only be active if "CUSTOM_META_TAGS" is set to "true" in the config.
|
||||
| These tags will only be applied to the home page or if a LittleLink page
|
||||
| is set as the homepage in the config (for example: HOME_URL="admin").
|
||||
|
|
||||
| Empty entries will be ignored.
|
||||
|
|
||||
*/
|
||||
|
||||
'lang' => 'en', // Sets <html lang="en">
|
||||
'title' => '', // Overrides the default meta page title. Leave empty to use your LittleLink page title as the title.
|
||||
'description' => '', // Overrides the default meta page description. Leave empty to use your LittleLink page description as the description.
|
||||
'robots' => 'index,follow',
|
||||
'viewport' => 'width=device-width, initial-scale=1',
|
||||
'canonical_url' => '', // Tells search engines to index "https://example.com/" instead of "https://example.com/@admin", for example.
|
||||
'twitter_creator' => '', // Twitter @username.
|
||||
'author' => '', // Your name.
|
||||
|
||||
|
||||
/*
|
||||
| All settings below are always active
|
||||
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Additional settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Empty entries will be ignored.
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
// Overwrites default theme regardless of preference defined by the operating system.
|
||||
'theme' => '', // Either "dark" or "light".
|
||||
|
||||
|
||||
// Overwrites default page title after the LittleLink name on LittleLink pages.
|
||||
// Example: "admin 🔗 LittleLink Custom"
|
||||
// ⤌------------------⤍
|
||||
// ⬑ What you can change with this setting.
|
||||
'littlelink_title' => '',
|
||||
|
||||
|
||||
// Either "true", "false" or "auth".
|
||||
// If "auth" is selected, the share button will only be shown to users on their own page.
|
||||
'display_share_button' => 'true',
|
||||
|
||||
|
||||
// Do not change here!
|
||||
'analytics' => $analytics, // Set on top of page.
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You can change routes to improve security.
|
||||
|
|
||||
*/
|
||||
|
||||
'login_url' => '/login',
|
||||
'register_url' => '/register',
|
||||
'forgot_password_url' => '/forgot-password',
|
||||
|
||||
'custom_home_url' => '/home', // Only applies if you set a "HOME_URL" in the config.
|
||||
|
||||
// If 'true' the Home Page will be disabled entirely.
|
||||
// You will still be able to login on the login page etc.
|
||||
'disable_home_page' => 'false', // Either 'true', 'false' or 'redirect'.
|
||||
'redirect_home_page' => 'https://littlelink-custom.com', // Only active if value above is set to 'redirect'.
|
||||
|
||||
// The URL prefix is the symbol that comes before a LittleLink URL.
|
||||
// For example the '@' in 'example.com/@admin'.
|
||||
// If empty no prefix is required.
|
||||
'custom_url_prefix' => '+', // The '@' prefix will always work regardless of this setting.
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Footer links
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Footer links are the links that are displayed on the bottom of your page, reading: "Home, Terms, Privacy, Contact".
|
||||
| You can toggle each individual link on or off.
|
||||
| You can also set a custom URL for the "Home" link.
|
||||
|
|
||||
*/
|
||||
|
||||
// Either "true" or "false".
|
||||
'display_link_home' => 'true',
|
||||
'display_link_terms' => 'true',
|
||||
'display_link_privacy' => 'true',
|
||||
'display_link_contact' => 'true',
|
||||
|
||||
// Enter a custom home link (for example, 'https://littlelink-custom.com').
|
||||
'custom_link_home' => '', // Leave empty to use default value.
|
||||
// Changes the text on the "Home" link.
|
||||
'custom_text_home' => 'Home', // Leave empty to use default value.
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Home Page settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| To change footer text on the Home Page, set the setting 'footer' to your preference.
|
||||
|
|
||||
| The footer text is the towards the bottom of the Home Page that reads: "and X other buttons ..."
|
||||
|
|
||||
| Depending on the amount of buttons on your Home Page, you might want to change this text.
|
||||
|
|
||||
| 'default' -> Uses default text.
|
||||
| 'alt' -> Displays an alternative version based on the Button Editor.
|
||||
| 'custom' -> Displays your custom text defined with 'custom_footer_text'.
|
||||
| 'false' -> Removes the footer.
|
||||
|
|
||||
*/
|
||||
|
||||
'home_footer' => 'default', // Either 'default', 'alt', 'custom' or 'false'.
|
||||
|
||||
// You can enter plain text or HTML into this field.
|
||||
// You can use "{year}" as a placeholder for the current year.
|
||||
// So "©{year}" would output "©2033" (or whatever the current year is).
|
||||
'custom_home_footer_text' => '© Copyright {year} - All Rights Reserved',
|
||||
|
||||
|
||||
// Apply a theme to your Home Page.
|
||||
// Some themes are not compatible with the Home Page. Use at your own discretion.
|
||||
// Enter the name of a theme located in your "themes" folder (for example, 'galaxy').
|
||||
'home_theme' => 'default', // Leave empty or enter 'default' to use the default theme.
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Buttons on Home Page
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you can configure your own buttons for the Home Page.
|
||||
| You can add or remove as many buttons as you like.
|
||||
|
|
||||
| The syntax of the custom buttons is as follows:
|
||||
|
|
||||
| array(
|
||||
| 'button' => '',
|
||||
| 'link' => '',
|
||||
| 'title' => '',
|
||||
| 'icon' => '',
|
||||
| 'custom_css' => ''
|
||||
| ),
|
||||
|
|
||||
| In the 'button' field, you have to enter the button name (i.e. 'twitter', 'github', 'custom'...).
|
||||
| You can find a list of all available buttons below.
|
||||
|
|
||||
| In the 'link' field, you can enter your desired link you may leave this field empty for a display only, non-functional button.
|
||||
|
|
||||
|
|
||||
|
|
||||
| The input fields below only apply to buttons such as 'custom' and 'custom_website' but must always be included even if only empty.
|
||||
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
||||
| In the 'title' field, changes the text on a button, such as 'custom' and 'custom_website'.
|
||||
|
|
||||
| In the 'icon' field, uses the same syntax as the Button Editor on the Admin Panel.
|
||||
| This allows you to add your own icons to 'custom' buttons. You can find a list of available icons on s.llc.ovh/fa.
|
||||
|
|
||||
| In the 'custom_css' field, here you can enter custom CSS to change the color of your button.
|
||||
| If you don't feel comfortable working with CSS,
|
||||
| you can copy and paste the CSS from the 'Custom CSS' field of the Button Editor on the Admin Panel.
|
||||
|
|
||||
*/
|
||||
|
||||
'use_custom_buttons' => 'true', // Set this to false if you wish to display the old buttons.
|
||||
|
||||
'buttons' => array(
|
||||
array(
|
||||
'button' => 'github',
|
||||
'link' => 'https://github.com/JulianPrieber/littlelink-custom',
|
||||
'title' => '',
|
||||
'icon' => '',
|
||||
'custom_css' => ''
|
||||
),
|
||||
array(
|
||||
'button' => 'custom',
|
||||
'link' => 'https://littlelink-custom.com',
|
||||
'title' => 'Project Website',
|
||||
'icon' => 'llc',
|
||||
'custom_css' => 'color:#ffffff; background-image:linear-gradient(76deg, #f70fff 0%, #11d4de 100%);'),
|
||||
array(
|
||||
'button' => 'custom',
|
||||
'link' => 'https://littlelink-custom.com/sponsor',
|
||||
'title' => 'Help us out',
|
||||
'icon' => 'fa-hand-holding-heart',
|
||||
'custom_css' => 'color:#ffffff; background-image:radial-gradient(circle, #00d2ff 0%, #3a7bd5 95%);'
|
||||
),
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------|
|
||||
| List of Available buttons: |
|
||||
|--------------------------------|
|
||||
| 'button' => 'custom' |
|
||||
| 'button' => 'custom_website' |
|
||||
| 'button' => 'github' |
|
||||
| 'button' => 'twitter' |
|
||||
| 'button' => 'instagram' |
|
||||
| 'button' => 'facebook' |
|
||||
| 'button' => 'messenger' |
|
||||
| 'button' => 'linkedin' |
|
||||
| 'button' => 'youtube' |
|
||||
| 'button' => 'discord' |
|
||||
| 'button' => 'twitch' |
|
||||
| 'button' => 'snapchat' |
|
||||
| 'button' => 'spotify' |
|
||||
| 'button' => 'reddit' |
|
||||
| 'button' => 'medium' |
|
||||
| 'button' => 'pinterest' |
|
||||
| 'button' => 'soundcloud' |
|
||||
| 'button' => 'figma' |
|
||||
| 'button' => 'kit' |
|
||||
| 'button' => 'telegram' |
|
||||
| 'button' => 'tumblr' |
|
||||
| 'button' => 'steam' |
|
||||
| 'button' => 'vimeo' |
|
||||
| 'button' => 'wordpress' |
|
||||
| 'button' => 'goodreads' |
|
||||
| 'button' => 'skoob' |
|
||||
| 'button' => 'tiktok' |
|
||||
| 'button' => 'default email' |
|
||||
| 'button' => 'default email_alt'|
|
||||
| 'button' => 'bandcamp' |
|
||||
| 'button' => 'patreon' |
|
||||
| 'button' => 'signal' |
|
||||
| 'button' => 'venmo' |
|
||||
| 'button' => 'cashapp' |
|
||||
| 'button' => 'gitlab' |
|
||||
| 'button' => 'mastodon' |
|
||||
| 'button' => 'paypal' |
|
||||
| 'button' => 'whatsapp' |
|
||||
| 'button' => 'xing' |
|
||||
| 'button' => 'buy me a coffee' |
|
||||
| 'button' => 'website' |
|
||||
| 'button' => 'heading' |
|
||||
| 'button' => 'space' |
|
||||
|--------------------------------|
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Extra Settings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
*/
|
||||
|
||||
// Expands admin menu on the Admin Panel Sidebar permanently
|
||||
'expand_panel_admin_menu_permanently' => 'false', // Either "true" or "false".
|
||||
|
||||
// Should only be used in a local testing environment
|
||||
'disable_default_password_notice' => 'true', // Either "true" or "false".
|
||||
|
||||
];
|
165
config/config-legends.json
Normal file
165
config/config-legends.json
Normal file
@ -0,0 +1,165 @@
|
||||
[
|
||||
{"value": "REGISTER_AUTH",
|
||||
"title": "Enable email verification",
|
||||
"description": "First description"
|
||||
},
|
||||
|
||||
{"value": "NOTIFY_EVENTS",
|
||||
"title": "Notify on events",
|
||||
"description": "First description"
|
||||
},
|
||||
|
||||
{"value": "NOTIFY_UPDATES",
|
||||
"title": "Notify on updates",
|
||||
"description": "Second description"
|
||||
},
|
||||
|
||||
{"value": "DISPLAY_FOOTER",
|
||||
"title": "Show footer",
|
||||
"description": "Third description"
|
||||
},
|
||||
|
||||
{"value": "DISPLAY_CREDIT",
|
||||
"title": "Show credit",
|
||||
"description": "Fourth description"
|
||||
},
|
||||
|
||||
{"value": "HOME_URL",
|
||||
"title": "Set user page as Home Page",
|
||||
"description": "Fifth description"
|
||||
},
|
||||
|
||||
{"value": "ALLOW_USER_HTML",
|
||||
"title": "Allow extended syntax in user's descriptions",
|
||||
"description": "Fifth description"
|
||||
},
|
||||
|
||||
{"value": "APP_NAME",
|
||||
"title": "Application title",
|
||||
"description": "A change will logout every user"
|
||||
},
|
||||
|
||||
{"value": "APP_KEY",
|
||||
"title": "APP_KEY",
|
||||
"description": "Sixth description"
|
||||
},
|
||||
|
||||
{"value": "APP_URL",
|
||||
"title": "APP_URL",
|
||||
"description": "Sixth description"
|
||||
},
|
||||
|
||||
{"value": "ENABLE_BUTTON_EDITOR",
|
||||
"title": "Enable Button Editor",
|
||||
"description": "Sixth description"
|
||||
},
|
||||
|
||||
{"value": "APP_DEBUG",
|
||||
"title": "App debug",
|
||||
"description": "Sixth description"
|
||||
},
|
||||
|
||||
{"value": "APP_ENV",
|
||||
"title": "APP_ENV",
|
||||
"description": "Sixth description"
|
||||
},
|
||||
|
||||
{"value": "LOG_CHANNEL",
|
||||
"title": "LOG_CHANNEL",
|
||||
"description": "Sixth description"
|
||||
},
|
||||
|
||||
{"value": "LOG_LEVEL",
|
||||
"title": "LOG_LEVEL",
|
||||
"description": "Sixth description"
|
||||
},
|
||||
|
||||
{"value": "MAINTENANCE_MODE",
|
||||
"title": "Enable Maintenance Mode",
|
||||
"description": "Seventh description"
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
{"value": "MAIL_MAILER",
|
||||
"title": "MAIL_MAILER",
|
||||
"description": "Eighth description"
|
||||
},
|
||||
|
||||
{"value": "MAIL_HOST",
|
||||
"title": "MAIL_HOST",
|
||||
"description": "Eighth description"
|
||||
},
|
||||
|
||||
{"value": "MAIL_PORT",
|
||||
"title": "MAIL_PORT",
|
||||
"description": "Eighth description"
|
||||
},
|
||||
|
||||
{"value": "MAIL_USERNAME",
|
||||
"title": "MAIL_USERNAME",
|
||||
"description": "Eighth description"
|
||||
},
|
||||
|
||||
{"value": "MAIL_PASSWORD",
|
||||
"title": "MAIL_PASSWORD",
|
||||
"description": "Eighth description"
|
||||
},
|
||||
|
||||
{"value": "MAIL_ENCRYPTION",
|
||||
"title": "MAIL_ENCRYPTION",
|
||||
"description": "Eighth description"
|
||||
},
|
||||
|
||||
{"value": "MAIL_FROM_ADDRESS",
|
||||
"title": "MAIL_FROM_ADDRESS",
|
||||
"description": "Eighth description"
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{"value": "JOIN_BETA",
|
||||
"title": "Join the Beta",
|
||||
"description": "Eighth description"
|
||||
},
|
||||
|
||||
{"value": "SKIP_UPDATE_BACKUP",
|
||||
"title": "Skip update backups",
|
||||
"description": "Eighth description"
|
||||
},
|
||||
|
||||
{"value": "CUSTOM_META_TAGS",
|
||||
"title": "Enable custom meta tags",
|
||||
"description": "Eighth description"
|
||||
},
|
||||
|
||||
{"value": "FORCE_HTTPS",
|
||||
"title": "Force HTTPS",
|
||||
"description": "Eighth description"
|
||||
},
|
||||
|
||||
{"value": "ALLOW_CUSTOM_CODE_IN_THEMES",
|
||||
"title": "Allow custom code in themes",
|
||||
"description": "Eighth description"
|
||||
},
|
||||
|
||||
{"value": "ENABLE_THEME_UPDATER",
|
||||
"title": "Enable Theme Updater",
|
||||
"description": "Eighth description"
|
||||
},
|
||||
|
||||
{"value": "ENABLE_SOCIAL_LOGIN",
|
||||
"title": "Enable social login",
|
||||
"description": "Eighth description"
|
||||
},
|
||||
|
||||
{"value": "USE_THEME_PREVIEW_IFRAME",
|
||||
"title": "Use iframe as theme preview",
|
||||
"description": "Eighth description"
|
||||
}
|
||||
]
|
@ -55,7 +55,7 @@ exit(); ?>
|
||||
<h4 class="">The backup was successful, you can now return to the Admin Panel or see all your backups.</h4>
|
||||
<br><div class="row">
|
||||
 <a class="btn" href="{{ route('studioIndex') }}"><button><i class="fa-solid fa-house-laptop btn"></i> Admin Panel</button></a> 
|
||||
 <a class="btn" href="{{ route('showBackups') }}"><button><i class="fa-solid fa-box-archive"></i> All Backups</button></a> 
|
||||
 <a class="btn" href="{{ url('panel/config#4') }}"><button><i class="fa-solid fa-box-archive"></i> All Backups</button></a> 
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
@ -0,0 +1,48 @@
|
||||
<section class="shadow text-gray-400">
|
||||
<h2 class="mb-4 card-header"><i class="bi bi-pencil-square"> .ENV</i></h2>
|
||||
<div class="card-body p-0 p-md-3">
|
||||
|
||||
|
||||
<form action="{{ route('editENV') }}" method="post">
|
||||
@csrf
|
||||
<div class="form-group">
|
||||
<label>Strings with a # in front of them are comments and wont affect anything.</label>
|
||||
<textarea style="width:100%!important;display:none;" class="form-control" name="altConfig" rows="{{count(file('.env'))}}">{{ file_get_contents('.env') }}</textarea>
|
||||
<div id="editor2" style="width:100%; height:<?php echo count(file('.env')) * 24 + 50;?>px;" class="form-control" name="altConfig" rows="280">{{ file_get_contents('.env') }}</div>
|
||||
</div>
|
||||
<button type="submit" class="mt-3 ml-3 btn btn-info">Save</button>
|
||||
</form>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.1/ace.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script>
|
||||
var editor = ace.edit("editor2");
|
||||
editor.setTheme("ace/theme/xcode");
|
||||
editor.getSession().setMode("ace/mode/ruby");
|
||||
</script>
|
||||
<script>
|
||||
editor.getSession().on('change', function(e) {
|
||||
$('textarea[name=altConfig]').val(editor.getSession().getValue());
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{-- <style>
|
||||
.float{
|
||||
position:fixed;
|
||||
width:60px;
|
||||
height:60px;
|
||||
bottom:40px;
|
||||
right:40px;
|
||||
background-color:#0C9;
|
||||
color:#FFF;
|
||||
border-radius:5px;
|
||||
text-align:center;
|
||||
align-items: middle;
|
||||
box-shadow: 2px 2px 3px #999;
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
<a href="#" class="float">back</a> --}}
|
129
resources/views/components/config/backup.blade.php
Normal file
129
resources/views/components/config/backup.blade.php
Normal file
@ -0,0 +1,129 @@
|
||||
|
||||
<style>
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.container {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@media (min-width:700px) {
|
||||
.row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
}
|
||||
|
||||
.logo-centered {
|
||||
/* top: 44vh; */
|
||||
font-size: 130px;
|
||||
}
|
||||
|
||||
.logo-img{
|
||||
/* position: relative; */
|
||||
width: 250px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.loading {
|
||||
animation: loading 3s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes loading {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: rotate(359deg);
|
||||
}
|
||||
}
|
||||
|
||||
.generic {
|
||||
margin: auto;
|
||||
width: 2.5em;
|
||||
height: 2.5em;
|
||||
border: 0.4em solid transparent;
|
||||
border-color: #eee;
|
||||
border-top-color: #333;
|
||||
border-radius: 50%;
|
||||
animation: loadingspin 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes loadingspin {
|
||||
100% {
|
||||
transform: rotate(360deg)
|
||||
}
|
||||
}
|
||||
|
||||
.loadingtxt:after {
|
||||
content: '.';
|
||||
animation: dots 1.5s steps(5, end) infinite;}
|
||||
|
||||
@keyframes dots {
|
||||
0%, 20% {
|
||||
color: rgba(0,0,0,0);
|
||||
text-shadow:
|
||||
.25em 0 0 rgba(0,0,0,0),
|
||||
.5em 0 0 rgba(0,0,0,0);}
|
||||
40% {
|
||||
color: white;
|
||||
text-shadow:
|
||||
.25em 0 0 rgba(0,0,0,0),
|
||||
.5em 0 0 rgba(0,0,0,0);}
|
||||
60% {
|
||||
text-shadow:
|
||||
.25em 0 0 white,
|
||||
.5em 0 0 rgba(0,0,0,0);}
|
||||
80%, 100% {
|
||||
text-shadow:
|
||||
.25em 0 0 white,
|
||||
.5em 0 0 white;}}
|
||||
|
||||
button {
|
||||
border-style: none;
|
||||
background-color: #0085ff;
|
||||
}
|
||||
button:hover {
|
||||
background-color: #0065c1;
|
||||
color: #FFF;
|
||||
box-shadow: 0 10px 20px -10px rgba(0,0,0, 0.6);
|
||||
}
|
||||
|
||||
.btn {
|
||||
color: #FFF !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
@push('sidebar-stylesheets')
|
||||
<link rel="stylesheet" href="{{ asset('littlelink/css/animate.css') }}">
|
||||
<style>@font-face{font-family:'ll';src:url({{ asset('littlelink/fonts/littlelink-custom.otf') }}) format("opentype")}</style>
|
||||
@endpush
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
||||
<?php //landing page ?>
|
||||
|
||||
<div class="logo-container fadein">
|
||||
<img class="logo-img" src="{{ asset('littlelink/images/just-gear.svg') }}" alt="Logo">
|
||||
<div class="logo-centered">l</div>
|
||||
</div>
|
||||
<h1>Backup</h1>
|
||||
<h4 class="">You can back up your entire instance:</h4>
|
||||
<h5 class="">The backup system won't save more than two backups at a time.</h5>
|
||||
<br><div class="row">
|
||||
 <a class="btn" href="{{url('backup/?backup')}}"><button style="padding:10px" class="mt-3 ml-3 btn btn-info"><i class="fa-solid fa-floppy-disk"></i> Backup Instance</button></a> 
|
||||
 <a class="btn" data-toggle="tab" href="#4"><button style="padding:10px" class="mt-3 ml-3 btn btn-info"><i class="fa-solid fa-box-archive"></i> All Backups</button></a> 
|
||||
</div>
|
||||
|
||||
</div>
|
44
resources/views/components/config/backups.blade.php
Normal file
44
resources/views/components/config/backups.blade.php
Normal file
@ -0,0 +1,44 @@
|
||||
|
||||
<style>button{border-style: none;background-color: #0085ff;color: #fff;border-radius: 5px;}button:hover {background-color:#0065c1;color: #FFF;box-shadow: 0 10px 20px -10px rgba(0,0,0, 0.6);}.btn {color: #FFF !important;}.buttondm{display:inline-block;text-decoration:none;height:48px;text-align:center;vertical-align:middle;font-size:18px;width:300px;font-weight:700;line-height:48px;letter-spacing:.1px;white-space:wrap;border-radius:8px;cursor:pointer}.button-hover,.credit-hover{display:inline-block;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px rgba(0,0,0,0);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.button-hover:active,.credit-hover:active,.button-hover:focus,.credit-hover:focus,.button-hover:hover,.credit-hover:hover{-webkit-transform:scale(1.06);transform:scale(1.06)}.container{align-items:center;display:flex;flex-direction:column;justify-content:center;height:50%;width:100%}</style>
|
||||
<!-- Custom icons font-awesome -->
|
||||
<script src="https://kit.fontawesome.com/c4a5e06183.js" crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v6.1.2/css/all.css" integrity="sha384-fZCoUih8XsaUZnNDOiLqnby1tMJ0sE7oBbNk2Xxf5x8Z4SvNQ9j83vFMa/erbVrV" crossorigin="anonymous"/>
|
||||
@if (file_exists(base_path('backups/updater-backups/')) and is_dir(base_path('backups/updater-backups/')))
|
||||
@if($_SERVER['QUERY_STRING'] != '')
|
||||
<?php
|
||||
$filename = $_SERVER['QUERY_STRING'];
|
||||
|
||||
$filepath = base_path('backups/updater-backups/') . $filename;
|
||||
|
||||
$strFile = file_get_contents($filepath);
|
||||
|
||||
header("Content-type: application/force-download");
|
||||
header('Content-Disposition: attachment; filename="'.$filename.'"');
|
||||
|
||||
header('Content-Length: ' . filesize($filepath));
|
||||
echo $strFile;
|
||||
while (ob_get_level()) {
|
||||
ob_end_clean();
|
||||
}
|
||||
readfile($filepath);
|
||||
exit;
|
||||
?>
|
||||
@endif
|
||||
|
||||
<div class="container">
|
||||
<br><br><h3>Download your updater backups:</h3>
|
||||
<hp>The server will never store more that two backups at a time.</hp><br><br><br>
|
||||
<?php
|
||||
$test="test";
|
||||
if ($handle = opendir('backups/updater-backups')) {
|
||||
while (false !== ($entry = readdir($handle))) {
|
||||
if ($entry != "." && $entry != "..") {
|
||||
echo '<div class="button-entrance"><a class="buttondm button-hover icon-hover" style="color:#ffffff; background-color:#000;" href="' . url('panel/backups') . '/?' . $entry . '"><i style="color: " class="icon hvr-icon fa fa-download"></i> '; print_r($entry); echo '</a></div><br>';
|
||||
}}} ?>
|
||||
</div>
|
||||
|
||||
@else
|
||||
<div class="container">
|
||||
<h3>No backups found</h3></div>
|
||||
@endif
|
||||
<center><a class="btn" data-toggle="tab" href="#3"><button style="padding:10px"><i class="fa-solid fa-floppy-disk"></i> Backup your instance</button></a></center>
|
393
resources/views/components/config/config.blade.php
Normal file
393
resources/views/components/config/config.blade.php
Normal file
@ -0,0 +1,393 @@
|
||||
<?php use App\Models\Page; ?>
|
||||
<style>
|
||||
@supports (-webkit-appearance: none) or (-moz-appearance: none) {
|
||||
input[type=checkbox],
|
||||
input[type=radio] {
|
||||
--active: #275EFE;
|
||||
--active-inner: #fff;
|
||||
--focus: 2px rgba(39, 94, 254, .3);
|
||||
--border: #BBC1E1;
|
||||
--border-hover: #275EFE;
|
||||
--background: #fff;
|
||||
--disabled: #F6F8FF;
|
||||
--disabled-inner: #E1E6F9;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
height: 21px;
|
||||
outline: none;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
border: 1px solid var(--bc, var(--border));
|
||||
background: var(--b, var(--background));
|
||||
transition: background 0.3s, border-color 0.3s, box-shadow 0.2s;
|
||||
}
|
||||
input[type=checkbox]:after,
|
||||
input[type=radio]:after {
|
||||
content: "";
|
||||
display: block;
|
||||
left: 0;
|
||||
top: 0;
|
||||
position: absolute;
|
||||
transition: transform var(--d-t, 0.3s) var(--d-t-e, ease), opacity var(--d-o, 0.2s);
|
||||
}
|
||||
input[type=checkbox]:checked,
|
||||
input[type=radio]:checked {
|
||||
--b: var(--active);
|
||||
--bc: var(--active);
|
||||
--d-o: .3s;
|
||||
--d-t: .6s;
|
||||
--d-t-e: cubic-bezier(.2, .85, .32, 1.2);
|
||||
}
|
||||
input[type=checkbox]:disabled,
|
||||
input[type=radio]:disabled {
|
||||
--b: var(--disabled);
|
||||
cursor: not-allowed;
|
||||
opacity: 0.9;
|
||||
}
|
||||
input[type=checkbox]:disabled:checked,
|
||||
input[type=radio]:disabled:checked {
|
||||
--b: var(--disabled-inner);
|
||||
--bc: var(--border);
|
||||
}
|
||||
input[type=checkbox]:disabled + label,
|
||||
input[type=radio]:disabled + label {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
input[type=checkbox]:hover:not(:checked):not(:disabled),
|
||||
input[type=radio]:hover:not(:checked):not(:disabled) {
|
||||
--bc: var(--border-hover);
|
||||
}
|
||||
input[type=checkbox]:focus,
|
||||
input[type=radio]:focus {
|
||||
box-shadow: 0 0 0 var(--focus);
|
||||
}
|
||||
input[type=checkbox]:not(.switch),
|
||||
input[type=radio]:not(.switch) {
|
||||
width: 21px;
|
||||
}
|
||||
input[type=checkbox]:not(.switch):after,
|
||||
input[type=radio]:not(.switch):after {
|
||||
opacity: var(--o, 0);
|
||||
}
|
||||
input[type=checkbox]:not(.switch):checked,
|
||||
input[type=radio]:not(.switch):checked {
|
||||
--o: 1;
|
||||
}
|
||||
input[type=checkbox] + label,
|
||||
input[type=radio] + label {
|
||||
font-size: 14px;
|
||||
line-height: 21px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
cursor: pointer;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
input[type=checkbox]:not(.switch) {
|
||||
border-radius: 7px;
|
||||
}
|
||||
input[type=checkbox]:not(.switch):after {
|
||||
width: 5px;
|
||||
height: 9px;
|
||||
border: 2px solid var(--active-inner);
|
||||
border-top: 0;
|
||||
border-left: 0;
|
||||
left: 7px;
|
||||
top: 4px;
|
||||
transform: rotate(var(--r, 20deg));
|
||||
}
|
||||
input[type=checkbox]:not(.switch):checked {
|
||||
--r: 43deg;
|
||||
}
|
||||
input[type=checkbox].switch {
|
||||
width: 38px;
|
||||
border-radius: 11px;
|
||||
}
|
||||
input[type=checkbox].switch:after {
|
||||
left: 2px;
|
||||
top: 2px;
|
||||
border-radius: 50%;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background: var(--ab, var(--border));
|
||||
transform: translateX(var(--x, 0));
|
||||
}
|
||||
input[type=checkbox].switch:checked {
|
||||
--ab: var(--active-inner);
|
||||
--x: 17px;
|
||||
}
|
||||
input[type=checkbox].switch:disabled:not(:checked):after {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
input[type=radio] {
|
||||
border-radius: 50%;
|
||||
}
|
||||
input[type=radio]:after {
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
border-radius: 50%;
|
||||
background: var(--active-inner);
|
||||
opacity: 0;
|
||||
transform: scale(var(--s, 0.7));
|
||||
}
|
||||
input[type=radio]:checked {
|
||||
--s: .5;
|
||||
}
|
||||
}
|
||||
.txt-label{
|
||||
color: white;
|
||||
padding-left: 5px;
|
||||
font-size: 200%;
|
||||
position: relative;
|
||||
}
|
||||
.toggle-btn{
|
||||
padding-left: 20px;
|
||||
}
|
||||
.ch2{
|
||||
padding-top: 60px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<?php
|
||||
function toggle($key){
|
||||
$configNames = json_decode(file_get_contents(base_path('config/config-legends.json')));
|
||||
echo '
|
||||
<form id="'.$key.'-form" action="'.route('editConfig').'" enctype="multipart/form-data" method="post">
|
||||
<div class="form-group col-lg-8">
|
||||
<input value="toggle" name="type" style="display:none;" type="text" required>
|
||||
<input value="'.$key.'" name="entry" style="display:none;" type="text" required>
|
||||
<h5 style="margin-top:50px">'; foreach($configNames as $obj){if($obj->value == $key){echo $obj->title;}}; echo '</h5>
|
||||
<p class="text-muted">'; foreach($configNames as $obj){if($obj->value == $key){echo $obj->description;}}; echo '</p>
|
||||
<div class="input-group">
|
||||
<div class="row toggle-btn"><input name="toggle" class="switch toggle-btn" type="checkbox" id="'.$key.'"'; if(EnvEditor::getKey($key) == 'false'){echo '/>';}else{echo 'checked>';} echo '<label for="'.$key.'" class="label txt-label">Enable</label></div>
|
||||
</div></div>
|
||||
<input type="hidden" name="_token" value="'.csrf_token().'">
|
||||
<script type="text/javascript">
|
||||
document.getElementById("'.$key.'-form").addEventListener("change", function() {
|
||||
this.submit();
|
||||
});
|
||||
</script>
|
||||
</form>
|
||||
';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
function toggle2($key){
|
||||
$configNames = json_decode(file_get_contents(base_path('config/config-legends.json')));
|
||||
echo '
|
||||
<form id="'.$key.'-form" action="'.route('editConfig').'" enctype="multipart/form-data" method="post">
|
||||
<div class="form-group col-lg-8">
|
||||
<input value="toggle2" name="type" style="display:none;" type="text" required>
|
||||
<input value="'.$key.'" name="entry" style="display:none;" type="text" required>
|
||||
<h5 style="margin-top:50px">'; foreach($configNames as $obj){if($obj->value == $key){echo $obj->title;}}; echo '</h5>
|
||||
<p class="text-muted">'; foreach($configNames as $obj){if($obj->value == $key){echo $obj->description;}}; echo '</p>
|
||||
<div class="input-group">
|
||||
<div class="row toggle-btn"><input name="toggle" class="switch toggle-btn" type="checkbox" id="'.$key.'"'; if(EnvEditor::getKey($key) == 'auth'){echo '/>';}else{echo 'checked>';} echo '<label for="'.$key.'" class="label txt-label">Enable</label></div>
|
||||
</div></div>
|
||||
<input type="hidden" name="_token" value="'.csrf_token().'">
|
||||
<script type="text/javascript">
|
||||
document.getElementById("'.$key.'-form").addEventListener("change", function() {
|
||||
this.submit();
|
||||
});
|
||||
</script>
|
||||
</form>
|
||||
';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
function text($key){
|
||||
$configNames = json_decode(file_get_contents(base_path('config/config-legends.json')));
|
||||
$configValue = str_replace('"', "", EnvEditor::getKey($key));
|
||||
echo '
|
||||
<form id="'.$key.'-form" action="'.route('editConfig').'" enctype="multipart/form-data" method="post">
|
||||
<div class="form-group col-lg-8">
|
||||
<input value="text" name="type" style="display:none;" type="text" required>
|
||||
<input value="'.$key.'" name="entry" style="display:none;" type="text" required>
|
||||
<h5 style="margin-top:50px">'; foreach($configNames as $obj){if($obj->value == $key){echo $obj->title;}}; echo '</h5>
|
||||
<p class="text-muted">'; foreach($configNames as $obj){if($obj->value == $key){echo $obj->description;}}; echo '</p>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="value" value="'.$configValue.'" required>'; echo '
|
||||
<input type="hidden" name="_token" value="'.csrf_token().'">
|
||||
<button style="position:relative;bottom:17px;" type="submit" class="mt-3 ml-3 btn btn-info">Apply</button>
|
||||
</div></div>
|
||||
</form>
|
||||
';
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<h2 class="ch2">Application</h2>
|
||||
|
||||
|
||||
{{-- start register --}}
|
||||
<form id="register-form" action="{{route('editConfig')}}" enctype="multipart/form-data" method="post">
|
||||
<div class="form-group col-lg-8">
|
||||
<input value="register" name="type" style="display:none;" type="text" required>
|
||||
<input value="register" name="entry" style="display:none;" type="text" required>
|
||||
<h5 style="margin-top:50px">Enable registration</h5>
|
||||
<p class="text-muted">Sets wheter or not users are able to register on your application.</p>
|
||||
<div class="input-group">
|
||||
<div class="row toggle-btn"><input name="toggle" class="switch toggle-btn" type="checkbox" id="toggle" <?php if(Page::pluck('register') == '["false"]'){echo '/>';}else{echo 'checked>';} ?> <label for="'.$key.'" class="label txt-label">Enable</label></div>
|
||||
</div></div>required
|
||||
<input type="hidden" name="_token" value="{{csrf_token()}}">
|
||||
<script type="text/javascript">document.getElementById("register-form").addEventListener("change", function() { this.submit(); });</script>
|
||||
</form>
|
||||
{{-- end register --}}
|
||||
|
||||
|
||||
{{toggle2('REGISTER_AUTH')}}
|
||||
|
||||
|
||||
{{-- start home url --}}
|
||||
<?php $configValue2 = str_replace('"', "", EnvEditor::getKey('HOME_URL')); ?>
|
||||
<form id="home-url-form" action="{{route('editConfig')}}" enctype="multipart/form-data" method="post">
|
||||
<div class="form-group col-lg-8">
|
||||
<input value="homeurl" name="type" style="display:none;" type="text" required>
|
||||
<input value="HOME_URL" name="entry" style="display:none;" type="text" required>
|
||||
<h5 style="margin-top:50px">Set user page as Home Page</h5>
|
||||
<p class="text-muted">Set a user page as the home page. This will move the previous home page to example.com/home.</p>
|
||||
<div class="input-group">
|
||||
|
||||
<select style="max-width:600px" class="form-control" name="value">
|
||||
@if($configValue2 != '')<option>{{$configValue2}}</option>@endif
|
||||
@if($configValue2 != 'default')<option>default</option>@endif
|
||||
<?php $users = DB::table('users')->where('littlelink_name', '!=', '')->get();
|
||||
foreach($users as $user){if($user->littlelink_name != $configValue2){echo '<option>' . $user->littlelink_name . '</option>';}} ?>
|
||||
</select>
|
||||
|
||||
</div></div>
|
||||
<input type="hidden" name="_token" value="{{csrf_token()}}">
|
||||
<script type="text/javascript">document.getElementById("home-url-form").addEventListener("change", function() { this.submit(); });</script>
|
||||
</form>
|
||||
{{-- end home url --}}
|
||||
|
||||
|
||||
{{toggle('FORCE_HTTPS')}}
|
||||
|
||||
|
||||
{{text('APP_NAME')}}
|
||||
|
||||
|
||||
<h2 class="ch2">Panel settings</h2>
|
||||
|
||||
{{toggle('NOTIFY_EVENTS')}}
|
||||
|
||||
|
||||
{{toggle('NOTIFY_UPDATES')}}
|
||||
|
||||
|
||||
{{toggle('DISPLAY_FOOTER')}}
|
||||
|
||||
|
||||
{{toggle('DISPLAY_CREDIT')}}
|
||||
|
||||
|
||||
{{toggle('ENABLE_BUTTON_EDITOR')}}
|
||||
|
||||
|
||||
{{toggle('USE_THEME_PREVIEW_IFRAME')}}
|
||||
|
||||
|
||||
<h2 class="ch2">Security</h2>
|
||||
|
||||
|
||||
{{toggle('ALLOW_USER_HTML')}}
|
||||
|
||||
|
||||
{{toggle('ALLOW_CUSTOM_CODE_IN_THEMES')}}
|
||||
|
||||
|
||||
{{toggle('ENABLE_THEME_UPDATER')}}
|
||||
|
||||
|
||||
<h2 class="ch2">Advanced</h2>
|
||||
|
||||
|
||||
{{toggle('MAINTENANCE_MODE')}}
|
||||
|
||||
|
||||
{{toggle('JOIN_BETA')}}
|
||||
|
||||
|
||||
{{toggle('SKIP_UPDATE_BACKUP')}}
|
||||
|
||||
|
||||
{{toggle('CUSTOM_META_TAGS')}}
|
||||
|
||||
|
||||
{{toggle('ENABLE_SOCIAL_LOGIN')}}
|
||||
|
||||
|
||||
{{-- start SMTP settings --}}
|
||||
<h2 class="ch2">SMTP</h2>
|
||||
<form id="smtp-form" action="{{route('editConfig')}}" enctype="multipart/form-data" method="post">
|
||||
<div class="form-group col-lg-8">
|
||||
<input value="smtp" name="type" style="display:none;" type="text" required>
|
||||
<input value="smtp" name="entry" style="display:none;" type="text" required>
|
||||
<h5 style="margin-top:50px">Use built in SMTP server</h5>
|
||||
<p class="text-muted">Uses SMTP server provided by LittleLink Custom. Might not be 100% reliable. Some errors may occur.</p>
|
||||
<div class="input-group">
|
||||
<div class="row toggle-btn"><input name="toggle" class="switch toggle-btn" type="checkbox" id="toggle" <?php if(EnvEditor::getKey('MAIL_MAILER') != 'built-in'){echo '/>';}else{echo 'checked>';} ?> <label for="'.$key.'" class="label txt-label">Enable</label></div>
|
||||
</div></div>
|
||||
<input type="hidden" name="_token" value="{{csrf_token()}}">
|
||||
<div style="max-width: 600px; padding-left: 20px;">
|
||||
<label style="margin-top:15px">Host</label>
|
||||
<input type="text" class="form-control" name="MAIL_HOST" value="{{EnvEditor::getKey('MAIL_HOST')}}" />
|
||||
<label style="margin-top:15px">Port</label>
|
||||
<input type="text" class="form-control" name="MAIL_PORT" value="{{EnvEditor::getKey('MAIL_PORT')}}" />
|
||||
<label style="margin-top:15px">Username</label>
|
||||
<input type="text" class="form-control" name="MAIL_USERNAME" value="{{EnvEditor::getKey('MAIL_USERNAME')}}" />
|
||||
<label style="margin-top:15px">Password</label>
|
||||
<input type="password" class="form-control" name="MAIL_PASSWORD" value="{{EnvEditor::getKey('MAIL_PASSWORD')}}" />
|
||||
<label style="margin-top:15px">Encryption type</label>
|
||||
<input type="text" class="form-control" name="MAIL_ENCRYPTION" value="{{EnvEditor::getKey('MAIL_ENCRYPTION')}}" />
|
||||
<label style="margin-top:15px">From adress</label>
|
||||
<input type="text" class="form-control" name="MAIL_FROM_ADDRESS" value="{{EnvEditor::getKey('MAIL_FROM_ADDRESS')}}" />
|
||||
</div>
|
||||
<button type="submit" class="mt-3 ml-3 btn btn-info">Apply chnanges</button>
|
||||
</form>
|
||||
{{-- end SMTP settings --}}
|
||||
|
||||
|
||||
{{-- start debug settings --}}
|
||||
<h2 class="ch2">Debug</h2>
|
||||
<form id="debug-form" action="{{route('editConfig')}}" enctype="multipart/form-data" method="post">
|
||||
<div class="form-group col-lg-8">
|
||||
<input value="debug" name="type" style="display:none;" type="text" required>
|
||||
<input value="debug" name="entry" style="display:none;" type="text" required>
|
||||
<h5 style="margin-top:50px">Debug mode</h5>
|
||||
<p class="text-muted">Should be disabled in a production environment. Usefull for debuggin during setup.</p>
|
||||
<div class="input-group">
|
||||
<div class="row toggle-btn"><input name="toggle" class="switch toggle-btn" type="checkbox" id="toggle" <?php if(EnvEditor::getKey('APP_DEBUG') == 'false'){echo '/>';}else{echo 'checked>';} ?> <label for="'.$key.'" class="label txt-label">Enable</label></div>
|
||||
</div></div>
|
||||
<input type="hidden" name="_token" value="{{csrf_token()}}">
|
||||
<script type="text/javascript">document.getElementById("debug-form").addEventListener("change", function() { this.submit(); });</script>
|
||||
</form>
|
||||
{{-- end debug settings --}}
|
||||
|
||||
<br><br><br><br><br>
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
|
||||
if (localStorage.getItem("my_app_name_here-quote-scroll") != null) {
|
||||
$(window).scrollTop(localStorage.getItem("my_app_name_here-quote-scroll"));
|
||||
}
|
||||
|
||||
$(window).on("scroll", function() {
|
||||
localStorage.setItem("my_app_name_here-quote-scroll", $(window).scrollTop());
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
102
resources/views/components/config/diagnose.blade.php
Normal file
102
resources/views/components/config/diagnose.blade.php
Normal file
@ -0,0 +1,102 @@
|
||||
|
||||
<?php
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
||||
$wtrue = "<td style=\"text-align: center; cursor: help;\" title=\"Everything is working as expected!\">✔️</td>";
|
||||
$wfalse = "<td style=\"text-align: center; cursor: help;\" title=\"This file cannot be written to. This may impede proper operation.\">❌</td>";
|
||||
|
||||
$utrue = "<td style=\"text-align: center; cursor: help;\" title=\"Your security is at risk. This file can be accessed by everyone. Immediate action is required!\">❗</td>";
|
||||
$ufalse = "<td style=\"text-align: center; cursor: help;\" title=\"Everything is working as expected!\">✔️</td>";
|
||||
$unull = "<td style=\"text-align: center; cursor: help;\" title=\"Something went wrong. This might be normal if you're running behind a proxy or docker container.\">➖</td>";
|
||||
|
||||
|
||||
$server = $_SERVER['SERVER_NAME'];
|
||||
$uri = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Tests if a URL has a valid SSL certificate
|
||||
function has_ssl( $domain ) {
|
||||
$ssl_check = @fsockopen( 'ssl://' . $domain, 443, $errno, $errstr, 30 );
|
||||
$res = !! $ssl_check;
|
||||
if ( $ssl_check ) { fclose( $ssl_check ); }
|
||||
return $res;
|
||||
}
|
||||
|
||||
// Changes probed URL to HTTP if no valid SSL certificate is present, otherwise an error would be thrown
|
||||
if (has_ssl($server)) {
|
||||
$actual_link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||
} else {
|
||||
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||
}
|
||||
|
||||
function getUrlSatusCode($url, $timeout = 3)
|
||||
{
|
||||
$ch = curl_init();
|
||||
$opts = array(CURLOPT_RETURNTRANSFER => true, // do not output to browser
|
||||
CURLOPT_URL => $url,
|
||||
CURLOPT_NOBODY => true, // do a HEAD request only
|
||||
CURLOPT_TIMEOUT => $timeout);
|
||||
curl_setopt_array($ch, $opts);
|
||||
curl_exec($ch);
|
||||
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
return $status;
|
||||
}
|
||||
|
||||
//Files or directories to test if writable
|
||||
$wrt1 = is_writable('.env');
|
||||
$wrt2 = is_writable('database/database.sqlite');
|
||||
|
||||
//Files or directories to test if accessible externally
|
||||
$url1 = getUrlSatusCode($actual_link . '/../../.env');
|
||||
$url2 = getUrlSatusCode($actual_link . '/../../database/database.sqlite');
|
||||
|
||||
?>
|
||||
|
||||
@if($url1 == '200' or $url2 == '200')
|
||||
<a href="https://docs.littlelink-custom.com/d/installation-requirements/" target="_blank"><h4 style="color:tomato;">Your security is at risk. Some files can be accessed by everyone. Immediate action is required! <br> Click this message to learn more.</h4></a>
|
||||
@endif
|
||||
|
||||
<h3 class="mb-4">Write access</h3>
|
||||
<p>Here, you can easily verify if important system files can be written to. This is important for every function to work properly. Entries marked with a '✔️' work as expected, entries marked with a '❌' do not.</p>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" style="width: 90%;">File</th>
|
||||
<th title="You can hover over entries to learn more about their current status" style="cursor: help;" scope="col">Hover for more</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td title="">{{ base_path(".env") }}</td>
|
||||
<?php if ($wrt1 > 0) {echo "$wtrue";} else {echo "$wfalse";} ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td title="">{{ base_path("database/database.sqlite") }}</td>
|
||||
<?php if ($wrt2 > 0) {echo "$wtrue";} else {echo "$wfalse";} ?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br><h3 class="mb-4">Security</h3>
|
||||
<p>Here, you can easily verify if critical system files can be accessed externally. It is important that these files cannot be accessed, otherwise user data like passwords could get leaked. Entries marked with a '✔️' cannot be accessed externally, entries marked with a '❗' can be accessed by anyone and require immediate action to protect your data.</p>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" style="width: 90%;">Link</th>
|
||||
<th title="You can hover over entries to learn more about their current status" style="cursor: help;" scope="col">Hover for more</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td title="">{{ url('/.env') }}</td>
|
||||
<?php if($url1 == '200'){echo "$utrue";} elseif($url1 == '0'){echo "$unull";} else{echo "$ufalse";} ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td title="">{{ url('/database/database.sqlite') }}</td>
|
||||
<?php if($url2 == '200'){echo "$utrue";} elseif($url2 == '0'){echo "$unull";} else{echo "$ufalse";} ?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
@ -195,7 +195,7 @@ if($url1sb == '200' or $url2sb == '200') {
|
||||
<a @if(config('advanced-config.expand_panel_admin_menu_permanently') != 'true') href="#adminSubmenu" data-toggle="collapse" aria-expanded="false" class="dropdown-toggle" @endif>Admin</a>
|
||||
<ul class="@if(config('advanced-config.expand_panel_admin_menu_permanently') != 'true') collapse @endif list-unstyled" id="adminSubmenu">
|
||||
<li>
|
||||
<a href="{{ url('env-editor') }}">Config</a>
|
||||
<a href="{{ url('panel/config') }}">Config</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ url('panel/users/all') }}">Manage Users</a>
|
||||
|
@ -1,7 +1,7 @@
|
||||
@extends('layouts.sidebar')
|
||||
|
||||
@section('content')
|
||||
<style>button{border-style: none;background-color: #0085ff;color: #fff;padding: 13px;border-radius: 5px;}button:hover {background-color:#0065c1;color: #FFF;box-shadow: 0 10px 20px -10px rgba(0,0,0, 0.6);}.btn {color: #FFF !important;}.buttondm{display:inline-block;text-decoration:none;height:48px;text-align:center;vertical-align:middle;font-size:18px;width:300px;font-weight:700;line-height:48px;letter-spacing:.1px;white-space:wrap;border-radius:8px;cursor:pointer}.button-hover,.credit-hover{display:inline-block;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px rgba(0,0,0,0);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.button-hover:active,.credit-hover:active,.button-hover:focus,.credit-hover:focus,.button-hover:hover,.credit-hover:hover{-webkit-transform:scale(1.06);transform:scale(1.06)}.container{align-items:center;display:flex;flex-direction:column;justify-content:center;height:50%;width:100%}</style>
|
||||
<style>button{border-style: none;background-color: #0085ff;color: #fff;border-radius: 5px;}button:hover {background-color:#0065c1;color: #FFF;box-shadow: 0 10px 20px -10px rgba(0,0,0, 0.6);}.btn {color: #FFF !important;}.buttondm{display:inline-block;text-decoration:none;height:48px;text-align:center;vertical-align:middle;font-size:18px;width:300px;font-weight:700;line-height:48px;letter-spacing:.1px;white-space:wrap;border-radius:8px;cursor:pointer}.button-hover,.credit-hover{display:inline-block;-webkit-transform:perspective(1px) translateZ(0);transform:perspective(1px) translateZ(0);box-shadow:0 0 1px rgba(0,0,0,0);-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:transform;transition-property:transform}.button-hover:active,.credit-hover:active,.button-hover:focus,.credit-hover:focus,.button-hover:hover,.credit-hover:hover{-webkit-transform:scale(1.06);transform:scale(1.06)}.container{align-items:center;display:flex;flex-direction:column;justify-content:center;height:50%;width:100%}</style>
|
||||
<!-- Custom icons font-awesome -->
|
||||
<script src="https://kit.fontawesome.com/c4a5e06183.js" crossorigin="anonymous"></script>
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v6.1.2/css/all.css" integrity="sha384-fZCoUih8XsaUZnNDOiLqnby1tMJ0sE7oBbNk2Xxf5x8Z4SvNQ9j83vFMa/erbVrV" crossorigin="anonymous"/>
|
||||
|
144
resources/views/panel/config-editor.blade.php
Normal file
144
resources/views/panel/config-editor.blade.php
Normal file
@ -0,0 +1,144 @@
|
||||
@extends('layouts.sidebar')
|
||||
|
||||
@section('content')
|
||||
@if($_SERVER['QUERY_STRING'] == '')
|
||||
|
||||
<style>.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs > li.active > a,.nav-tabs > li.active > a:hover,.nav-tabs > li.active > a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav>li>a{position:relative;display:block;padding:10px 15px!important}.nav-tabs > li > a{margin-right:2px;line-height:1.428571429;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd!important;border-bottom-color:transparent}.nav-tabs > li > a:hover{border-color:#eee #eee #ddd}.nav-tabs > li > a:focus{outline:none}.tab-content > .tab-pane{display:none}.tab-content > .active{display:block}ul{padding:0}ul.nav{list-style:none;margin:0;padding:0}ul.nav > li{float:left}ul.nav > li > a{display:block;padding:3px 10px;text-decoration:none}ul.nav > li.active > a,ul.nav > li > a:hover{background-color:#eee}.tab-content{border-top:none;padding:10px}.tab-content > .tab-pane{padding:5px}</style>
|
||||
|
||||
<div><h2>Tabs</h2></div>
|
||||
|
||||
<div id="exTab2" class="">
|
||||
<ul id="myTab" class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a href="#1" data-toggle="tab">Config</a>
|
||||
</li>
|
||||
<li><a href="#2" data-toggle="tab">Advanced Config</a>
|
||||
</li>
|
||||
<li><a href="#3" data-toggle="tab">Take Backup</a>
|
||||
</li>
|
||||
<li><a href="#4" data-toggle="tab">All Backups</a>
|
||||
</li>
|
||||
<li><a href="#5" data-toggle="tab">Diagnosis</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content ">
|
||||
|
||||
|
||||
<div class="tab-pane active" id="1">
|
||||
<section class="shadow text-gray-400">
|
||||
<h2 class="mb-4 card-header"><i class="bi bi-link-45deg"> Config</i></h2>
|
||||
<div class="card-body p-0 p-md-3">
|
||||
|
||||
<style>
|
||||
.option{
|
||||
background-color: #343a40;
|
||||
color: rgba(255, 255, 255, 0.8) !important;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.opt-img{
|
||||
font-size: 4rem;
|
||||
vertical-align: middle;
|
||||
display: flex;
|
||||
padding-right: 20px;
|
||||
padding-left: 10px;
|
||||
color: white;
|
||||
}
|
||||
.opt-txt{
|
||||
bottom: 10px;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="option"><a href="?alternative-config">
|
||||
<div class="row"><i class="bi bi-pencil-square opt-img"></i><div>
|
||||
<h3 class="">Alternative Config Editor</h3><p class="text-muted opt-txt">Use the Alternative Config Editor to edit the config directly</p>
|
||||
</div></div></a></div><br>
|
||||
|
||||
<div class="option"><a href="{{ url('env-editor') }}">
|
||||
<div class="row"><i class="bi bi-gear-fill opt-img"></i><div>
|
||||
<h3 class="">Config Manager</h3><p class="text-muted opt-txt">Manage, download, upload, backup and restore your config</p>
|
||||
</div></div></a></div><br>
|
||||
|
||||
<div class="option"><a href="{{ url('panel/phpinfo') }}">
|
||||
<div class="row"><i class="bi bi-filetype-php opt-img"></i><div>
|
||||
<h3 class="">PHP info</h3><p class="text-muted opt-txt">Display debuggin infromation about your PHP setup</p>
|
||||
</div></div></a></div><br>
|
||||
|
||||
@include('components.config.config')
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tab-pane" id="2">
|
||||
<section class="shadow text-gray-400">
|
||||
<h2 class="mb-4 card-header"><i class="bi bi-pencil-square"> Advanced config</i></h2>
|
||||
<div class="card-body p-0 p-md-3">
|
||||
@include('components.config.advanced-config')
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tab-pane" id="3">
|
||||
<section class="shadow text-gray-400">
|
||||
<h2 class="mb-4 card-header"><i class="bi bi-link-45deg"> Backup</i></h2>
|
||||
<div class="card-body p-0 p-md-3">
|
||||
@include('components.config.backup')
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tab-pane" id="4">
|
||||
<section class="shadow text-gray-400">
|
||||
<h2 class="mb-4 card-header"><i class="bi bi-link-45deg"> Backups</i></h2>
|
||||
<div class="card-body p-0 p-md-3">
|
||||
@include('components.config.backups')
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tab-pane" id="5">
|
||||
<section class="shadow text-gray-400">
|
||||
<h2 class="mb-4 card-header"><i class="bi bi-braces-asterisk"> Debugging information</i></h2>
|
||||
<div class="card-body p-0 p-md-3">
|
||||
@include('components.config.diagnose')
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@elseif($_SERVER['QUERY_STRING'] == 'alternative-config')
|
||||
@include('components.config.alternative-config')
|
||||
@endif
|
||||
|
||||
|
||||
@push("sidebar-scripts")
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
||||
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
|
||||
<script>
|
||||
$('#myTab a').click(function(e) {
|
||||
e.preventDefault();
|
||||
$(this).tab('show');
|
||||
});
|
||||
|
||||
// store the currently selected tab in the hash value
|
||||
$("ul.nav-tabs > li > a").on("shown.bs.tab", function(e) {
|
||||
var id = $(e.target).attr("href").substr(1);
|
||||
window.location.hash = id;
|
||||
});
|
||||
|
||||
// on load of the page: switch to the currently selected tab
|
||||
var hash = window.location.hash;
|
||||
$('#myTab a[href="' + hash + '"]').tab('show');
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@endsection
|
@ -2,8 +2,6 @@
|
||||
<template id="env-editor-backups">
|
||||
<div>
|
||||
<div class="h5 my-4">{{__($translatePrefix.'title')}}</div>
|
||||
<div class="h5 my-4">You can find your updater backups <span><a href="{{ url('panel/backups') }}">here</a></span></div>
|
||||
<div class="h5 my-4">You can backup your instance <span><a href="{{ url('backup') }}">here</a></span></div>
|
||||
<div>
|
||||
<button class="btn-info btn " @click="createBackUp">{{__($translatePrefix.'btn.backUpCurrentEnv')}}</button>
|
||||
<a class="btn-info btn" href="{{route(config($package.'.route.name').'.download')}}">{{__($translatePrefix.'btn.downloadCurrentEnv')}}</a>
|
||||
|
@ -7,8 +7,8 @@
|
||||
{{trans('env-editor::env-editor.menuTitle')}}
|
||||
@endpush
|
||||
|
||||
|
||||
@section('content')
|
||||
|
||||
<div id="env-editor">
|
||||
<div id="env-alerts"></div>
|
||||
|
||||
@ -22,26 +22,11 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#upload-env" role="tab">{{__($translatePrefix.'views.tabTitles.upload')}}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url('/panel/advanced-config') }}" role="tab">Advanced Config ⤻</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url('/panel/diagnose') }}" role="tab">Diagnosis ⤻</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url('/panel/phpinfo') }}" role="tab">PHP Info ⤻</a>
|
||||
</li>
|
||||
<li class="nav-item ml-auto">
|
||||
<env-editor-config-actions></env-editor-config-actions>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@if(env('NOTIFY_EVENTS') === false)
|
||||
<br><br>
|
||||
<a style="color:#ffbb39; font-weight:300; font-size:120%;">You currently have Event Notifications disabled. To get notified about polls, possible security vulnerabilities or important news, change the setting <code>NOTIFY_EVENTS</code> below to <code>true</code>. If you enable this and an event is happening, a small text will pop up on your Admin Panel which will only be visible for admins.</a>
|
||||
@endif
|
||||
<?php if(strpos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false)echo "<br><br><p style=\"color:tomato; font-weight:300; font-size:120%;\">You appear to be using NGINX. Some features of the Config Editor do not work on NGINX based servers. You can use the alternative Config Editor <a href=" . url()->current() . "/../../panel/env>here</a>.</p>"; ?>
|
||||
|
||||
<div class="tab-content" id="nav-tabContent">
|
||||
<div class="tab-pane fade show active p-3" id="current-env" role="tabpanel" aria-labelledby="nav-home-tab">
|
||||
<env-main-tab></env-main-tab>
|
||||
@ -52,12 +37,11 @@
|
||||
<div class="tab-pane fade p-3" id="upload-env" role="tabpanel" aria-labelledby="nav-contact-tab">
|
||||
<env-file-upload></env-file-upload>
|
||||
</div>
|
||||
<p style="color:#fff; font-weight:500; font-size:100%; position:relative; bottom:25px;">You can disable or enable registration <a href="{{ url('panel/pages') }}">here</a>.</p>
|
||||
</div>
|
||||
|
||||
<env-keys-modal ref="keysModal"></env-keys-modal>
|
||||
</div>
|
||||
<p style="color:#fff; font-weight:500; font-size:160%;">Use the <a href="{{url()->current()}}/../panel/env">Alternative Config Editor ⤻</a></p>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -126,5 +110,3 @@
|
||||
})
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@extends('layouts.sidebar')
|
||||
|
@ -4,9 +4,6 @@
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
|
||||
@include('layouts.analytics')
|
||||
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>@lang('env-editor::env-editor.menuTitle')</title>
|
||||
@ -14,6 +11,11 @@
|
||||
<!-- CSRF Token -->
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}"/>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css"
|
||||
integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn"
|
||||
crossorigin="anonymous">
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css"
|
||||
integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p"
|
||||
@ -22,6 +24,17 @@
|
||||
@stack('styles')
|
||||
</head>
|
||||
<body>
|
||||
<div id="app" class="container-fluid ">
|
||||
|
||||
<div id="body-wrapper" class="py-5 px-2">
|
||||
<h2 class="mb-4">@stack('documentTitle')</h2>
|
||||
<main class="" role="main" itemprop="mainContentOfPage" itemscope itemtype="http://schema.org/Table">
|
||||
@yield('content')
|
||||
</main>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<span class="javascripts">
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"
|
||||
|
@ -137,6 +137,8 @@ Route::group([
|
||||
Route::post('/panel/theme', [AdminController::class, 'deleteTheme'])->name('deleteTheme');
|
||||
Route::get('/panel/theme', [AdminController::class, 'showThemes'])->name('showThemes');
|
||||
Route::get('/update/theme', [AdminController::class, 'updateThemes'])->name('updateThemes');
|
||||
Route::get('/panel/config', [AdminController::class, 'showConfig'])->name('showConfig');
|
||||
Route::post('/panel/config', [AdminController::class, 'editConfig'])->name('editConfig');
|
||||
Route::get('/update', function () {return view('update', []);});
|
||||
Route::get('/backup', function () {return view('backup', []);});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user