mirror of
https://github.com/hassio-addons/addon-grocy.git
synced 2025-05-04 19:21:24 +00:00
15 lines
751 B
Diff
15 lines
751 B
Diff
diff --git a/views/layout/default.blade.php b/views/layout/default.blade.php
|
|
index 551d2eb0..1ce31f69 100644
|
|
--- a/views/layout/default.blade.php
|
|
+++ b/views/layout/default.blade.php
|
|
@@ -94,6 +94,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.View = '{{ $viewName }}';
|
|
Grocy.Currency = '{{ GROCY_CURRENCY }}';
|
|
Grocy.EnergyUnit = '{{ GROCY_ENERGY_UNIT }}';
|