2018-12-06 10:23:38 +01:00
|
|
|
Vue.component('MsgCard', {
|
|
|
|
template: `<div class="om-card card">
|
|
|
|
<h6 class="msg-head">
|
|
|
|
<b>{{ msg.subject }}</b>
|
|
|
|
<img src="favicon.ico" width=20px height=20px>
|
|
|
|
</h6>
|
2019-07-21 14:39:33 +02:00
|
|
|
{{ msg.message }}<br>
|
2019-07-19 12:52:43 +02:00
|
|
|
<a v-for="tag in msg.tag" @click="filterForTag(tag)">#{{ tag }} </a>
|
2019-07-21 14:39:33 +02:00
|
|
|
<br>
|
2019-07-02 13:08:11 +02:00
|
|
|
</p>
|
2018-12-18 09:20:13 +01:00
|
|
|
<div class="om-card-footer"> <div class="om-user-line">
|
2018-12-06 10:23:38 +01:00
|
|
|
<i class="material-icons">account_circle</i>
|
2018-12-18 09:20:13 +01:00
|
|
|
Erstellt von {{ msg.user }}</div>
|
2019-07-02 14:59:11 +02:00
|
|
|
<i class="material-icons" @click="myFilter()" v-if="!isActive">bookmark_border</i>
|
|
|
|
<i class="material-icons" @click="myFilter()" v-else="isActive">bookmark</i>
|
2018-12-06 10:23:38 +01:00
|
|
|
</div></div>`,
|
2019-06-04 16:42:45 +02:00
|
|
|
props: ['msg'],
|
2019-07-02 14:59:11 +02:00
|
|
|
|
2019-06-04 16:42:45 +02:00
|
|
|
data: function () {
|
|
|
|
return {
|
2019-07-02 14:59:11 +02:00
|
|
|
isActive: false,
|
2019-06-04 16:42:45 +02:00
|
|
|
};
|
|
|
|
},
|
2019-07-02 14:59:11 +02:00
|
|
|
|
2019-06-04 16:42:45 +02:00
|
|
|
methods: {
|
2019-07-09 12:37:21 +02:00
|
|
|
myFilter: function() {
|
2019-07-02 14:59:11 +02:00
|
|
|
this.isActive = !this.isActive;
|
2019-06-04 16:42:45 +02:00
|
|
|
},
|
2019-07-19 12:52:43 +02:00
|
|
|
filterForTag: function(tag) {
|
|
|
|
console.log("link: " +tag);
|
|
|
|
searching(tag);
|
|
|
|
},
|
2019-07-02 14:59:11 +02:00
|
|
|
}
|
2018-12-06 10:23:38 +01:00
|
|
|
});
|