1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-21 05:15:35 +02:00
This commit is contained in:
syuilo
2018-03-07 11:40:40 +09:00
parent 06eabcbc63
commit 6c495268ae
15 changed files with 230 additions and 95 deletions

View File

@@ -0,0 +1,29 @@
<template>
<div>
<header>:{{ game.black_user.name }} :{{ game.white_user.name }}</header>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
props: ['game'],
data() {
return {
game: null,
connection: null,
connectionId: null
};
},
mounted() {
this.connection = (this as any).os.streams.othelloGameStream.getConnection();
this.connectionId = (this as any).os.streams.othelloGameStream.use();
this.connection.on('set', this.onSet);
},
beforeDestroy() {
this.connection.off('set', this.onSet);
(this as any).streams.othelloGameStream.dispose(this.connectionId);
},
});
</script>