Add browser TZ to debug page.

This commit is contained in:
James Cole
2021-04-04 17:57:46 +02:00
parent 2d97408c1f
commit caf1e6010b
2 changed files with 11 additions and 3 deletions

View File

@@ -193,7 +193,7 @@ class DebugController extends Controller
$logContent = 'Truncated from this point <----|' . substr($logContent, -8192); $logContent = 'Truncated from this point <----|' . substr($logContent, -8192);
} }
return prefixView( return view(
'debug', 'debug',
compact( compact(
'phpVersion', 'phpVersion',

View File

@@ -10,7 +10,7 @@
<p style="font-family:Arial, Arial, Helvetica, sans-serif;font-size:12pt;width:600px;"> <p style="font-family:Arial, Arial, Helvetica, sans-serif;font-size:12pt;width:600px;">
<strong>{{ trans('firefly.debug_pretty_table') }}</strong> <strong>{{ trans('firefly.debug_pretty_table') }}</strong>
</p> </p>
<textarea rows="30" cols="100" name="debug_info" style="font-family:Menlo, Monaco, Consolas, monospace;font-size:8pt;"> <textarea rows="30" cols="100" name="debug_info" id="debug_info" style="font-family:Menlo, Monaco, Consolas, monospace;font-size:8pt;">
Debug information generated at {{ now }} for Firefly III version **{{ FF_VERSION }}**. Debug information generated at {{ now }} for Firefly III version **{{ FF_VERSION }}**.
| Scope | Version | | Scope | Version |
@@ -26,7 +26,8 @@ Debug information generated at {{ now }} for Firefly III version **{{ FF_VERSION
| Using docker? | {% if isDocker %}true{% else %}false{% endif %} | | Using docker? | {% if isDocker %}true{% else %}false{% endif %} |
| Telemetry | {% if telemetry %}true{% else%}false{% endif%} | | Telemetry | {% if telemetry %}true{% else%}false{% endif%} |
| Layout | {{ layout }} | | Layout | {{ layout }} |
| TZ | {{ tz }} | | System TZ | {{ tz }} |
| Browser TZ | [BrowserTZ] |
| App environment | {{ appEnv }} | | App environment | {{ appEnv }} |
| App debug mode | {{ appDebug }} | | App debug mode | {{ appDebug }} |
| App cache driver | {{ cacheDriver }} | | App cache driver | {{ cacheDriver }} |
@@ -56,6 +57,13 @@ Debug information generated at {{ now }} for Firefly III version **{{ FF_VERSION
{% endfor %} {% endfor %}
| User agent | {{ userAgent }} | | User agent | {{ userAgent }} |
</textarea> </textarea>
<script type="text/javascript">
var textArea = document.getElementById('debug_info');
var text = textArea.value;
var timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
text = text.replace('[BrowserTZ]', timeZone);
textArea.value = text;
</script>
<p style="font-family:Arial, Arial, Helvetica, sans-serif;font-size:12pt;width:600px;color:#a00;"> <p style="font-family:Arial, Arial, Helvetica, sans-serif;font-size:12pt;width:600px;color:#a00;">
<a href="{{ route('index') }}">{{ trans('firefly.back_to_index') }}</a> <a href="{{ route('index') }}">{{ trans('firefly.back_to_index') }}</a>