refs #2606 Use vue-fontawesome in Contents

This commit is contained in:
AkiraFukushima 2022-04-04 22:14:54 +09:00
parent 1aa0ecfc24
commit ab9cba8165
No known key found for this signature in database
GPG Key ID: B6E51BAC4DE1A957
4 changed files with 28 additions and 24 deletions

View File

@ -15,7 +15,7 @@
<div id="resizer">
<div class="border"></div>
<div class="knob" @mousedown="dragStart">
<icon name="ellipsis-v" class="icon"></icon>
<font-awesome-icon icon="ellipsis-vertical" class="icon" />
</div>
</div>
<side-bar id="side_bar" :overlaid="modalOpened"></side-bar>

View File

@ -5,7 +5,7 @@
<div class="form-wrapper">
<div class="form-item" v-show="tagPage()">
<el-button type="text" @click="back">
<icon name="chevron-left"></icon>
<font-awesome-icon icon="chevron-left" />
</el-button>
</div>
<div class="form-item input">
@ -20,7 +20,7 @@
</div>
<div class="form-item" v-show="tagPage()">
<el-button type="text" @click="save" :title="$t('hashtag.save_tag')">
<icon name="thumbtack"></icon>
<font-awesome-icon icon="thumbtack" />
</el-button>
</div>
</div>

View File

@ -1,20 +1,20 @@
<template>
<div id="list">
<table class="tag-list">
<tbody>
<tr v-for="tag in tags" v-bind:key="tag._id" @click.stop.prevent="openTimeline(tag.tagName)">
<td>
{{ tag.tagName }}
</td>
<td class="action">
<el-button type="text" @click.stop="deleteTag(tag)" :title="$t('hashtag.delete_tag')">
<icon name="regular/trash-alt"></icon>
</el-button>
</td>
</tr>
</tbody>
</table>
</div>
<div id="list">
<table class="tag-list">
<tbody>
<tr v-for="tag in tags" v-bind:key="tag._id" @click.stop.prevent="openTimeline(tag.tagName)">
<td>
{{ tag.tagName }}
</td>
<td class="action">
<el-button type="text" @click.stop="deleteTag(tag)" :title="$t('hashtag.delete_tag')">
<font-awesome-icon :icon="['far', 'trash-can']" />
</el-button>
</td>
</tr>
</tbody>
</table>
</div>
</template>
<script>
@ -27,14 +27,14 @@ export default {
tags: state => state.TimelineSpace.Contents.Hashtag.List.tags
})
},
created () {
created() {
this.$store.dispatch('TimelineSpace/Contents/Hashtag/List/listTags')
},
methods: {
openTimeline (tagName) {
openTimeline(tagName) {
this.$router.push({ path: `/${this.$route.params.id}/hashtag/${tagName}` })
},
deleteTag (tag) {
deleteTag(tag) {
this.$store.dispatch('TimelineSpace/Contents/Hashtag/List/removeTag', tag)
}
}

View File

@ -43,7 +43,9 @@ import {
faHourglass,
faCheck,
faQuoteRight,
faThumbTack
faThumbTack,
faChevronLeft,
faEllipsisVertical
} from '@fortawesome/free-solid-svg-icons'
import {
faFaceSmile as farFaceSmile,
@ -118,7 +120,9 @@ library.add(
faThumbTack,
farEdit,
farTrashCan,
farBell
farBell,
faChevronLeft,
faEllipsisVertical
)
Vue.use(ElementUI, { locale })