import VueSelect from 'vue-select'; export const IssueLabel = { template: ` {{ name }} `, data() { return { labels: window.labels } }, props: { name: { type: String, required: true } }, computed: { /** * Get the name of the class to apply to the label based on the group to * which it belongs. Falls back to miscellaneous if the label does not * belong to a group or a class cannot be identified. * * @returns {string} the name of the class to apply to the label */ className() { return window.categories[this.name] || 'miscellaneous' } } } export const IssueCard = { template: `
`, components: { IssueLabel }, props: { issue: { type: Object, required: true }, }, computed: { dateCreated() { const dateCreated = new Date(this.issue.createdAt*1000) return dateCreated.toLocaleDateString() } } } export const App = { el: '#vue-app', template: `No results.