aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_panel
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2019-06-13 00:51:14 +0300
committerHenry Jameson <me@hjkos.com>2019-06-13 00:51:14 +0300
commitc8a57ad32e6d47a114e3d744b4b6a0666e9e01f7 (patch)
treede02290d6d97733c0ff7a041731b8c95e98b6c95 /src/components/user_panel
parent1e94aecbc951c7508a0063de0c6cd90b40a040d8 (diff)
parente53f11c30fb2eedd0a437d3cfe9592c555de6a95 (diff)
Merge remote-tracking branch 'upstream/develop' into masto-register-app-secret
* upstream/develop: Revert "add TOTP/Recovery Form for mobile version"
Diffstat (limited to 'src/components/user_panel')
-rw-r--r--src/components/user_panel/user_panel.js8
-rw-r--r--src/components/user_panel/user_panel.vue11
2 files changed, 14 insertions, 5 deletions
diff --git a/src/components/user_panel/user_panel.js b/src/components/user_panel/user_panel.js
index d4478290..c2f51eb6 100644
--- a/src/components/user_panel/user_panel.js
+++ b/src/components/user_panel/user_panel.js
@@ -1,13 +1,15 @@
-import LoginForm from '../login_form/login_form.vue'
+import AuthForm from '../auth_form/auth_form.js'
import PostStatusForm from '../post_status_form/post_status_form.vue'
import UserCard from '../user_card/user_card.vue'
+import { mapState } from 'vuex'
const UserPanel = {
computed: {
- user () { return this.$store.state.users.currentUser }
+ signedIn () { return this.user },
+ ...mapState({ user: state => state.users.currentUser })
},
components: {
- LoginForm,
+ AuthForm,
PostStatusForm,
UserCard
}
diff --git a/src/components/user_panel/user_panel.vue b/src/components/user_panel/user_panel.vue
index 8310f30e..37e28ca5 100644
--- a/src/components/user_panel/user_panel.vue
+++ b/src/components/user_panel/user_panel.vue
@@ -1,13 +1,20 @@
<template>
<div class="user-panel">
- <div v-if='user' class="panel panel-default" style="overflow: visible;">
+
+ <div v-if="signedIn" key="user-panel" class="panel panel-default signed-in">
<UserCard :user="user" :hideBio="true" rounded="top"/>
<div class="panel-footer">
<post-status-form v-if='user'></post-status-form>
</div>
</div>
- <login-form v-if='!user'></login-form>
+ <auth-form v-else key="user-panel"/>
</div>
</template>
<script src="./user_panel.js"></script>
+
+<style lang="scss">
+.user-panel .signed-in {
+ overflow: visible;
+}
+</style>