<template>
  <div>
    <img
      src="./image/d2-help-button@2x.png"
      style="width: 138px;"
      @click="dialogVisible = true">
    <ai-dialog
      title="帮助"
      width="600px"
      :visible.sync="dialogVisible"
      :append-to-body="true">
      <div style="margin-top: -25px; margin-bottom: -25px;">
        <ai-button-group class="d2-mb">
          <ai-button @click="$open('https://github.com/d2-projects/d2-admin')">
            <d2-icon name="github" class="d2-mr-5"/>
            主页
          </ai-button>
          <ai-button @click="$open('https://doc.d2admin.fairyever.com/zh/')">
            <d2-icon name="book" class="d2-mr-5"/>
            中文文档
          </ai-button>
          <ai-button @click="$open('https://github.com/d2-projects/d2-admin/issues')">
            <d2-icon name="question" class="d2-mr-5"/>
            issues
          </ai-button>
          <ai-button @click="$open('https://github.com/d2-projects/d2-admin/issues/new/choose')">
            <d2-icon name="plus" class="d2-mr-5"/>
            New issue
          </ai-button>
        </ai-button-group>
        <ai-row :gutter="20">
          <ai-col :span="12">
            <ai-alert :closable="false" type="info" title="2000人QQ群 [ 推荐 ]" class="d2-mb"/>
            <img src="./image/qq.jpg" style="width: 100%;">
          </ai-col>
          <ai-col :span="12">
            <ai-alert :closable="false" type="info" title="与作者成为微信好友 邀请进微信群" class="d2-mb"/>
            <img src="./image/we.jpg" style="width: 100%;">
          </ai-col>
        </ai-row>
      </div>
    </ai-dialog>
  </div>
</template>

<script>
export default {
  name: 'd2-page-cover',
  data () {
    return {
      dialogVisible: false
    }
  }
}
</script>
