Much better design

This commit is contained in:
root
2021-11-02 03:16:22 +05:30
parent df48018ce8
commit 32f50e783e
2 changed files with 30 additions and 4 deletions
+14 -3
View File
@@ -50,6 +50,7 @@
>
{{ $t(link.name) }}
</v-list-item>
<AuthenticationModal :list-mode="true" />
</v-list>
<v-select
dense
@@ -117,7 +118,7 @@ export default {
computed: {
links () {
return [
const links = [
{
id: 'prefs',
name: 'titles.preferences',
@@ -125,8 +126,8 @@ export default {
},
{
id: 'trending',
name: 'titles.' + this.$store.getters['prefs/getPreference']('homepage', 'trending'),
to: '/'
name: 'titles.trending',
to: '/trending'
},
{
id: 'watch-history',
@@ -134,6 +135,16 @@ export default {
to: '/watch-history'
}
]
if (this.$store.getters['auth/isCurrentlyAuthenticated']) {
links.splice(2, 0, {
id: 'feed',
name: 'titles.feed',
to: '/feed'
})
}
return links
}
},
+16 -1
View File
@@ -11,9 +11,17 @@
v-on="on"
min-width="100%"
class="mx-2"
v-if="listMode === false"
>
Log In/Sign Up
</v-btn>
<v-list-item
v-else
v-bind="attrs"
v-on="on"
>
Log In/Sign Up
</v-list-item>
</template>
<v-card>
<v-card-title>Authentication</v-card-title>
@@ -26,7 +34,13 @@
</v-card-text>
</v-card>
</v-dialog>
<v-btn text min-width="100%" class="mx-2" @click="logOut" v-else>Log Out</v-btn>
<v-list-item
v-else-if="listMode === true"
@click="logOut"
>
Log Out
</v-list-item>
<v-btn text min-width="100%" class="mx-2" @click="logOut" v-else>Log Out</v-btn>
</template>
<script>
@@ -34,6 +48,7 @@ import { AuthenticationError } from '@/store/authentication-store'
export default {
name: 'AuthenticationModal',
props: ['listMode'],
data: () => ({
error: null,
requestInProgress: false,