Commit e76eecfd authored by Ciaran Ainsworth's avatar Ciaran Ainsworth
Browse files

Add login link to profile menu

Only show signup if enabled on instance
parent 2ec70fdd
Pipeline #17260 passed with stages
in 13 minutes and 34 seconds
......@@ -73,8 +73,14 @@
{{ labels.logout }}
</router-link>
</template>
<template v-else-if="!$store.state.auth.authenticated && this.$route.path != '/signup'">
<template v-if="!$store.state.auth.authenticated">
<div class="divider" />
<router-link class="item" :to="{ name: 'login' }">
<i class="sign in alternate icon" />
{{ labels.login }}
</router-link>
</template>
<template v-if="!$store.state.auth.authenticated && $store.state.instance.settings.users.registration_enabled.value">
<router-link class="item" :to="{ name: 'signup' }">
<i class="user icon" />
{{ labels.signup }}
......@@ -93,7 +99,7 @@ export default {
return {
profile: this.$pgettext("*/*/*/Noun", "Profile"),
settings: this.$pgettext("*/*/*/Noun", "Settings"),
logout: this.$pgettext("Sidebar/Login/List item.Link/Verb", "Logout"),
logout: this.$pgettext("Sidebar/Login/List item.Link/Verb", "Log out"),
about: this.$pgettext("Sidebar/About/List item.Link", "About"),
shortcuts: this.$pgettext("*/*/*/Noun", "Keyboard shortcuts"),
support: this.$pgettext("Sidebar/*/Listitem.Link", "Help"),
......
......@@ -78,14 +78,20 @@
<span class="user-modal list-item">{{ labels.about }}</span>
</router-link>
</div>
<div class="divider" />
<div class="ui divider" />
<template v-if="$store.state.auth.authenticated">
<router-link tag="div" class="column" :to="{ name: 'logout' }" role="button">
<i class="user-modal list-icon sign out alternate icon" />
<span class="user-modal list-item">{{ labels.logout }}</span>
</router-link>
</template>
<template v-else-if="!$store.state.auth.authenticated">
<template v-if="!$store.state.auth.authenticated">
<router-link tag="div" class="column" :to="{ name: 'login' }" role="button">
<i class="user-modal list-icon sign in alternate icon" />
<span class="user-modal list-item">{{ labels.login }}</span>
</router-link>
</template>
<template v-if="!$store.state.auth.authenticated" && $store.state.instance.settings.users.registration_enabled.value>
<router-link tag="div" class="column" :to="{ name: 'signup' }" role="button">
<i class="user-modal list-item user icon" />
<span class="user-modal list-item">{{ labels.signup }}</span>
......@@ -113,7 +119,7 @@ export default {
header: this.$pgettext('Popup/Title/Noun', "Options"),
profile: this.$pgettext("*/*/*/Noun", "Profile"),
settings: this.$pgettext("*/*/*/Noun", "Settings"),
logout: this.$pgettext("Sidebar/Login/List item.Link/Verb", "Logout"),
logout: this.$pgettext("Sidebar/Login/List item.Link/Verb", "Log out"),
about: this.$pgettext("Sidebar/About/List item.Link", "About"),
shortcuts: this.$pgettext("*/*/*/Noun", "Keyboard shortcuts"),
support: this.$pgettext("Sidebar/*/Listitem.Link", "Help"),
......
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