2018-11-14 11:29:45 -08:00
|
|
|
<template>
|
2018-11-28 08:24:19 -08:00
|
|
|
<div class="user-search panel panel-default">
|
2018-11-14 11:29:45 -08:00
|
|
|
<div class="panel-heading">
|
|
|
|
{{$t('nav.user_search')}}
|
|
|
|
</div>
|
2018-12-28 11:39:54 -08:00
|
|
|
<div class="user-search-input-container">
|
2019-02-25 06:08:52 -08:00
|
|
|
<input class="user-finder-input" ref="userSearchInput" @keyup.enter="newQuery(username)" v-model="username" :placeholder="$t('finder.find_user')"/>
|
2018-12-28 11:39:54 -08:00
|
|
|
<button class="btn search-button" @click="newQuery(username)">
|
|
|
|
<i class="icon-search"/>
|
|
|
|
</button>
|
|
|
|
</div>
|
2019-02-22 10:37:02 -08:00
|
|
|
<div v-if="loading" class="text-center loading-icon">
|
|
|
|
<i class="icon-spin3 animate-spin"/>
|
|
|
|
</div>
|
|
|
|
<div v-else class="panel-body">
|
2019-04-04 00:09:00 -07:00
|
|
|
<List :items="users">
|
2019-04-11 19:15:58 -07:00
|
|
|
<template slot="item" slot-scope="{item}">
|
|
|
|
<FollowCard :user="item" />
|
2019-04-04 00:09:00 -07:00
|
|
|
</template>
|
|
|
|
</List>
|
2018-11-14 11:29:45 -08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./user_search.js"></script>
|
2018-12-28 11:39:54 -08:00
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
.user-search-input-container {
|
|
|
|
margin: 0.5em;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
.search-button {
|
|
|
|
margin-left: 0.5em;
|
|
|
|
}
|
|
|
|
}
|
2019-02-22 10:37:02 -08:00
|
|
|
|
|
|
|
.loading-icon {
|
|
|
|
padding: 1em;
|
|
|
|
}
|
2018-12-28 11:39:54 -08:00
|
|
|
</style>
|