2018-10-19 05:15:28 +00:00
|
|
|
<template lang="html">
|
2018-11-17 22:23:33 +00:00
|
|
|
<nav :class="{ dark: settings && settings.nightMode }">
|
|
|
|
<slide width="300">
|
2018-11-19 02:20:17 +00:00
|
|
|
<main>
|
|
|
|
<section class="profile">
|
|
|
|
<gravatar :email="user.email" />
|
|
|
|
|
|
|
|
<div class="info">
|
|
|
|
<strong>{{ user.displayName }}</strong>
|
|
|
|
{{ user.email }}
|
|
|
|
</div>
|
|
|
|
</section>
|
2018-11-08 03:49:04 +00:00
|
|
|
|
2018-11-19 02:20:17 +00:00
|
|
|
<section class="actions">
|
2018-11-08 03:49:04 +00:00
|
|
|
<router-link :to="{ name: 'home' }">
|
|
|
|
<i class="fas fa-home" />
|
|
|
|
Home
|
|
|
|
</router-link>
|
|
|
|
|
|
|
|
<router-link :to="{ name: 'platforms' }" v-if="platform">
|
|
|
|
<i class="fas fa-exchange-alt" />
|
|
|
|
Change platform
|
|
|
|
</router-link>
|
|
|
|
|
|
|
|
<router-link :to="{ name: 'settings' }">
|
|
|
|
<i class="fas fa-cog" />
|
|
|
|
Settings
|
|
|
|
</router-link>
|
|
|
|
|
|
|
|
<a href="https://www.paypal.me/RomanCervantes/5" target="_blank">
|
|
|
|
<i class="fas fa-donate" />
|
|
|
|
Donate
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<a href="https://github.com/romancmx/gamebrary/issues" target="_blank">
|
|
|
|
<i class="fas fa-bug" />
|
|
|
|
Report bugs
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<a href="https://goo.gl/forms/r0juBCsZaUtJ03qb2" target="_blank">
|
|
|
|
<i class="fas fa-comments" />
|
|
|
|
Submit feedback
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<a @click="signOut">
|
|
|
|
<i class="fas fa-sign-out-alt" />
|
|
|
|
Sign out
|
|
|
|
</a>
|
|
|
|
|
2018-11-19 02:20:17 +00:00
|
|
|
<p>© 2018 Gamebrary</p>
|
|
|
|
</section>
|
|
|
|
</main>
|
2018-11-17 22:23:33 +00:00
|
|
|
</slide>
|
|
|
|
|
|
|
|
<router-link tag="button" class="logo" :to="{ name: 'home' }">
|
|
|
|
GAMEBRARY
|
|
|
|
</router-link>
|
2018-10-19 05:15:28 +00:00
|
|
|
</nav>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2018-11-08 03:49:04 +00:00
|
|
|
import Gravatar from 'vue-gravatar';
|
|
|
|
import firebase from 'firebase/app';
|
|
|
|
import 'firebase/auth';
|
2018-11-17 22:23:33 +00:00
|
|
|
import { Slide } from 'vue-burger-menu';
|
2018-10-25 06:33:15 +00:00
|
|
|
import { mapState } from 'vuex';
|
2018-10-19 05:15:28 +00:00
|
|
|
|
|
|
|
export default {
|
2018-11-08 03:49:04 +00:00
|
|
|
components: {
|
|
|
|
Gravatar,
|
2018-11-17 22:23:33 +00:00
|
|
|
Slide,
|
2018-11-08 03:49:04 +00:00
|
|
|
},
|
|
|
|
|
2018-10-19 05:15:28 +00:00
|
|
|
computed: {
|
2018-11-02 01:42:43 +00:00
|
|
|
...mapState(['user', 'platform', 'settings']),
|
2018-10-25 06:33:15 +00:00
|
|
|
|
2018-10-29 23:53:49 +00:00
|
|
|
routeName() {
|
|
|
|
return this.$route.name;
|
2018-10-25 06:33:15 +00:00
|
|
|
},
|
2018-11-08 03:49:04 +00:00
|
|
|
|
|
|
|
platformLogo() {
|
|
|
|
return this.platform.useAlt
|
|
|
|
? `/static/img/platforms/${this.platform.code}-alt.svg`
|
|
|
|
: `/static/img/platforms/${this.platform.code}.svg`;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
signOut() {
|
|
|
|
firebase.auth().signOut()
|
|
|
|
.then(() => {
|
|
|
|
this.$store.commit('CLEAR_SESSION');
|
|
|
|
this.$router.push({ name: 'home' });
|
|
|
|
})
|
|
|
|
.catch((error) => {
|
|
|
|
this.$error(error);
|
|
|
|
});
|
|
|
|
},
|
2018-10-19 05:15:28 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" rel="stylesheet/scss" scoped>
|
|
|
|
@import "~styles/styles.scss";
|
|
|
|
nav {
|
2018-11-08 03:49:04 +00:00
|
|
|
user-select: none;
|
|
|
|
position: fixed;
|
|
|
|
z-index: 1;
|
|
|
|
width: 100vw;
|
2018-11-17 22:23:33 +00:00
|
|
|
height: $navHeight;
|
2018-10-19 05:15:28 +00:00
|
|
|
display: flex;
|
2018-11-08 03:49:04 +00:00
|
|
|
justify-content: center;
|
2018-11-17 22:23:33 +00:00
|
|
|
background: $color-white;
|
2018-11-08 03:49:04 +00:00
|
|
|
color: $color-dark-gray;
|
2018-10-25 06:33:15 +00:00
|
|
|
|
2018-10-29 23:53:49 +00:00
|
|
|
.logo {
|
2018-11-08 03:49:04 +00:00
|
|
|
height: $navHeight;
|
2018-10-29 23:53:49 +00:00
|
|
|
font-weight: bold;
|
2018-11-08 03:49:04 +00:00
|
|
|
}
|
|
|
|
|
2018-11-17 22:23:33 +00:00
|
|
|
&.dark {
|
|
|
|
background: $color-darkest-gray;
|
|
|
|
color: $color-gray !important;
|
2018-11-08 03:49:04 +00:00
|
|
|
|
2018-11-17 22:23:33 +00:00
|
|
|
.actions {
|
|
|
|
a {
|
|
|
|
color: $color-gray;
|
2018-11-08 03:49:04 +00:00
|
|
|
}
|
2018-11-18 22:27:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.profile {
|
|
|
|
background: $color-darkest-gray;
|
|
|
|
|
|
|
|
.info {
|
|
|
|
color: $color-gray;
|
2018-11-17 22:23:33 +00:00
|
|
|
}
|
2018-11-08 03:49:04 +00:00
|
|
|
}
|
|
|
|
}
|
2018-11-17 22:23:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.profile {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2018-11-08 03:49:04 +00:00
|
|
|
|
2018-11-17 22:23:33 +00:00
|
|
|
.info {
|
2018-11-08 03:49:04 +00:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2018-11-17 22:23:33 +00:00
|
|
|
margin-left: $gp;
|
|
|
|
color: $color-dark-gray;
|
2018-10-19 05:15:28 +00:00
|
|
|
}
|
|
|
|
|
2018-11-17 22:23:33 +00:00
|
|
|
img {
|
2018-11-18 22:27:47 +00:00
|
|
|
width: 40px;
|
|
|
|
height: 40px;
|
2018-11-17 22:23:33 +00:00
|
|
|
border-radius: 100%;
|
|
|
|
border: 2px solid $color-white;
|
|
|
|
box-shadow: 0 0 2px 0px $color-dark-gray;
|
2018-11-08 03:49:04 +00:00
|
|
|
|
2018-11-17 22:23:33 +00:00
|
|
|
@media($small) {
|
|
|
|
width: 40px;
|
|
|
|
height: 40px;
|
2018-11-08 03:49:04 +00:00
|
|
|
}
|
|
|
|
}
|
2018-11-17 22:23:33 +00:00
|
|
|
}
|
2018-11-08 03:49:04 +00:00
|
|
|
|
2018-11-19 02:20:17 +00:00
|
|
|
main {
|
|
|
|
height: 100vh;
|
|
|
|
border-right: 2px solid $color-light-gray;
|
2018-11-17 22:23:33 +00:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2018-11-08 03:49:04 +00:00
|
|
|
|
2018-11-17 22:23:33 +00:00
|
|
|
a {
|
|
|
|
color: $color-dark-gray;
|
2018-11-18 22:27:47 +00:00
|
|
|
grid-template-columns: 40px auto;
|
|
|
|
margin-bottom: $gp / 2;
|
2018-11-17 22:23:33 +00:00
|
|
|
display: grid;
|
|
|
|
align-items: center;
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
i, img {
|
2018-11-18 22:27:47 +00:00
|
|
|
width: 40px;
|
|
|
|
height: 40px;
|
2018-11-17 22:23:33 +00:00
|
|
|
text-align: center;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
display: flex;
|
2018-10-19 05:15:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|