forked from cory/tildefriends
Progress toward viewing user profile pages.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3737 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@@ -15,6 +15,7 @@ var g_data = {
|
||||
reply_branch: null,
|
||||
mentions: {},
|
||||
unread: 0,
|
||||
loading: true,
|
||||
};
|
||||
|
||||
var g_data_initial = JSON.parse(JSON.stringify(g_data));
|
||||
@@ -94,11 +95,16 @@ function processMessages() {
|
||||
g_data.votes[link][content.vote.expression].push({author: vote.author, value: content.vote.value});
|
||||
});
|
||||
} else if (key == 'clear') {
|
||||
g_data.loading = true;
|
||||
Object.keys(g_data_initial).forEach(function(key) {
|
||||
Vue.set(g_data, key, JSON.parse(JSON.stringify(g_data_initial[key])));
|
||||
});
|
||||
} else if (key == 'ready') {
|
||||
g_data.loading = false;
|
||||
} else if (key == 'unread') {
|
||||
g_data.unread += event.data.unread;
|
||||
} else if (key == 'hash') {
|
||||
console.log(event.data);
|
||||
} else {
|
||||
g_data[key] = event.data[key];
|
||||
}
|
||||
@@ -114,6 +120,7 @@ window.addEventListener('message', function(event) {
|
||||
setTimeout(processMessages, 250);
|
||||
}
|
||||
});
|
||||
|
||||
window.addEventListener('load', function() {
|
||||
Vue.use(VueMaterial.default);
|
||||
var vue = new Vue({
|
||||
|
Reference in New Issue
Block a user