41 lines
874 B
Vue
41 lines
874 B
Vue
<template>
|
|
|
|
<div class='container'>
|
|
|
|
<div class='header'>
|
|
<div class='title'>{{ gs.room.get('text') ? gs.room.get('text').name : '?' }}</div>
|
|
</div>
|
|
|
|
<div class='body'>
|
|
|
|
<section class='message-stack'>
|
|
|
|
<div class='message' v-for='m in gs.content.messages'>
|
|
<div class='icon'></div>
|
|
<span class='meta'>
|
|
<span class='author'>{{ gs.content.user(m.uid).name || 'inconnu' }}</span>
|
|
<span class='date' >{{ new Date(m.ts*1000).toLocaleString('fr') || 'inconnu' }}</span>
|
|
</span>
|
|
<span class='text'>{{ m.msg }}</span>
|
|
</div>
|
|
|
|
</section>
|
|
|
|
<section class='message-input'>
|
|
<textarea :placeholder='`Message #${gs.room.get("text").name}`' @keydown='gs.content.auto_grow'></textarea>
|
|
</section>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template><script>
|
|
export default {
|
|
|
|
name: 'channel-',
|
|
|
|
data(){ return { gs: gs.get }; }
|
|
|
|
}
|
|
|
|
</script> |