diff options
| author | Henry Jameson <me@hjkos.com> | 2022-08-17 00:48:10 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2022-08-17 00:48:10 +0300 |
| commit | d074aefb4ffe8fc7bdb0e5f0afec46f7042a90fe (patch) | |
| tree | f8432667b0bee210551d2e80bda81f3b90a8afdb /src/components/lists_user_search | |
| parent | 38bd59ceb0182de15e2e97d750df59ad53dfa51a (diff) | |
List edit UI overhaul
Diffstat (limited to 'src/components/lists_user_search')
| -rw-r--r-- | src/components/lists_user_search/lists_user_search.js | 7 | ||||
| -rw-r--r-- | src/components/lists_user_search/lists_user_search.vue | 20 |
2 files changed, 17 insertions, 10 deletions
diff --git a/src/components/lists_user_search/lists_user_search.js b/src/components/lists_user_search/lists_user_search.js index 5798841a..c92ec0ee 100644 --- a/src/components/lists_user_search/lists_user_search.js +++ b/src/components/lists_user_search/lists_user_search.js @@ -15,6 +15,7 @@ const ListsUserSearch = { components: { Checkbox }, + emits: ['loading', 'loadingDone', 'results'], data () { return { loading: false, @@ -33,12 +34,16 @@ const ListsUserSearch = { } this.loading = true + this.$emit('loading') this.userIds = [] this.$store.dispatch('search', { q: query, resolve: true, type: 'accounts', following: this.followingOnly }) .then(data => { - this.loading = false this.$emit('results', data.accounts.map(a => a.id)) }) + .finally(() => { + this.loading = false + this.$emit('loadingDone') + }) } } } diff --git a/src/components/lists_user_search/lists_user_search.vue b/src/components/lists_user_search/lists_user_search.vue index 03fb3ba6..8633170c 100644 --- a/src/components/lists_user_search/lists_user_search.vue +++ b/src/components/lists_user_search/lists_user_search.vue @@ -1,5 +1,5 @@ <template> - <div> + <div class="ListsUserSearch"> <div class="input-wrap"> <div class="input-search"> <FAIcon @@ -29,17 +29,19 @@ <style lang="scss"> @import '../../_variables.scss'; -.input-wrap { - display: flex; - margin: 0.7em 0.5em 0.7em 0.5em; +.ListsUserSearch { + .input-wrap { + display: flex; + margin: 0.7em 0.5em 0.7em 0.5em; - input { - width: 100%; + input { + width: 100%; + } } -} -.search-icon { - margin-right: 0.3em; + .search-icon { + margin-right: 0.3em; + } } </style> |
