<li class="nav-item dropdown user-menu">
  <a href="#" class="nav-link d-flex align-items-center" data-toggle="dropdown">
    <img src="{{ avatar }}" class="bs-avatar mr-2" alt="User Image">
    <span class="d-none d-md-inline d-sm-block" data-mark="nickname">
      {{ user.nickname ?? user.email }}
    </span>
  </a>

  <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
    <a class="dropdown-item" href="{{ url('user') }}">
      {{ trans('general.user-center') }}
    </a>
    <a class="dropdown-item" href="{{ url('user/profile') }}">
      {{ trans('general.profile') }}
    </a>
    <div class="dropdown-divider"></div>
    {% if user.admin %}
      <a class="dropdown-item" href="{{ url('admin') }}">
        {{ trans('general.admin-panel') }}
      </a>
      <a class="dropdown-item" href="{{ url('admin/users') }}">
        {{ trans('general.user-manage') }}
      </a>
      <a class="dropdown-item" href="{{ url('admin/reports') }}">
        {{ trans('general.report-manage') }}
      </a>
      {% if cli %}
        <a class="dropdown-item" href="#" id="launch-cli">
          Web CLI
        </a>
      {% endif %}
      <div class="dropdown-divider"></div>
    {% endif %}
    <a class="dropdown-item" href="#" id="logout-button" data-toggle="modal" data-target="#modal-logout">
      {{ trans('general.logout') }}
    </a>
  </div>
</li>
