<template>
  <v-app-bar
    app
    dense
    color="appbar"
    elevation="1"
    fixed
    tile
  >
    <v-row
      class="pa-0"
      align="center"
    >
      <v-btn
        @click.stop="$store.dispatch('app/menuToggle')"
        icon
        class="d-sm-none"
      >
        <v-icon class="menuButton--text">mdi-menu</v-icon>
      </v-btn>
      <v-spacer></v-spacer>
      <WsAppBarLocaleSelect
        v-if="SET_locale"
        class="mr-4"
      ></WsAppBarLocaleSelect>
      <v-avatar
        color="primary mr-2"
        size="36"
      >
        <v-img
          v-if="$store.state.user.currentUser&&$store.state.user.currentUser.avatar"
          :src="$store.state.user.currentUser.avatar"
        ></v-img>
        <span
          v-else
          class="white--text"
        >WS</span>
      </v-avatar>
    </v-row>
    <v-progress-linear
      color="loadingBar"
      v-if="$store.state.app.pageLoading"
      absolute
      top
      indeterminate
    ></v-progress-linear>
  </v-app-bar>
</template>