wip
This commit is contained in:
parent
61b95e0c26
commit
99b3499364
103 changed files with 878 additions and 790 deletions
|
|
@ -23,7 +23,7 @@ export default Vue.extend({
|
|||
mounted() {
|
||||
Progress.start();
|
||||
|
||||
this.$root.$data.os.api('users/show', {
|
||||
(this as any).api('users/show', {
|
||||
username: this.username
|
||||
}).then(user => {
|
||||
this.fetching = false;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export default Vue.extend({
|
|||
mounted() {
|
||||
Progress.start();
|
||||
|
||||
this.$root.$data.os.api('users/show', {
|
||||
(this as any).api('users/show', {
|
||||
username: this.username
|
||||
}).then(user => {
|
||||
this.fetching = false;
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ export default Vue.extend({
|
|||
document.title = 'Misskey';
|
||||
document.documentElement.style.background = '#313a42';
|
||||
|
||||
this.connection = this.$root.$data.os.stream.getConnection();
|
||||
this.connectionId = this.$root.$data.os.stream.use();
|
||||
this.connection = (this as any).os.stream.getConnection();
|
||||
this.connectionId = (this as any).os.stream.use();
|
||||
|
||||
this.connection.on('post', this.onStreamPost);
|
||||
document.addEventListener('visibilitychange', this.onVisibilitychange, false);
|
||||
|
|
@ -33,7 +33,7 @@ export default Vue.extend({
|
|||
},
|
||||
beforeDestroy() {
|
||||
this.connection.off('post', this.onStreamPost);
|
||||
this.$root.$data.os.stream.dispose(this.connectionId);
|
||||
(this as any).os.stream.dispose(this.connectionId);
|
||||
document.removeEventListener('visibilitychange', this.onVisibilitychange);
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -44,7 +44,7 @@ export default Vue.extend({
|
|||
Progress.done();
|
||||
},
|
||||
onStreamPost(post) {
|
||||
if (document.hidden && post.user_id !== this.$root.$data.os.i.id) {
|
||||
if (document.hidden && post.user_id !== (this as any).os.i.id) {
|
||||
this.unreadCount++;
|
||||
document.title = `(${this.unreadCount}) ${getPostSummary(post)}`;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export default Vue.extend({
|
|||
const ok = window.confirm('%i18n:mobile.tags.mk-notifications-page.read-all%');
|
||||
if (!ok) return;
|
||||
|
||||
this.$root.$data.os.api('notifications/mark_as_read_all');
|
||||
(this as any).api('notifications/mark_as_read_all');
|
||||
},
|
||||
onFetched() {
|
||||
Progress.done();
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export default Vue.extend({
|
|||
|
||||
Progress.start();
|
||||
|
||||
this.$root.$data.os.api('posts/show', {
|
||||
(this as any).api('posts/show', {
|
||||
post_id: this.postId
|
||||
}).then(post => {
|
||||
this.fetching = false;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export default Vue.extend({
|
|||
|
||||
Progress.start();
|
||||
|
||||
this.$root.$data.os.api('posts/search', Object.assign({}, parse(this.query), {
|
||||
(this as any).api('posts/search', Object.assign({}, parse(this.query), {
|
||||
limit: limit
|
||||
})).then(posts => {
|
||||
this.posts = posts;
|
||||
|
|
@ -46,7 +46,7 @@ export default Vue.extend({
|
|||
methods: {
|
||||
more() {
|
||||
this.offset += limit;
|
||||
return this.$root.$data.os.api('posts/search', Object.assign({}, parse(this.query), {
|
||||
return (this as any).api('posts/search', Object.assign({}, parse(this.query), {
|
||||
limit: limit,
|
||||
offset: this.offset
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<a class="avatar">
|
||||
<img :src="`${user.avatar_url}?thumbnail&size=200`" alt="avatar"/>
|
||||
</a>
|
||||
<mk-follow-button v-if="$root.$data.os.isSignedIn && $root.$data.os.i.id != user.id" :user="user"/>
|
||||
<mk-follow-button v-if="os.isSignedIn && os.i.id != user.id" :user="user"/>
|
||||
</div>
|
||||
<div class="title">
|
||||
<h1>{{ user.name }}</h1>
|
||||
|
|
@ -85,7 +85,7 @@ export default Vue.extend({
|
|||
document.documentElement.style.background = '#313a42';
|
||||
Progress.start();
|
||||
|
||||
this.$root.$data.os.api('users/show', {
|
||||
(this as any).api('users/show', {
|
||||
username: this.username
|
||||
}).then(user => {
|
||||
this.fetching = false;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export default Vue.extend({
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$root.$data.os.api('users/followers', {
|
||||
(this as any).api('users/followers', {
|
||||
user_id: this.user.id,
|
||||
iknow: true,
|
||||
limit: 30
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ export default Vue.extend({
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$root.$data.os.api('aggregation/users/activity', {
|
||||
(this as any).api('aggregation/users/activity', {
|
||||
user_id: this.user.id,
|
||||
limit: 30
|
||||
}).then(data => {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export default Vue.extend({
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$root.$data.os.api('users/get_frequently_replied_users', {
|
||||
(this as any).api('users/get_frequently_replied_users', {
|
||||
user_id: this.user.id
|
||||
}).then(res => {
|
||||
this.fetching = false;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export default Vue.extend({
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$root.$data.os.api('users/posts', {
|
||||
(this as any).api('users/posts', {
|
||||
user_id: this.user.id,
|
||||
with_media: true,
|
||||
limit: 6
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export default Vue.extend({
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
this.$root.$data.os.api('users/posts', {
|
||||
(this as any).api('users/posts', {
|
||||
user_id: this.user.id
|
||||
}).then(posts => {
|
||||
this.fetching = false;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
<mk-user-home-frequently-replied-users :user="user"/>
|
||||
</div>
|
||||
</section>
|
||||
<section class="followers-you-know" v-if="$root.$data.os.isSignedIn && $root.$data.os.i.id !== user.id">
|
||||
<section class="followers-you-know" v-if="os.isSignedIn && os.i.id !== user.id">
|
||||
<h2>%fa:users%%i18n:mobile.tags.mk-user-overview.followers-you-know%</h2>
|
||||
<div>
|
||||
<mk-user-home-followers-you-know :user="user"/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue