Add mock signed-in/out state to client

parent 56e10907
......@@ -5,7 +5,7 @@
<div class='profile-information'>
<h1 class='profile-name'>{{name}}</h1>
<p class='profile-bio'>{{bio}}</p>
<button id='follow-button' @click='followButtonPress' class='button'>Follow</button>
<button v-if='!signedIn' id='follow-button' @click='followButtonPress' class='button'>Follow</button>
</div>
</header>
</template>
......@@ -15,6 +15,7 @@ export default {
computed: {
name () { return this.$store.state.name },
bio () { return this.$store.state.bio },
signedIn () { return this.$store.state.signedIn }
},
methods: {
followButtonPress () {
......
......@@ -7,13 +7,13 @@
<b-tabs position="is-centered" class="block">
<b-tab-item label="Me">
<content-type-filter />
<textComposer @composerChange='composerChange' />
<pre style='word-break: break-word;'>{{ composerContent }}</pre>
<textComposer @composerChange='composerChange' v-if='signedIn'/>
<pre style='word-break: break-word;' v-if='signedIn'>{{ composerContent }}</pre>
</b-tab-item>
<b-tab-item label="Everyone"><!-- Nothing yet. --></b-tab-item>
<b-tab-item label='Search'><search /></b-tab-item>
<b-tab-item label="Settings"><settings /></b-tab-item>
<b-tab-item label="…"><!-- “More” tab: other features will go here. --></b-tab-item>
<b-tab-item label="Settings" v-if='signedIn'><settings /></b-tab-item>
<b-tab-item label="…" v-if='signedIn'><!-- “More” tab: other features will go here. --></b-tab-item>
</b-tabs>
<!-- Follow modal -->
......@@ -45,6 +45,7 @@ export default {
computed: {
name () { return this.$store.state.name },
bio () { return this.$store.state.bio },
signedIn () { return this.$store.state.signedIn }
},
data () {
......
......@@ -2,6 +2,9 @@
const siteConfiguration = require('../assets/data.json')
// Mock: sign-in state
siteConfiguration.signedIn = false
export const state = () => (siteConfiguration)
// export const mutations = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment