<clr-datagrid (clrDgRefresh)="refresh($event)">
  <clr-dg-column class="col-id">
    <ng-container *clrDgHideableColumn="{hidden: false}">
      ID
    </ng-container>
  </clr-dg-column>
  <clr-dg-column class="col-user" [clrDgField]="'name'">
    <ng-container *clrDgHideableColumn="{hidden: false}">
      登录名
    </ng-container>
  </clr-dg-column>
  <clr-dg-column class="col-email">
    <ng-container *clrDgHideableColumn="{hidden: false}">
      邮箱
    </ng-container>
  </clr-dg-column>
  <clr-dg-column class="col-name">
    <ng-container *clrDgHideableColumn="{hidden: false}">
     {{'TITLE.NAME' | translate}}
    </ng-container>
  </clr-dg-column>
  <clr-dg-column style="width: 5%">
    <ng-container *clrDgHideableColumn="{hidden: false}">
      管理员
    </ng-container>
  </clr-dg-column>
  <clr-dg-column class="col-time">
    <ng-container *clrDgHideableColumn="{hidden: false}">
      上次登录时间
    </ng-container>
  </clr-dg-column>
  <clr-dg-column>
    <ng-container *clrDgHideableColumn="{hidden: false}">
      上次登录IP
    </ng-container>
  </clr-dg-column>
  <clr-dg-column>
    <ng-container *clrDgHideableColumn="{hidden: false}">
      {{'TITLE.DESCRIPTION' | translate}}
    </ng-container>
  </clr-dg-column>
  <clr-dg-row *ngFor="let user of users" [clrDgItem]="user">
    <clr-dg-action-overflow>
      <button class="action-item" (click)="resetPassword(user)">重置密码</button>
      <button class="action-item" (click)="changeAdminRole(user)">{{adminActions(user)}}</button>
      <button class="action-item" (click)="editUser(user)">{{'BUTTON.EDIT' | translate}}</button>
      <button class="action-item" (click)="deleteUser(user)">{{'BUTTON.DELETE' | translate}}</button>
    </clr-dg-action-overflow>
    <clr-dg-cell class="col-id">{{user.id}}</clr-dg-cell>
    <!-- <clr-dg-cell><a href="javascript:void(0)" (click)="goToLink(user, 'app')">{{user.name}}</a></clr-dg-cell> -->
    <clr-dg-cell class="col-user">{{user.name}}</clr-dg-cell>
    <clr-dg-cell class="col-email">{{user.email}}</clr-dg-cell>
    <clr-dg-cell class="col-name copy">{{user.display}}</clr-dg-cell>
    <clr-dg-cell style="width: 5%">{{user.admin}}</clr-dg-cell>
    <clr-dg-cell class="col-time">{{user.lastLogin | date:'yyyy-MM-dd HH:mm:ss' }}</clr-dg-cell>
    <clr-dg-cell>{{user.lastIp}}</clr-dg-cell>
    <clr-dg-cell>{{user.comment}}</clr-dg-cell>
  </clr-dg-row>
  <clr-dg-footer>
    <wayne-paginate
      [(currentPage)]="currentPage"
      [total]="page.totalCount"
      [pageSizes]="[10, 20, 50]"
      (sizeChange)="pageSizeChange($event)"
    >
    </wayne-paginate>
  </clr-dg-footer>
</clr-datagrid>
<reset-password></reset-password>
