<h1 translate="settings.session.title"></h1>
<table class="table table-hover">
  <thead>
    <tr>
      <th>{{ 'settings.session.created_date' | translate }}</th>
      <th>{{ 'settings.session.last_connection_date' | translate }}</th>
      <th>{{ 'settings.session.user_agent' | translate }}</th>
      <th>{{ 'settings.session.current' | translate }}</th>
    </tr>
  </thead>
  <tbody>
    <tr ng-repeat="session in sessions | orderBy: '-current'" ng-class="{ 'info': session.current, 'warning': !session.current }">
      <td>{{ session.create_date | date: dateTimeFormat }}</td>
      <td>{{ session.last_connection_date | date: dateTimeFormat }}</td>
      <td title="{{ session.user_agent }}">{{ session.ip }}</td>
      <td>
        <span ng-show="session.current" class="fas fa-check"
          title="{{ 'settings.session.current_session' | translate }}"></span>
      </td>
    </tr>
  </tbody>
</table>
<div class="form-actions">
  <button type="submit" class="btn btn-warning"
    title="{{ 'settings.session.clear_message' | translate }}"
    ng-click="deleteSession()">{{ 'settings.session.clear' | translate }}</button>
</div>