diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/attachment/attachment.vue | 2 | ||||
| -rw-r--r-- | src/components/post_status_form/post_status_form.vue | 1 | ||||
| -rw-r--r-- | src/components/user_card_content/user_card_content.vue | 4 | ||||
| -rw-r--r-- | src/components/user_finder/user_finder.js | 12 | ||||
| -rw-r--r-- | src/components/user_finder/user_finder.vue | 20 |
5 files changed, 33 insertions, 6 deletions
diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index d45a6825..870ee233 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -55,6 +55,7 @@ background: rgba(230,230,230,0.6); border-radius: 5px; font-weight: bold; + z-index: 4; } video { @@ -62,6 +63,7 @@ border: 1px solid; border-radius: 5px; width: 100%; + z-index: 0; } audio { diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index ec479215..b46fbf3a 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -143,6 +143,7 @@ .icon-cancel { cursor: pointer; + z-index: 4; } .autocomplete-panel { diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue index e4e3394e..baa71cd0 100644 --- a/src/components/user_card_content/user_card_content.vue +++ b/src/components/user_card_content/user_card_content.vue @@ -2,7 +2,7 @@ <div id="heading" class="profile-panel-background" :style="headingStyle"> <div class="panel-heading text-center"> <div class='user-info'> - <router-link to='/user-settings' style="float: right;" v-if="!isOtherUser"> + <router-link to='/user-settings' style="float: right; margin-top:16px;" v-if="!isOtherUser"> <i class="icon-cog usersettings"></i> </router-link> <div class='container'> @@ -47,7 +47,7 @@ </div> <div class="panel-body profile-panel-body" :style="bodyStyle"> <div class="user-counts"> - <div class="user-count base04"> + <div class="user-count"> <a href="#" v-on:click.prevent="setProfileView('statuses')" v-if="switcher"><h5 class="base05">Statuses</h5></a> <h5 v-else>Statuses</h5> <span class="base05">{{user.statuses_count}} <br><span class="dailyAvg">{{dailyAvg}} per day</span></span> diff --git a/src/components/user_finder/user_finder.js b/src/components/user_finder/user_finder.js index 03205382..abd40d51 100644 --- a/src/components/user_finder/user_finder.js +++ b/src/components/user_finder/user_finder.js @@ -1,20 +1,30 @@ const UserFinder = { data: () => ({ username: undefined, - hidden: true + hidden: true, + error: false, + loading: false }), methods: { findUser (username) { + this.loading = true this.$store.state.api.backendInteractor.externalProfile(username) .then((user) => { + this.loading = false + this.hidden = true if (!user.error) { this.$store.commit('addNewUsers', [user]) this.$router.push({name: 'user-profile', params: {id: user.id}}) + } else { + this.error = true } }) }, toggleHidden () { this.hidden = !this.hidden + }, + dismissError () { + this.error = false } } } diff --git a/src/components/user_finder/user_finder.vue b/src/components/user_finder/user_finder.vue index c23d8ee0..2ca476fa 100644 --- a/src/components/user_finder/user_finder.vue +++ b/src/components/user_finder/user_finder.vue @@ -1,8 +1,15 @@ <template> - <a href="#" v-if="hidden"><i class="icon-user-plus user-finder-icon" @click.prevent="toggleHidden"/></a> - <span v-else> - <input class="user-finder-input base03-border" @keyup.enter="findUser(username)" v-model="username" placeholder="Find user" id="user-finder-input" type="text"/> + <span> + <span class="finder-error base05" v-if="error"> + <i class="icon-cancel user-finder-icon" @click="dismissError"/> + Error fetching user + </span> + <i class="icon-spin4 user-finder-icon animate-spin-slow" v-if="loading" /> + <a href="#" v-if="hidden"><i class="icon-user-plus user-finder-icon" @click.prevent="toggleHidden"/></a> + <span v-else> + <input class="user-finder-input base03-border" @keyup.enter="findUser(username)" v-model="username" placeholder="Find user" id="user-finder-input" type="text"/> <i class="icon-cancel user-finder-icon" @click="toggleHidden"/> + </span> </span> </template> @@ -20,4 +27,11 @@ border-radius: 5px; padding: 0.1em 0.2em 0.2em 0.2em; } + + .finder-error { + background-color: rgba(255, 48, 16, 0.65); + margin: 0.35em; + border-radius: 5px; + padding: 0.25em; + } </style> |
