<ion-header [translucent]="true">
  <ion-toolbar>
    <ion-title>
      我的
    </ion-title>
  </ion-toolbar>
</ion-header>

<ion-content [fullscreen]="true">
  <ion-card>
    <ion-grid [fixed]="true">
      @if(is_login) {
      <ion-row>
        <ion-col size="3" class="center">
          <ion-avatar>
            <img [src]="user.avatar" />
          </ion-avatar>
        </ion-col>
        <ion-col size="9">
          <ion-row class="showusername">{{user.username}}</ion-row>
          <ion-row class="showdesc">年龄:{{user.age}} 性别:{{user.sex}} 粉丝数:{{user.fans}} 点赞数:{{user.likes}}</ion-row>
        </ion-col>
      </ion-row>
      <ion-card-content>
        <!-- <ion-button expand="block" (click)="updateUser()">修改</ion-button> -->
        <ion-button expand="block" (click)="openModal()">修改</ion-button>
        <ion-button expand="full" (click)="logout()">登出</ion-button>
      </ion-card-content>
      }
      @if(!is_login) {
      <ion-row>
        <ion-col size="3" class="center">
          <ion-avatar>
            <img src="https://ionicframework.com/docs/img/demos/avatar.svg" />
          </ion-avatar>
        </ion-col>
        <ion-col size="9">
          <ion-row class="showusername" (click)="navigateTo('login-page')">请登录</ion-row>
          <ion-row class="showdesc">暂无信息</ion-row>
        </ion-col>
      </ion-row>
      <ion-card-content>
        <ion-button expand="full" (click)="navigateTo('login-page')">登录</ion-button>
        <ion-button expand="full" (click)="navigateTo('register-page')">注册</ion-button>
      </ion-card-content>

      }
    </ion-grid>


  </ion-card>
</ion-content>