Skip to content

Commit b620284

Browse files
Aluno message pages and routes
1 parent 982e028 commit b620284

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1569
-347
lines changed
12.8 KB
Loading

client/src/assets/icons/user2.png

21.6 KB
Loading

client/src/components/aluno/AsideDashboard.vue

+44-21
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,60 @@
11
<template>
2-
<aside>
2+
<aside :class="view">
33
<div>
44
<ul>
55
<li :class="getClassForPage('home')">
6-
<img :src="icons.home">
7-
<router-link to="/aluno">Página inicial</router-link>
6+
<router-link to="/aluno">
7+
<img :src="icons.home">
8+
<p v-if="showPs">Página inicial</p>
9+
</router-link>
810
</li>
911
<li :class="getClassForPage('profile')">
10-
<img :src="icons.user">
11-
<router-link to="/aluno/me">Meu perfil</router-link>
12+
<router-link to="/aluno/me">
13+
<img :src="icons.user">
14+
<p v-if="showPs">Meu perfil</p>
15+
</router-link>
1216
</li>
1317
<li :class="getClassForPage('pesquisa')">
14-
<img :src="icons.search">
15-
<router-link to="">Pesquisa</router-link>
18+
<router-link to="">
19+
<img :src="icons.search">
20+
<p v-if="showPs">Pesquisa</p>
21+
</router-link>
1622
</li>
1723
<li :class="getClassForPage('rede')">
18-
<img :src="icons.link">
19-
<router-link to="/rede">Meus vínculos</router-link>
24+
<router-link to="/rede">
25+
<img :src="icons.link">
26+
<p v-if="showPs">Meus vínculos</p>
27+
</router-link>
2028
</li>
21-
<li :class="getClassForPage('messsage')">
22-
<img :src="icons.send">
23-
<router-link to="">Mensagens</router-link>
29+
<li :class="getClassForPage('message')">
30+
<router-link to="/mensagens">
31+
<img :src="icons.send">
32+
<p v-if="showPs">Mensagens</p>
33+
</router-link>
2434
</li>
2535
<li :class="getClassForPage('estagios')">
26-
<img :src="icons.job">
27-
<router-link to="">Estágios</router-link>
36+
<router-link to="">
37+
<img :src="icons.job">
38+
<p v-if="showPs">Estágios</p>
39+
</router-link>
2840
</li>
2941
<li :class="getClassForPage('rankings')">
30-
<img :src="icons.ranking">
31-
<router-link to="">Rankings</router-link>
42+
<router-link to="">
43+
<img :src="icons.ranking">
44+
<p v-if="showPs">Rankings</p>
45+
</router-link>
3246
</li>
3347
</ul>
3448
<ul>
3549
<li :class="getClassForPage('config')">
36-
<img :src="icons.config">
37-
<router-link to="/config">Configurações</router-link>
50+
<router-link to="/config">
51+
<img :src="icons.config">
52+
<p v-if="showPs">Configurações</p>
53+
</router-link>
3854
</li>
3955
</ul>
4056
</div>
41-
<button>
57+
<button @click="changePsVisualization">
4258
<img :src="icons.angulo" alt="<">
4359
</button>
4460
</aside>
@@ -80,17 +96,24 @@ export default defineComponent({
8096
angulo: anguloIcon,
8197
user: userIcon,
8298
config: configIcon
83-
}
99+
},
100+
showPs: true,
101+
view: 'yeah'
84102
}
85103
},
86104
methods: {
87105
getClassForPage(pageLoad) {
88106
return this.pageName === pageLoad ? "page" : "";
107+
},
108+
changePsVisualization(){
109+
this.showPs = !this.showPs;
110+
this.view = (this.view == 'yeah')? 'none' : "yeah"
111+
89112
}
90113
}
91114
});
92115
</script>
93116

94117
<style lang="scss" scoped>
95118
@import "../../scss/layouts/aluno/_asideDashboard.scss";
96-
</style>
119+
</style>

client/src/router/routes/aluno.js

+18
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import PerfilAluno from '../../views/aluno/Profile.vue';
88
import Complete from '../../views/aluno/Complete.vue';
99
import Rede from '../../views/aluno/Rede.vue';
1010
import ConfigAluno from '../../views/aluno/Config.vue';
11+
import Messages from '../../views/aluno/Messages.vue';
12+
import ChatAluno from '../../views/aluno/Message.vue';
1113

1214
import {
1315
isRecoveringAluno,
@@ -81,6 +83,22 @@ export const alunoRoutes = [
8183
(await isAuthAluno()) ? next() : next("/login");
8284
}
8385
},
86+
{
87+
path: "/mensagens",
88+
name: "Mensagens",
89+
component: Messages,
90+
beforeEnter: async (to, from, next) => {
91+
(await isAuthAluno()) ? next() : next("/login");
92+
}
93+
},
94+
{
95+
path: "/mensagens/:identifier/:email",
96+
name: "Mensagem",
97+
component: ChatAluno,
98+
beforeEnter: async (to, from, next) => {
99+
(await isAuthAluno()) ? next() : next("/login");
100+
}
101+
},
84102
{
85103
path: "/config",
86104
name: "Config",

client/src/scss/layouts/aluno/_asideDashboard.scss

+16-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ aside {
2727
height: 20px;
2828
width: 20px;
2929
object-fit: cover;
30-
margin-right: 10px;
3130
filter: invert(100%);
3231
}
3332

@@ -40,6 +39,10 @@ aside {
4039
@include flex(row, flex-start, center);
4140
color: $font-color-dark-2;
4241
@include font-inter(200);
42+
43+
p{
44+
margin-left: 10px;
45+
}
4346
}
4447

4548
&:hover {
@@ -50,15 +53,16 @@ aside {
5053
background-color: $secondary-color-dark;
5154
}
5255
}
53-
5456
}
5557
}
58+
5659
button {
5760
height: 100%;
5861
width: 30px;
5962
background-color: transparent;
6063
border: none;
6164
color: $font-color-dark;
65+
transition: 0s;
6266

6367
img {
6468
height: 25px;
@@ -69,3 +73,13 @@ aside {
6973
}
7074
}
7175
}
76+
77+
.none{
78+
width: auto;
79+
80+
button {
81+
img {
82+
transform: rotateY(180deg);
83+
}
84+
}
85+
}

0 commit comments

Comments
 (0)