frontend: v-icon component

This commit is contained in:
nkanaev
2026-06-27 21:56:49 +01:00
parent 0e527e147c
commit 2ab2a7c567
3 changed files with 252 additions and 114 deletions

View File

@@ -2,6 +2,7 @@ import Vue from 'vue/dist/vue.esm.js'
import i18n from './i18n'
import api from './api'
import template from './templates/index.html' with {type: 'text'}
import icons from './icons'
var app = window.app
@@ -207,6 +208,14 @@ Vue.component('relative-time', {
},
})
Vue.component('v-icon', {
props: ['name'],
template: '<span class="icon" v-html="content"></span>',
computed: {
content: function () { return icons[this.name] || '' }
}
})
Vue.use(i18n)
var vm = new Vue({