diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-11-29 16:23:45 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-11-29 16:23:45 +0900 |
| commit | 1bc109b42c43dfa0dcad4b1331896ab5b2023892 (patch) | |
| tree | 2185b3408754f78ad03b991e3c78415c6dee111b /src/client/app/common | |
| parent | 10.58.2 (diff) | |
| download | misskey-1bc109b42c43dfa0dcad4b1331896ab5b2023892.tar.gz misskey-1bc109b42c43dfa0dcad4b1331896ab5b2023892.tar.bz2 misskey-1bc109b42c43dfa0dcad4b1331896ab5b2023892.zip | |
Implement email config
Diffstat (limited to 'src/client/app/common')
| -rw-r--r-- | src/client/app/common/views/components/profile-editor.vue | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/client/app/common/views/components/profile-editor.vue b/src/client/app/common/views/components/profile-editor.vue index c3118126d2..fc0fbb9e65 100644 --- a/src/client/app/common/views/components/profile-editor.vue +++ b/src/client/app/common/views/components/profile-editor.vue @@ -66,6 +66,19 @@ <ui-switch v-model="carefulBot" @change="save(false)">{{ $t('careful-bot') }}</ui-switch> </div> </section> + + <section> + <header>{{ $t('email') }}</header> + + <div> + <template v-if="$store.state.i.email != null"> + <ui-info v-if="$store.state.i.emailVerified">{{ $t('email-verified') }}</ui-info> + <ui-info v-else warn>{{ $t('email-not-verified') }}</ui-info> + </template> + <ui-input v-model="email" type="email"><span>{{ $t('email-address') }}</span></ui-input> + <ui-button @click="updateEmail()">{{ $t('save') }}</ui-button> + </div> + </section> </ui-card> </template> @@ -77,9 +90,11 @@ import { toUnicode } from 'punycode'; export default Vue.extend({ i18n: i18n('common/views/components/profile-editor.vue'), + data() { return { host: toUnicode(host), + email: null, name: null, username: null, location: null, @@ -113,7 +128,8 @@ export default Vue.extend({ }, created() { - this.name = this.$store.state.i.name || ''; + this.email = this.$store.state.i.email; + this.name = this.$store.state.i.name; this.username = this.$store.state.i.username; this.location = this.$store.state.i.profile.location; this.description = this.$store.state.i.description; @@ -199,6 +215,12 @@ export default Vue.extend({ }); } }); + }, + + updateEmail() { + this.$root.api('i/update_email', { + email: this.email == '' ? null : this.email + }); } } }); |