Add custom_css and custom_js advance settings

This commit is contained in:
OllieJC 2022-01-18 22:33:21 +00:00 committed by GitHub
parent 61a5a1a8b0
commit 9e67b7c72e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,6 +44,16 @@ class SettingsSeeder extends Seeder
$setting_group->title = 'app.settings.miscellaneous'; $setting_group->title = 'app.settings.miscellaneous';
$setting_group->save(); $setting_group->save();
} }
if(!$setting_group = SettingGroup::find(4)) {
$setting_group = new SettingGroup;
$setting_group->id = 4;
$setting_group->title = 'app.settings.advanced';
$setting_group->order = 3;
$setting_group->save();
} else {
$setting_group->title = 'app.settings.advanced';
$setting_group->save();
}
if($version = Setting::find(1)) { if($version = Setting::find(1)) {
$version->label = 'app.settings.version'; $version->label = 'app.settings.version';
@ -195,6 +205,38 @@ class SettingsSeeder extends Seeder
$setting->save(); $setting->save();
} }
if(!$setting = Setting::find(10)) {
$setting = new Setting;
$setting->id = 10;
$setting->group_id = 4;
$setting->key = 'custom_css';
$setting->type = 'textarea';
$setting->label = 'app.settings.custom_css';
$setting->value = '';
$setting->save();
} else {
$setting->type = 'textarea';
$setting->group_id = 4;
$setting->label = 'app.settings.custom_css';
$setting->save();
}
if(!$setting = Setting::find(11)) {
$setting = new Setting;
$setting->id = 11;
$setting->group_id = 4;
$setting->key = 'custom_js';
$setting->type = 'textarea';
$setting->label = 'app.settings.custom_js';
$setting->value = '';
$setting->save();
} else {
$setting->type = 'textarea';
$setting->group_id = 4;
$setting->label = 'app.settings.custom_js';
$setting->save();
}
if(!$home_tag = \App\Item::find(0)) { if(!$home_tag = \App\Item::find(0)) {
$home_tag = new \App\Item; $home_tag = new \App\Item;
$home_tag->id = 0; $home_tag->id = 0;