From aba95d4fe81f3cc439b770ae5efb3e0743fb9984 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Tue, 28 Dec 2021 21:54:43 +0000 Subject: [PATCH] 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 --- apps/cory/index.json | 2 +- apps/cory/index/tf-user.js | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/cory/index.json b/apps/cory/index.json index eeed346a..cd58d475 100644 --- a/apps/cory/index.json +++ b/apps/cory/index.json @@ -1 +1 @@ -{"type":"tildefriends-app","files":{"app.js":"&CuC9hpnUkbbSAgR4E30aVNWMXySrbHDhoIXI/pxU1g8=.sha256","index.html":"&mv6A+VsR0hIDWLtczTB1SlexmT1FTpU/IjfL46Je6Y4=.sha256","vue-material.js":"&K5cdLqXYCENPak/TCINHQhyJhpS4G9DlZHGwoh/LF2g=.sha256","tf-user.js":"&xkxw1x8obGvv2Tly3M8xDGCIiI/EYMgjZWWji2wUUe4=.sha256","tf-message.js":"&VNC8ptzGXWAVl9LBBZfrk3YmweA8PQ02d7/wZxWXoAA=.sha256","tf.js":"&swCMB9K4dkPCPC2tYS5aTUZSGUmaezlW6FNeLM9QNXI=.sha256","commonmark.min.js":"&5x6ek3tFrKTZX6hXNNyFsjmhvrjmWpUkwuuaiyVV1Us=.sha256","vue.js":"&g1wvA+yHl1sVC+eufTsg9If7ZeVyMTBU+h0tks7ZNzE=.sha256","vue-material-theme-default-dark.css":"&RP2nr+2CR18BpHHw5ST9a5GJUCOG9n0G2kuGkcQioWE=.sha256","vue-material.min.css":"&kGbUM2QgFSyHZRzqQb0b+0S3EVIlZ0AXpdiAVjIhou8=.sha256","roboto.css":"&jJv43Om673mQO5JK0jj7714s5E+5Yrf82H6LcDx7wUs=.sha256","material-icons.css":"&a28PdcVvgq/DxyIvJAx/e+ZOEtOuHnr3kjLWKyzH11M=.sha256"}} \ No newline at end of file +{"type":"tildefriends-app","files":{"app.js":"&CuC9hpnUkbbSAgR4E30aVNWMXySrbHDhoIXI/pxU1g8=.sha256","index.html":"&mv6A+VsR0hIDWLtczTB1SlexmT1FTpU/IjfL46Je6Y4=.sha256","vue-material.js":"&K5cdLqXYCENPak/TCINHQhyJhpS4G9DlZHGwoh/LF2g=.sha256","tf-user.js":"&t/QhZVt/e3LN3HgSoqe8C81pjq4ZS6uiWcqGOB4NX4Q=.sha256","tf-message.js":"&VNC8ptzGXWAVl9LBBZfrk3YmweA8PQ02d7/wZxWXoAA=.sha256","tf.js":"&swCMB9K4dkPCPC2tYS5aTUZSGUmaezlW6FNeLM9QNXI=.sha256","commonmark.min.js":"&5x6ek3tFrKTZX6hXNNyFsjmhvrjmWpUkwuuaiyVV1Us=.sha256","vue.js":"&g1wvA+yHl1sVC+eufTsg9If7ZeVyMTBU+h0tks7ZNzE=.sha256","vue-material-theme-default-dark.css":"&RP2nr+2CR18BpHHw5ST9a5GJUCOG9n0G2kuGkcQioWE=.sha256","vue-material.min.css":"&kGbUM2QgFSyHZRzqQb0b+0S3EVIlZ0AXpdiAVjIhou8=.sha256","roboto.css":"&jJv43Om673mQO5JK0jj7714s5E+5Yrf82H6LcDx7wUs=.sha256","material-icons.css":"&a28PdcVvgq/DxyIvJAx/e+ZOEtOuHnr3kjLWKyzH11M=.sha256"}} \ No newline at end of file diff --git a/apps/cory/index/tf-user.js b/apps/cory/index/tf-user.js index a34b8577..c5819d9d 100644 --- a/apps/cory/index/tf-user.js +++ b/apps/cory/index/tf-user.js @@ -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: ` + template: ` {{users[id] && users[id].name ? users[id].name : id}} {{id}}