forked from cory/tildefriends
Initialize these form fields in the about dialog.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3716 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
Vue.component('tf-user', {
|
||||
data: function() { return {
|
||||
users: g_data.users,
|
||||
show_user_dialog: false,
|
||||
show_follow_dialog: false,
|
||||
edit_profile_name: null,
|
||||
@ -29,6 +28,7 @@ Vue.component('tf-user', {
|
||||
},
|
||||
},
|
||||
whoami: { get: function() { return g_data.whoami; } },
|
||||
users: { get: function() { return g_data.users; } },
|
||||
},
|
||||
methods: {
|
||||
save_profile: function() {
|
||||
@ -40,8 +40,15 @@ Vue.component('tf-user', {
|
||||
}};
|
||||
window.parent.postMessage(message, '*');
|
||||
},
|
||||
show_user: function() {
|
||||
this.show_user_dialog = true;
|
||||
if (this.id == this.whoami) {
|
||||
this.edit_profile_name = this.users[this.id].name;
|
||||
this.edit_profile_description = this.users[this.id].description;
|
||||
}
|
||||
},
|
||||
},
|
||||
template: `<span @click="show_user_dialog = true">
|
||||
template: `<span @click="show_user()">
|
||||
{{users[id] && users[id].name ? users[id].name : id}}
|
||||
<md-tooltip v-if="users[id] && users[id].name">{{id}}</md-tooltip>
|
||||
<md-dialog :md-active.sync="show_user_dialog">
|
||||
|
Reference in New Issue
Block a user