<template>
    <ul class="sign-list">
        <li @click="handleEos('eos')" v-if="showLoginTypes.eos">
            <i class="icon icon-eos"></i>
            <p>EOS</p>
        </li>
        <li @click="handleEos('meetone')" v-if="showLoginTypes.meetone">
            <i class="icon icon-meetone"></i>
            <p>Meetone</p>
        </li>
        <li @click="loginEth" v-if="showLoginTypes.eth">
            <i class="icon icon-eth"></i>
            <p>ETH</p>
        </li>
        <li @click="loginTron" v-if="showLoginTypes.tron">
            <i class="icon icon-tron"></i>
            <p>TRON</p>
        </li>
        <li @click="loginTelegram" v-if="!inWallet && showLoginTypes.telegram">
            <i class="icon icon-tele"></i>
            <p>Telegram</p>
        </li>
    </ul>
</template>

<script>
import Vue from 'vue'
import { Button } from 'element-ui'
import { accountLoginMixin } from '@/mixins/login'
import { getMeechatType } from '@/util/util'

Vue.component(Button.name, Button)

export default {
  name: 'loginBox',
  mixins: [accountLoginMixin],
  data () {
    return {
      meechatType: getMeechatType()
    }
  },
  created () {

  },
  computed: {
    inWallet () {
      return /token|meet\.one|wallet|bit|eos|nova/.test(navigator.userAgent.toLowerCase())
    }
  },
  methods: {
    handleEos (type) {
      if (top === self) {
        this.loginEosMeetoneCommon(type)
      } else {
        this.loginEosMeetoneParent(type)
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.f-row{
  width: 212px;
  padding-left: 85px;
  border-bottom: 1px solid rgba(#000,0.1);
  margin: 20px auto 0;
  input{
    width: 212px;
    height: 54px;
    line-height: 54px;
    border: 0;
    font-size: 14px;
    outline: none;
    background: transparent;
  }
}
.sign-list{
  display: flex;
  // width: 400px;
  width: 320px;
  margin: 0 auto;
  justify-content: space-around;
  li{
    width: 80px;
    text-align: center;
    margin: 0 10px;
    cursor: pointer;
    &:hover{
      opacity: 0.8;
    }
  }
  p{
    color: #333333;
    font-size: 12px;
    margin-top: 16px;
  }
  .icon{
    display: inline-block;
    width: 45px;
    height: 45px;
    border-radius: 50%;
  }
  .icon-eth{
    background: url(./img/icon-eth.png) center/60% #ffffff no-repeat;
  }
  .icon-eos{
    background: url(./img/icon-eos.png) center/60% #ffffff no-repeat;
  }
  .icon-meetone{
    background: url(./img/icon-meetone.png) center/100% #ffffff no-repeat;
  }
  .icon-tron{
    background: url(./img/icon-tron.png) center/60% #ffffff no-repeat;
  }
  .icon-tele{
    background: url(./img/icon-tele.png) center/100% #ffffff no-repeat;
  }
}

.mini-wrap{
  .sign-list{
    width: auto;
    margin-top: 30px;
    // justify-content: space-between;
    // width: 260px;
    li{
      width: auto;
      margin: 0 10px 0 0;
    }
    .icon{
      width: 35px;
      height: 35px;
      background-color: #f5f5f5;
    }
    // p{
    //   display: none;
    // }
  }
}

.h5-wrap{
    .sign-list{
        width: auto;
        p{
            color: #fff;
        }
    }
    .icon{
      width: px2rem(110);
      height: px2rem(110);
      background-color: #f5f5f5;
    }
}
</style>
