<ion-header>
    <ion-toolbar>
        <ion-title>我的</ion-title>
    </ion-toolbar>
</ion-header>
<ion-content>
    <ion-avatar>
        <img alt="Silhouette of a person's head" src="https://ionicframework.com/docs/img/demos/avatar.svg" />
    </ion-avatar>
    <ion-card-header>
        <ion-card-title> {{currentUser?.get('nickname')|| '未登录'}}</ion-card-title>
        <ion-card-subtitle>{{currentUser?.get('name') || '无'}}</ion-card-subtitle>
        <ion-card-subtitle>性别 {{currentUser?.get('gender') || '无'}}</ion-card-subtitle>
    </ion-card-header>
    <ion-card-content>
        个性签名 {{currentUser?.get('desc') || '太懒了什么都没写'}}
    </ion-card-content>
    <ion-list [inset]="true">
        <ion-item [button]="true" (click)="goTab('../user/info')">
            <ion-icon color="danger" slot="start" name="shield-checkmark-outline" size="large"></ion-icon>
            <ion-label>身份认证</ion-label>
            <ion-note slot="end">6</ion-note>
        </ion-item>
        <ion-item [button]="true" (click)="goTab('../user/user')">
            <ion-icon color="danger" slot="start" name="terminal-outline" size="large"></ion-icon>
            <ion-label>我的项目</ion-label>
            <ion-note slot="end">6</ion-note>
        </ion-item>
    </ion-list>
    <ion-list>
        <ion-item>
            <ion-label>作品</ion-label>
            <ion-badge color="success">80</ion-badge>
        </ion-item>


    </ion-list>
    <ion-accordion-group (ionChange)="accordionGroupChange($event)">
        <ion-accordion value="first">
            <ion-item slot="header" color="light">
                <ion-label>已下载</ion-label>
            </ion-item>
            <div class="ion-padding" slot="content">无</div>
        </ion-accordion>
        <ion-accordion value="second">
            <ion-item slot="header" color="light">
                <ion-label>已上传</ion-label>
            </ion-item>
            <div class="ion-padding" slot="content">无</div>
        </ion-accordion>
        <ion-accordion value="third">
            <ion-item slot="header" color="light">
                <ion-label>更多</ion-label>
            </ion-item>
            <div class="ion-padding" slot="content">无</div>
        </ion-accordion>
    </ion-accordion-group>
    <ion-list [inset]="true">
        <ion-button *ngIf="!currentUser?.id" expand="block" routerLink="/user/login">登录</ion-button>
        <ion-button *ngIf="currentUser?.id" fill="clear" expand="block" (click)="logout()">登出</ion-button>
    </ion-list>
</ion-content>