From cb75a24e92f4d7c9bb80cc8accf610f127052a08 Mon Sep 17 00:00:00 2001
From: Julian Prieber <60265788+JulianPrieber@users.noreply.github.com>
Date: Wed, 4 May 2022 10:12:01 +0200
Subject: [PATCH] Update button editor
Added functionality for custom website button. Made button editor optional to use.
---
.env | 16 +++++++-----
.../views/studio/button-editor.blade.php | 26 +++++++++++++------
resources/views/studio/links.blade.php | 4 ++-
storage/backups/default_settings | 6 ++++-
studio/button-editor/css/style.css | 26 ++++++++++++++++++-
5 files changed, 61 insertions(+), 17 deletions(-)
diff --git a/.env b/.env
index 89b0d7a..9c362ee 100644
--- a/.env
+++ b/.env
@@ -2,7 +2,7 @@
#=REGISTER_AUTH either auth or verified. If auth is selected, no verification is required. Default is verified.
REGISTER_AUTH=verified
-#Internal notifications=Changes if certain messages should be displayed or not
+#Internal notifications=Changes if certain messages should be displayed or not.
#=NOTIFY_EVENTS notifies admins if an important event is happening, such as polls about the future of this project or security vulnerabilities.
NOTIFY_EVENTS=true
#=NOTIFY_UPDATES either all, major or false. All notifies about all updates, major only notifies about major or important updates, false does not notify about any updates.
@@ -10,7 +10,7 @@ NOTIFY_UPDATES=major
DISPLAY_FOOTER=true
DISPLAY_CREDIT=true
-#Home URL=Changes if a user profile should be displayed as the homepage
+#Home URL=Changes if a user profile should be displayed as the homepage.
#=Leave empty to use the default homepage. To set your profile as the homepage, enter a LittleLink name. You can find this on the user panel under the page setting, the name is what comes after the '@'.
#=(e.g. 'admin' without the '@')
HOME_URL=
@@ -22,10 +22,14 @@ APP_KEY=
#=The APP_URL should be left empty under most circumstances. This setting is not required for LittleLink Custom, and you should only change this if required for your setup.
APP_URL=
-#Debug Settings=Changes if your page should display a full error description instead of a generic error 500
+#ENABLE_BUTTON_EDITOR=Determines if the custom button editor should be enabled or not, default is true.
+#=ENABLE_BUTTON_EDITOR either true or false.
+ENABLE_BUTTON_EDITOR=true
+
+#Debug Settings=Changes if your page should display a full error description instead of a generic error 500.
#=App_debug either true or false. You might want to change this to false after you're done installing, but it's very useful for troubleshooting.
APP_DEBUG=true
-#=App_env either local or production. Change this to production if you set the value above to false
+#=App_env either local or production. Change this to production if you set the value above to false.
APP_ENV=local
LOG_CHANNEL=stack
LOG_LEVEL=debug
@@ -33,7 +37,7 @@ LOG_LEVEL=debug
#Database Settings=Should be left alone. If you wish to use mysql you'd have to seed the database again.
DB_CONNECTION=sqlite
-#Mail Settings=LittleLink Custom comes with a free to use built-in SMTP server for sending mail. You can leave this setting as is, if you wish to use this service please read our terms and conditions at llc-mail.tru.io. If you do not wish to use the built-in SMTP server, change the setting below
+#Mail Settings=LittleLink Custom comes with a free to use built-in SMTP server for sending mail. You can leave this setting as is, if you wish to use this service please read our terms and conditions at llc-mail.tru.io. If you do not wish to use the built-in SMTP server, change the setting below.
#=MAIL_MAILER either smtp or built-in. Make sure to change this setting if you want to add a custom SMTP server.
MAIL_MAILER=built-in
MAIL_HOST=
@@ -44,7 +48,7 @@ MAIL_ENCRYPTION=
MAIL_FROM_ADDRESS=
MAIL_FROM_NAME="${APP_NAME}"
-#Cache Settings=Completely optional
+#Cache Settings=Completely optional.
MEMCACHED_HOST=127.0.0.1
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
diff --git a/resources/views/studio/button-editor.blade.php b/resources/views/studio/button-editor.blade.php
index e61108e..30a3cc6 100644
--- a/resources/views/studio/button-editor.blade.php
+++ b/resources/views/studio/button-editor.blade.php
@@ -1,3 +1,4 @@
+@if(env('ENABLE_BUTTON_EDITOR') === true)
@extends('layouts.sidebar')
@section('content')
@@ -208,7 +209,11 @@ var button_css = {