improve ui

This commit is contained in:
taehoon 2019-04-02 13:18:41 -04:00
parent 787737c80d
commit fd4289e45a
2 changed files with 25 additions and 3 deletions

View file

@ -1,6 +1,6 @@
<template>
<input v-model="query" placeholder="Search..." />
<div class="user-autosuggest" v-click-outside="onClickOutside">
<input v-model="query" placeholder="Search whom you want to block" @click="onInputClick" class="user-autosuggest-input" />
<div class="user-autosuggest-results" v-if="resultsVisible">
<BasicUserCard v-for="user in results" :key="user.id" :user="user"/>
</div>
@ -10,15 +10,31 @@
<script src="./user_autosuggest.js"></script>
<style lang="scss">
@import '../../_variables.scss';
.user-autosuggest {
position: relative;
&-input {
display: block;
width: 100%;
}
&-results {
position: absolute;
left: 0;
top: 100%;
right: 0;
background: #FFF;
background-color: $fallback--lightBg;
background-color: var(--lightBg, $fallback--lightBg);
border-style: solid;
border-width: 1px;
border-color: $fallback--border;
border-color: var(--border, $fallback--border);
border-radius: $fallback--inputRadius;
border-radius: var(--inputRadius, $fallback--inputRadius);
border-top-left-radius: 0;
border-top-right-radius: 0;
max-height: 400px;
overflow-y: auto;
z-index: 1;

View file

@ -195,7 +195,9 @@
</div>
<div :label="$t('settings.blocks_tab')">
<div class="profile-edit-usersearch-wrapper">
<UserAutoSuggest />
</div>
<block-list :refresh="true">
<template slot="empty">{{$t('settings.no_blocks')}}</template>
</block-list>
@ -263,5 +265,9 @@
text-align: right;
}
}
&-usersearch-wrapper {
padding: 1em;
}
}
</style>