diff --git a/app/application/app/Events/CreatedCaptchaLog.php b/app/application/app/Events/CreatedCaptchaLog.php index 3a99380..cbdc7e6 100644 --- a/app/application/app/Events/CreatedCaptchaLog.php +++ b/app/application/app/Events/CreatedCaptchaLog.php @@ -29,13 +29,21 @@ public function __construct(CaptchaLog $captchaLog) { $link = route('captcha-tokens.edit', ['captcha_token' => $captchaLog->captcha->captcha_token_id], false); $title = $captchaLog->captcha->captchaToken->title; } + + $ip = $captchaLog->ip; + $userAgent = $captchaLog->user_agent; + if (Helpers::isDemoMode()) { + $ip = __('Demo Mode'); + $userAgent = __('Demo Mode'); + } + $this->captchaLog = [ 'created_at' => $captchaLog->created_at->format("d.m.Y H:i:s"), 'link' => $link, 'title' => $title, 'type' => $captchaLog->type->getTitle(), - 'ip' => $captchaLog->ip, - 'user_agent' => $captchaLog->user_agent, + 'ip' => $ip, + 'user_agent' => $userAgent, 'referer' => $captchaLog->referer, ]; } diff --git a/app/application/resources/views/private/dashboard/index.blade.php b/app/application/resources/views/private/dashboard/index.blade.php index 7624168..39cde16 100644 --- a/app/application/resources/views/private/dashboard/index.blade.php +++ b/app/application/resources/views/private/dashboard/index.blade.php @@ -25,8 +25,20 @@

{{ $item->type->getTitle() }}

-

IP: {{ $item->ip }}

-

User Agent: {{ $item->user_agent }}

+

IP: + @demo + {{ __('Demo Mode') }} + @else + {{ $item->ip }} + @endif +

+

User Agent: + @demo + {{ __('Demo Mode') }} + @else + {{ $item->user_agent }} + @endif +

referer: {{ $item->referer }}