This commit is contained in:
こぴなたみぽ
2018-02-15 17:24:52 +09:00
parent 0766a76348
commit 9fd00d1179
51 changed files with 93 additions and 93 deletions

View File

@ -76,7 +76,7 @@
let fetched = false;
// チャンネル概要読み込み
this.api('channels/show', {
this.$root.$data.os.api('channels/show', {
channel_id: this.id
}).then(channel => {
if (fetched) {
@ -95,7 +95,7 @@
});
// 投稿読み込み
this.api('channels/posts', {
this.$root.$data.os.api('channels/posts', {
channel_id: this.id
}).then(posts => {
if (fetched) {
@ -125,7 +125,7 @@
this.posts.unshift(post);
this.update();
if (document.hidden && this.SIGNIN && post.user_id !== this.I.id) {
if (document.hidden && this.SIGNIN && post.user_id !== this.$root.$data.os.i.id) {
this.unreadCount++;
document.title = `(${this.unreadCount}) ${this.channel.title} | Misskey`;
}
@ -139,7 +139,7 @@
};
this.watch = () => {
this.api('channels/watch', {
this.$root.$data.os.api('channels/watch', {
channel_id: this.id
}).then(() => {
this.channel.is_watching = true;
@ -150,7 +150,7 @@
};
this.unwatch = () => {
this.api('channels/unwatch', {
this.$root.$data.os.api('channels/unwatch', {
channel_id: this.id
}).then(() => {
this.channel.is_watching = false;
@ -323,7 +323,7 @@
? this.files.map(f => f.id)
: undefined;
this.api('posts/create', {
this.$root.$data.os.api('posts/create', {
text: this.$refs.text.value == '' ? undefined : this.$refs.text.value,
media_ids: files,
reply_id: this.reply ? this.reply.id : undefined,

View File

@ -15,7 +15,7 @@
this.mixin('api');
this.on('mount', () => {
this.api('channels', {
this.$root.$data.os.api('channels', {
limit: 100
}).then(channels => {
this.update({
@ -27,7 +27,7 @@
this.n = () => {
const title = window.prompt('%i18n:ch.tags.mk-index.channel-title%');
this.api('channels/create', {
this.$root.$data.os.api('channels/create', {
title: title
}).then(channel => {
location.href = '/' + channel.id;