mirror of
https://github.com/hassio-addons/addon-grocy.git
synced 2025-05-04 19:21:24 +00:00
15 lines
791 B
Diff
15 lines
791 B
Diff
diff --git a/views/layout/default.blade.php b/views/layout/default.blade.php
|
|
index 4eb3fb8d..d4e5e007 100644
|
|
--- a/views/layout/default.blade.php
|
|
+++ b/views/layout/default.blade.php
|
|
@@ -88,6 +88,10 @@
|
|
Grocy.Mode = '{{ GROCY_MODE }}';
|
|
Grocy.BaseUrl = '{{ $U('/') }}';
|
|
Grocy.CurrentUrlRelative = "/" + window.location.href.split('?')[0].replace(Grocy.BaseUrl, "");
|
|
+ if(Grocy.BaseUrl.indexOf('http') != 0 || Grocy.BaseUrl.indexOf('hassio_ingress') >= 0) {
|
|
+ Grocy.BaseUrl = window.location.origin + '{{ $U('/') }}';
|
|
+ Grocy.CurrentUrlRelative = "/" + window.location.pathname.replace(Grocy.BaseUrl, "");
|
|
+ };
|
|
Grocy.ActiveNav = '@yield('activeNav', '')';
|
|
Grocy.Currency = '{{ GROCY_CURRENCY }}';
|
|
Grocy.CalendarFirstDayOfWeek = '{{ GROCY_CALENDAR_FIRST_DAY_OF_WEEK }}';
|