forked from cory/tildefriends
Just messing around with things. Not sure I've made anything better.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3722 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
0cab3e7ed9
commit
fafc524c8c
@ -1 +1 @@
|
||||
{"type":"tildefriends-app","files":{"app.js":"&bKoyBQBiMZinCQUoQIqGpeehKgqkANw8Ns2OYECYW30=.sha256","index.html":"&zwiRwroNQ1SnCsq97zB8dRiGwY4H+ii4ZtuKR385zdI=.sha256","vue-material.js":"&K5cdLqXYCENPak/TCINHQhyJhpS4G9DlZHGwoh/LF2g=.sha256","tf-user.js":"&taC9THJslxAMy72UIplFjALJx1VHv2l+qfjWoRhhrS4=.sha256","tf-message.js":"&KjVh7zASx0TZtZTsS6lJ7T70K9tyXcf+ink4vK7gSWI=.sha256","tf.js":"&u6n7Eqa1ryFuL9AhlYeJ/WzXYh6zxECKVfhG8/ecRM8=.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"}}
|
||||
{"type":"tildefriends-app","files":{"app.js":"&bbZBdFOrGh6o0X+ypAaRhfAls89Ir/IICcUN3xlO02w=.sha256","index.html":"&zwiRwroNQ1SnCsq97zB8dRiGwY4H+ii4ZtuKR385zdI=.sha256","vue-material.js":"&K5cdLqXYCENPak/TCINHQhyJhpS4G9DlZHGwoh/LF2g=.sha256","tf-user.js":"&KmUw2D8yehJU95RQ+8DWP69w/5wK7yWR6fUc5/LIpio=.sha256","tf-message.js":"&KjVh7zASx0TZtZTsS6lJ7T70K9tyXcf+ink4vK7gSWI=.sha256","tf.js":"&u6n7Eqa1ryFuL9AhlYeJ/WzXYh6zxECKVfhG8/ecRM8=.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"}}
|
@ -273,6 +273,7 @@ async function refresh() {
|
||||
app.postMessage({connections: await ssb.connections()}),
|
||||
app.postMessage({apps: await core.apps()}),
|
||||
followingDeep(db, [whoami], 2).then(function(f) {
|
||||
return Promise.all([
|
||||
getRecentPostIds(db, whoami, [].concat([whoami], f), k_posts_max).then(async function(ids) {
|
||||
return getPosts(db, ids);
|
||||
}).then(async function(posts) {
|
||||
@ -289,7 +290,7 @@ async function refresh() {
|
||||
return [].concat(posts, await getPosts(db, roots));
|
||||
}).then(function(posts) {
|
||||
return Promise.all(posts.map(x => app.postMessage({message: x})));
|
||||
});
|
||||
}),
|
||||
Promise.all(f.map(function(id) {
|
||||
return Promise.all([
|
||||
getVotes(db, id).then(function(votes) {
|
||||
@ -299,7 +300,8 @@ async function refresh() {
|
||||
return app.postMessage({user: {user: id, about: user}});
|
||||
}),
|
||||
]);
|
||||
}));
|
||||
})),
|
||||
]);
|
||||
}),
|
||||
sendUser(db, whoami),
|
||||
]);
|
||||
|
@ -78,16 +78,24 @@ Vue.component('tf-user', {
|
||||
<div v-if="users[id].name">{{id}}</div>
|
||||
<div>{{users[id].description}}</div>
|
||||
<div><md-switch v-model="following">Following</md-switch></div>
|
||||
<div class="md-layout">
|
||||
<div class="md-layout-item">
|
||||
<md-list>
|
||||
<md-subheader>Followers</md-subheader>
|
||||
<md-list-item v-for="follower in Object.keys((users[id] && users[id].followers) ? users[id].followers : {})" v-bind:key="'follower-' + follower">
|
||||
<tf-user :id="follower"></tf-user>
|
||||
</md-list-item>
|
||||
</md-list>
|
||||
</div>
|
||||
<div class="md-layout-item">
|
||||
<md-list>
|
||||
<md-subheader>Following</md-subheader>
|
||||
<md-list-item v-for="user in Object.keys((users[id] && users[id].following) ? users[id].following : {})" v-bind:key="'following-' + user">
|
||||
<tf-user :id="user"></tf-user>
|
||||
</md-list-item>
|
||||
</md-list>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</md-dialog-content>
|
||||
<md-dialog-actions>
|
||||
|
Loading…
Reference in New Issue
Block a user