mirror of
https://github.com/hassio-addons/addon-grocy.git
synced 2025-05-04 19:21:24 +00:00
parent
68439cf6db
commit
f7f53dd357
1 changed files with 3 additions and 2 deletions
|
@ -5,9 +5,10 @@ index fceaaa0..bfc76e6 100644
|
|||
@@ -87,7 +87,7 @@
|
||||
Grocy.Components = { };
|
||||
Grocy.Mode = '{{ GROCY_MODE }}';
|
||||
- Grocy.BaseUrl = '{{ $U('/') }}';
|
||||
- Grocy.CurrentUrlRelative = "/" + window.location.href.split('?')[0].replace(Grocy.BaseUrl, "");
|
||||
+ Grocy.BaseUrl = window.location.origin + '{{ $U('/') }}';
|
||||
+ 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 }}';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue