Browser-cache localization strings (+ new API endpoint to get them)

This commit is contained in:
Bernd Bestel
2021-06-29 20:24:02 +02:00
parent d18a8d8b56
commit b856911f0f
8 changed files with 52 additions and 10 deletions

View File

@@ -85,6 +85,7 @@
<script>
var Grocy = { };
Grocy.Components = { };
Grocy.Version = '{{ $version }}';
Grocy.Mode = '{{ GROCY_MODE }}';
Grocy.BaseUrl = '{{ $U('/') }}';
Grocy.CurrentUrlRelative = "/" + window.location.href.split('?')[0].replace(Grocy.BaseUrl, "");
@@ -93,7 +94,6 @@
Grocy.Currency = '{{ GROCY_CURRENCY }}';
Grocy.CalendarFirstDayOfWeek = '{{ GROCY_CALENDAR_FIRST_DAY_OF_WEEK }}';
Grocy.CalendarShowWeekNumbers = {{ BoolToString(GROCY_CALENDAR_SHOW_WEEK_OF_YEAR) }};
Grocy.GettextPo = {!! $GettextPo !!};
Grocy.FeatureFlags = {!! json_encode($featureFlags) !!};
Grocy.Webhooks = {
@if(GROCY_FEATURE_FLAG_LABELPRINTER && !GROCY_LABEL_PRINTER_RUN_SERVER)