From 7779e04fc59f44ab139896c4d5efc31d93f9905b Mon Sep 17 00:00:00 2001 From: syuilo <syuilotan@yahoo.co.jp> Date: Tue, 20 Feb 2018 23:22:19 +0900 Subject: [PATCH] wip --- ...rofile-setting.vue => settings.profile.vue} | 18 ++++++++++++------ .../app/desktop/views/components/settings.vue | 6 +++--- 2 files changed, 15 insertions(+), 9 deletions(-) rename src/web/app/desktop/views/components/{profile-setting.vue => settings.profile.vue} (84%) diff --git a/src/web/app/desktop/views/components/profile-setting.vue b/src/web/app/desktop/views/components/settings.profile.vue similarity index 84% rename from src/web/app/desktop/views/components/profile-setting.vue rename to src/web/app/desktop/views/components/settings.profile.vue index b61de33ef..c8834ca25 100644 --- a/src/web/app/desktop/views/components/profile-setting.vue +++ b/src/web/app/desktop/views/components/settings.profile.vue @@ -1,5 +1,5 @@ <template> -<div class="mk-profile-setting"> +<div class="profile"> <label class="avatar ui from group"> <p>%i18n:desktop.tags.mk-profile-setting.avatar%</p> <img class="avatar" :src="`${os.i.avatar_url}?thumbnail&size=64`" alt="avatar"/> @@ -32,12 +32,18 @@ import notify from '../../scripts/notify'; export default Vue.extend({ data() { return { - name: (this as any).os.i.name, - location: (this as any).os.i.location, - description: (this as any).os.i.description, - birthday: (this as any).os.i.birthday, + name: null, + location: null, + description: null, + birthday: null, }; }, + created() { + this.name = (this as any).os.i.name; + this.location = (this as any).os.i.profile.location; + this.description = (this as any).os.i.description; + this.birthday = (this as any).os.i.profile.birthday; + }, methods: { updateAvatar() { (this as any).apis.chooseDriveFile({ @@ -61,7 +67,7 @@ export default Vue.extend({ </script> <style lang="stylus" scoped> -.mk-profile-setting +.profile > .avatar > img display inline-block diff --git a/src/web/app/desktop/views/components/settings.vue b/src/web/app/desktop/views/components/settings.vue index e9a9bbfa8..681e373ed 100644 --- a/src/web/app/desktop/views/components/settings.vue +++ b/src/web/app/desktop/views/components/settings.vue @@ -15,7 +15,7 @@ <div class="pages"> <section class="profile" v-show="page == 'profile'"> <h1>%i18n:desktop.tags.mk-settings.profile%</h1> - <mk-profile-setting/> + <x-profile/> </section> <section class="web" v-show="page == 'web'"> @@ -73,11 +73,11 @@ <script lang="ts"> import Vue from 'vue'; -import MkProfileSetting from './profile-setting.vue'; +import XProfile from './settings.profile.vue'; export default Vue.extend({ components: { - 'mk-profie-setting': MkProfileSetting + 'x-profile': XProfile }, data() { return {