import { Name } from './name.js' export default { components: { Name }, props: ['tags', 'objects'], data: ()=> ({ message: '' }), computed: { messages() { return this.objects .filter(o=> 'message' in o && 'timestamp' in o && typeof o.message == 'string' && typeof o.timestamp == 'number') .sortBy('timestamp') } }, methods: { sendMessage() { if (!this.message) return this.$graffitiUpdate({ message: this.message, timestamp: Date.now(), _tags: this.tags }) this.message = '' } }, template: `
` }