diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-12-03 19:44:03 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-12-03 19:44:03 +0900 |
| commit | 1c86a4bc26720682f0e75cdffaeb082e30016915 (patch) | |
| tree | ce25d2a82be7ac5aa43ce2b3f85983cfc6e44425 /src/client/app/common/views/components/github-setting.vue | |
| parent | 10.60.3 (diff) | |
| download | sharkey-1c86a4bc26720682f0e75cdffaeb082e30016915.tar.gz sharkey-1c86a4bc26720682f0e75cdffaeb082e30016915.tar.bz2 sharkey-1c86a4bc26720682f0e75cdffaeb082e30016915.zip | |
Refactor
Diffstat (limited to 'src/client/app/common/views/components/github-setting.vue')
| -rw-r--r-- | src/client/app/common/views/components/github-setting.vue | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/src/client/app/common/views/components/github-setting.vue b/src/client/app/common/views/components/github-setting.vue deleted file mode 100644 index 93d7f406f8..0000000000 --- a/src/client/app/common/views/components/github-setting.vue +++ /dev/null @@ -1,64 +0,0 @@ -<template> -<div class="mk-github-setting"> - <p>{{ $t('description') }}</p> - <p class="account" v-if="$store.state.i.github" :title="`GitHub ID: ${$store.state.i.github.id}`">{{ $t('connected-to') }}: <a :href="`https://github.com/${$store.state.i.github.login}`" target="_blank">@{{ $store.state.i.github.login }}</a></p> - <p> - <a :href="`${apiUrl}/connect/github`" target="_blank" @click.prevent="connect">{{ $store.state.i.github ? this.$t('reconnect') : this.$t('connect') }}</a> - <span v-if="$store.state.i.github"> or </span> - <a :href="`${apiUrl}/disconnect/github`" target="_blank" v-if="$store.state.i.github" @click.prevent="disconnect">{{ $t('disconnect') }}</a> - </p> - <p class="id" v-if="$store.state.i.github">GitHub ID: {{ $store.state.i.github.id }}</p> -</div> -</template> - -<script lang="ts"> -import Vue from 'vue'; -import i18n from '../../../i18n'; -import { apiUrl } from '../../../config'; - -export default Vue.extend({ - i18n: i18n('common/views/components/github-setting.vue'), - data() { - return { - form: null, - apiUrl - }; - }, - mounted() { - this.$watch('$store.state.i', () => { - if (this.$store.state.i.github && this.form) - this.form.close(); - }, { - deep: true - }); - }, - methods: { - connect() { - this.form = window.open(apiUrl + '/connect/github', - 'github_connect_window', - 'height=570, width=520'); - }, - - disconnect() { - window.open(apiUrl + '/disconnect/github', - 'github_disconnect_window', - 'height=570, width=520'); - } - } -}); -</script> - -<style lang="stylus" scoped> -.mk-github-setting - .account - border solid 1px #e1e8ed - border-radius 4px - padding 16px - - a - font-weight bold - color inherit - - .id - color #8899a6 -</style> |