From bf0182b8fad691609501fad41c23e507d8fcaaa8 Mon Sep 17 00:00:00 2001 From: Julian Prieber Date: Wed, 15 Feb 2023 19:00:03 +0100 Subject: [PATCH] Added option to disable custom background images --- .env | 4 +++- config/config-legends.json | 4 ++++ resources/views/components/config/config.blade.php | 4 ++++ resources/views/components/finishing.blade.php | 3 +++ storage/backups/default_settings | 4 +++- 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.env b/.env index d47ba7d..4b3b90c 100644 --- a/.env +++ b/.env @@ -111,4 +111,6 @@ TITLE_FOOTER_CONTACT="Contact" HOME_FOOTER_LINK="" -HIDE_VERIFICATION_CHECKMARK=false \ No newline at end of file +HIDE_VERIFICATION_CHECKMARK=false + +ALLOW_CUSTOM_BACKGROUNDS=true \ No newline at end of file diff --git a/config/config-legends.json b/config/config-legends.json index 6b8a0e7..19672fe 100644 --- a/config/config-legends.json +++ b/config/config-legends.json @@ -214,6 +214,10 @@ "description": "Enter any URL to redirect your home link URL.
Leave empty to use the default link." }, + {"value": "ALLOW_CUSTOM_BACKGROUNDS", + "title": "Allow custom backgrounds", + "description": "Allow users to upload custom background images for their pages." + }, {"value": "HIDE_VERIFICATION_CHECKMARK", "title": "Hide verification checkmark", diff --git a/resources/views/components/config/config.blade.php b/resources/views/components/config/config.blade.php index 9ebbba1..2afa3de 100644 --- a/resources/views/components/config/config.blade.php +++ b/resources/views/components/config/config.blade.php @@ -293,6 +293,10 @@ foreach($users as $user){if($user->littlelink_name != $configValue2){echo '

Security

diff --git a/resources/views/components/finishing.blade.php b/resources/views/components/finishing.blade.php index 7a86111..97062a6 100644 --- a/resources/views/components/finishing.blade.php +++ b/resources/views/components/finishing.blade.php @@ -36,6 +36,9 @@ use Illuminate\Support\Facades\File; if(EnvEditor::keyExists('HIDE_VERIFICATION_CHECKMARK')){ /* Do nothing if key already exists */ } else {EnvEditor::addKey('HIDE_VERIFICATION_CHECKMARK', 'false');} + if(EnvEditor::keyExists('ALLOW_CUSTOM_BACKGROUNDS')){ /* Do nothing if key already exists */ + } else {EnvEditor::addKey('ALLOW_CUSTOM_BACKGROUNDS', 'true');} + // Footer page customization if(EnvEditor::keyExists('DISPLAY_FOOTER_HOME')){} else {EnvEditor::addKey('DISPLAY_FOOTER_HOME', 'true');} diff --git a/storage/backups/default_settings b/storage/backups/default_settings index e11c120..60f2bc5 100644 --- a/storage/backups/default_settings +++ b/storage/backups/default_settings @@ -111,4 +111,6 @@ TITLE_FOOTER_CONTACT="Contact" HOME_FOOTER_LINK="" -HIDE_VERIFICATION_CHECKMARK=false \ No newline at end of file +HIDE_VERIFICATION_CHECKMARK=false + +ALLOW_CUSTOM_BACKGROUNDS=true \ No newline at end of file