mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Tell view whether we’re in Sandstorm.IO mode.
This commit is contained in:
parent
3e510bd3f6
commit
959a1a08f0
@ -15,6 +15,7 @@ use Auth;
|
||||
use Closure;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\Request;
|
||||
use View;
|
||||
|
||||
/**
|
||||
* Class Sandstorm
|
||||
@ -37,6 +38,7 @@ class Sandstorm
|
||||
{
|
||||
// is in Sandstorm environment?
|
||||
$sandstorm = intval(getenv('SANDSTORM')) === 1;
|
||||
View::share('SANDSTORM', $sandstorm);
|
||||
if (!$sandstorm) {
|
||||
return $next($request);
|
||||
}
|
||||
@ -55,6 +57,7 @@ class Sandstorm
|
||||
'password' => str_random(16),
|
||||
]
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -72,13 +72,13 @@
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<!-- Notifications: style can be found in dropdown.less -->
|
||||
<!-- User Account: style can be found in dropdown.less -->
|
||||
{% if not SANDSTORM %}
|
||||
<li class="dropdown user user-menu">
|
||||
<span style="cursor:default;color:#fff;padding: 15px;display: block;line-height: 20px;">
|
||||
<span class="hidden-xs">{{ Auth.user.email }}</span>
|
||||
</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li id="sidebar-toggle">
|
||||
<a href="#" data-toggle="control-sidebar"><i class="fa fa-plus-circle"></i></a>
|
||||
</li>
|
||||
|
@ -136,6 +136,7 @@
|
||||
</li>
|
||||
|
||||
<!-- options and preferences -->
|
||||
|
||||
<li id="option-menu"
|
||||
class="{{ activeRoutePartial('admin') }} {{ activeRoutePartial('profile') }} {{ activeRoutePartial('preferences') }} {{ activeRoutePartial('currency') }} treeview">
|
||||
<a href="#">
|
||||
@ -147,9 +148,11 @@
|
||||
</a>
|
||||
|
||||
<ul class="treeview-menu">
|
||||
{% if not SANDSTORM %}
|
||||
<li class="{{ activeRoutePartial('profile') }}">
|
||||
<a class="{{ activeRouteStrict('profile.index') }}" href="{{ route('profile.index') }}"><i class="fa fa-user fa-fw"></i> {{ 'profile'|_ }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="{{ activeRoutePartial('preferences') }}">
|
||||
<a class="{{ activeRouteStrict('preferences.index') }}" href="{{ route('preferences.index') }}"><i class="fa fa-gear fa-fw"></i> {{ 'preferences'|_ }}</a>
|
||||
</li>
|
||||
@ -171,12 +174,12 @@
|
||||
|
||||
<!-- other options -->
|
||||
|
||||
|
||||
{% if not SANDSTORM %}
|
||||
<li>
|
||||
<a href="{{ route('logout') }}">
|
||||
<i class="fa fa-sign-out fa-fw"></i>
|
||||
<span>{{ 'logout'|_ }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
Loading…
Reference in New Issue
Block a user