export const Name = { props: ["of"], methods: { name(objects) { const nameObjects = objects .filter(o=> 'name' in o && 'of' in o && 'timestamp' in o && typeof o.name == 'string' && o.of == this.of && o._by == this.of && typeof o.timestamp == 'number') .sortBy('-timestamp') return nameObjects.length? nameObjects[0].name : 'anonymous' } }, template: ` {{ name(objects) }} ` } export const SetMyName = { props: ["tags"], data: ()=> ({ name: '' }), methods: { setMyName() { this.$graffitiUpdate({ name: this.name, timestamp: Date.now(), of: this.$graffitiMyID, _tags: this.tags }) this.name = '' } }, template: `

` }