addon-grocy/grocy/rootfs/patches/fix_braindamage.patch
Artain f7f53dd357
Fix issue #208 (#254)
Co-authored-by: Artain <artain@posteo.de>
2021-11-29 19:58:12 +01:00

15 lines
743 B
Diff

diff --git a/views/layout/default.blade.php b/views/layout/default.blade.php
index fceaaa0..bfc76e6 100644
--- a/views/layout/default.blade.php
+++ b/views/layout/default.blade.php
@@ -87,7 +87,7 @@
Grocy.Components = { };
Grocy.Mode = '{{ GROCY_MODE }}';
- 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.Culture = '{{ GROCY_LOCALE }}';
Grocy.Currency = '{{ GROCY_CURRENCY }}';