aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/attachment/attachment.vue2
-rw-r--r--src/components/post_status_form/post_status_form.vue1
-rw-r--r--src/components/user_card_content/user_card_content.vue4
-rw-r--r--src/components/user_finder/user_finder.js12
-rw-r--r--src/components/user_finder/user_finder.vue20
-rw-r--r--src/lib/persisted_state.js3
-rw-r--r--src/main.js3
-rw-r--r--src/modules/users.js3
8 files changed, 40 insertions, 8 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>
diff --git a/src/lib/persisted_state.js b/src/lib/persisted_state.js
index 02349e13..09b5e987 100644
--- a/src/lib/persisted_state.js
+++ b/src/lib/persisted_state.js
@@ -51,6 +51,9 @@ export default function createPersistedState ({
merge({}, store.state, savedState)
)
}
+ if (store.state.users.lastLoginName) {
+ store.dispatch('loginUser', {username: store.state.users.lastLoginName, password: 'xxx'})
+ }
loaded = true
} catch (e) {
console.log("Couldn't load state")
diff --git a/src/main.js b/src/main.js
index 8d3a6775..e83e27c5 100644
--- a/src/main.js
+++ b/src/main.js
@@ -38,8 +38,7 @@ const persistedStateOptions = {
'config.autoLoad',
'config.hoverPreview',
'config.muteWords',
- 'statuses.notifications',
- 'users.users'
+ 'users.lastLoginName'
]
}
diff --git a/src/modules/users.js b/src/modules/users.js
index 98ac8f7e..f29cbf98 100644
--- a/src/modules/users.js
+++ b/src/modules/users.js
@@ -24,10 +24,12 @@ export const mutations = {
set(user, 'muted', muted)
},
setCurrentUser (state, user) {
+ state.lastLoginName = user.screen_name
state.currentUser = merge(state.currentUser || {}, user)
},
clearCurrentUser (state) {
state.currentUser = false
+ state.lastLoginName = false
},
beginLogin (state) {
state.loggingIn = true
@@ -44,6 +46,7 @@ export const mutations = {
}
export const defaultState = {
+ lastLoginName: false,
currentUser: false,
loggingIn: false,
users: [],