diff --git a/resources/views/layouts/sidebar.blade.php b/resources/views/layouts/sidebar.blade.php index ac224953..8e186e4e 100755 --- a/resources/views/layouts/sidebar.blade.php +++ b/resources/views/layouts/sidebar.blade.php @@ -683,13 +683,16 @@ try { $redirectURL = url('').'/'.'u/'.Auth::user()->id; + $argValues = config('advanced-config.qr_code_gradient') ?? [0, 0, 0, 0, 0, 0, 'diagonal']; + list($arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7) = $argValues; + if (extension_loaded('imagick')) { - $imgSrc = QrCode::format('png')->gradient(224, 36, 252, 35, 199, 225,'diagonal')->eye('circle')->style('round')->size(1000)->generate($redirectURL); + $imgSrc = QrCode::format('png')->gradient($arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7)->eye('circle')->style('round')->size(1000)->generate($redirectURL); $imgSrc = base64_encode($imgSrc); $imgSrc = 'data:image/png;base64,' . $imgSrc; $imgType = 'png'; } else { - $imgSrc = QrCode::gradient(224, 36, 252, 35, 199, 225,'diagonal')->eye('circle')->style('round')->size(1000)->generate($redirectURL); + $imgSrc = QrCode::gradient($arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7)->eye('circle')->style('round')->size(1000)->generate($redirectURL); $imgSrc = base64_encode($imgSrc); $imgSrc = 'data:image/svg+xml;base64,' . $imgSrc; $imgType = 'svg';