refs #2606 Use vue-fontawesome in Modals/AddListMember

This commit is contained in:
AkiraFukushima 2022-03-22 21:27:45 +09:00
parent 12036d1ab8
commit e785ed2b7e
No known key found for this signature in database
GPG Key ID: B6E51BAC4DE1A957
2 changed files with 17 additions and 20 deletions

View File

@ -1,14 +1,10 @@
<template>
<el-dialog
:title="$t('modals.add_list_member.title')"
:visible.sync="addListMemberModal"
width="400px"
class="add-member">
<el-dialog :title="$t('modals.add_list_member.title')" :visible.sync="addListMemberModal" width="400px" class="add-member">
<div class="search-account" :element-loading-background="loadingBackground">
<el-form :inline="true">
<input v-model="name" placeholder="Account name" class="account-name" v-shortkey="['enter']" @shortkey="search" autofocus></input>
<input v-model="name" placeholder="Account name" class="account-name" v-shortkey="['enter']" @shortkey="search" autofocus />
<el-button type="text" class="search" @click="search">
<icon name="search"></icon>
<font-awesome-icon icon="search" />
</el-button>
</el-form>
<div class="search-results">
@ -21,13 +17,11 @@
<div class="username">
{{ username(user) }}
</div>
<div class="acct">
@{{ user.acct }}
</div>
<div class="acct">@{{ user.acct }}</div>
</div>
<div class="add">
<el-button type="text" @click="add(user)">
<icon name="plus"></icon>
<font-awesome-icon icon="plus" />
</el-button>
</div>
</div>
@ -74,7 +68,8 @@ export default {
this.$store.dispatch('TimelineSpace/Modals/AddListMember/search', this.name)
},
add(user) {
this.$store.dispatch('TimelineSpace/Modals/AddListMember/add', user)
this.$store
.dispatch('TimelineSpace/Modals/AddListMember/add', user)
.then(() => {
this.addListMemberModal = false
this.$store.dispatch('TimelineSpace/Contents/Lists/Edit/fetchMembers', this.listId)

View File

@ -23,7 +23,8 @@ import {
faUnlock,
faLock,
faEyeSlash,
faEye
faEye,
faPlus
} from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import 'vue-awesome/icons'
@ -64,7 +65,8 @@ library.add(
faUnlock,
faLock,
faEyeSlash,
faEye
faEye,
faPlus
)
Vue.use(ElementUI, { locale })