wip
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
this.user = this.opts.user;
|
||||
|
||||
this.on('mount', () => {
|
||||
this.api('aggregation/users/activity', {
|
||||
this.$root.$data.os.api('aggregation/users/activity', {
|
||||
user_id: this.user.id
|
||||
}).then(data => {
|
||||
data.forEach(d => d.total = d.posts + d.replies + d.reposts);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
this.fetching = true;
|
||||
|
||||
this.on('mount', () => {
|
||||
this.api('i/authorized_apps').then(apps => {
|
||||
this.$root.$data.os.api('i/authorized_apps').then(apps => {
|
||||
this.apps = apps;
|
||||
this.fetching = false;
|
||||
this.update();
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
this.fetching = true;
|
||||
|
||||
this.on('mount', () => {
|
||||
this.api('i/signin_history').then(history => {
|
||||
this.$root.$data.os.api('i/signin_history').then(history => {
|
||||
this.update({
|
||||
fetching: false,
|
||||
history: history
|
||||
|
||||
@@ -30,15 +30,15 @@
|
||||
this.form = null;
|
||||
|
||||
this.on('mount', () => {
|
||||
this.I.on('updated', this.onMeUpdated);
|
||||
this.$root.$data.os.i.on('updated', this.onMeUpdated);
|
||||
});
|
||||
|
||||
this.on('unmount', () => {
|
||||
this.I.off('updated', this.onMeUpdated);
|
||||
this.$root.$data.os.i.off('updated', this.onMeUpdated);
|
||||
});
|
||||
|
||||
this.onMeUpdated = () => {
|
||||
if (this.I.twitter) {
|
||||
if (this.$root.$data.os.i.twitter) {
|
||||
if (this.form) this.form.close();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
},
|
||||
vote(id) {
|
||||
if (this.poll.choices.some(c => c.is_voted)) return;
|
||||
this.api('posts/polls/vote', {
|
||||
this.$root.$data.os.api('posts/polls/vote', {
|
||||
post_id: this.post.id,
|
||||
choice: id
|
||||
}).then(() => {
|
||||
|
||||
Reference in New Issue
Block a user