Skip to content

Commit

Permalink
patch: fix error on startup (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
matttbe authored Oct 14, 2023
1 parent ed71ce5 commit 6886316
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions grocy/rootfs/patches/fix_braindamage.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
diff --git a/views/layout/default.blade.php b/views/layout/default.blade.php
index 4eb3fb8d..d4e5e007 100644
index 551d2eb0..1ce31f69 100644
--- a/views/layout/default.blade.php
+++ b/views/layout/default.blade.php
@@ -88,6 +88,10 @@
@@ -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.ActiveNav = '@yield('activeNav', '')';
Grocy.View = '{{ $viewName }}';
Grocy.Currency = '{{ GROCY_CURRENCY }}';
Grocy.CalendarFirstDayOfWeek = '{{ GROCY_CALENDAR_FIRST_DAY_OF_WEEK }}';
Grocy.EnergyUnit = '{{ GROCY_ENERGY_UNIT }}';

0 comments on commit 6886316

Please sign in to comment.