Merge branch 'develop' into vue3

This commit is contained in:
syuilo
2020-08-19 22:15:04 +09:00
119 changed files with 3454 additions and 640 deletions

View File

@@ -24,6 +24,10 @@ export default defineComponent({
type: String,
required: false
},
channel: {
type: String,
required: false
},
sound: {
type: Boolean,
required: false,
@@ -31,6 +35,12 @@ export default defineComponent({
}
},
provide() {
return {
inChannel: this.src === 'channel'
};
},
data() {
return {
connection: null,
@@ -112,6 +122,15 @@ export default defineComponent({
this.connection.on('note', prepend);
this.connection.on('userAdded', onUserAdded);
this.connection.on('userRemoved', onUserRemoved);
} else if (this.src == 'channel') {
endpoint = 'channels/timeline';
this.query = {
channelId: this.channel
};
this.connection = this.$root.stream.connectToChannel('channel', {
channelId: this.channel
});
this.connection.on('note', prepend);
}
this.pagination = {