Skip to content

Commit

Permalink
Adicionado rotas nas notificações que leva o usuario até o perfil da …
Browse files Browse the repository at this point in the history
…pessoa da notificiação.
  • Loading branch information
jpaiva31 committed Mar 9, 2023
1 parent 2bb7f86 commit 3ff0c43
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ services:
# - POSTGRES_PASSWORD=postgres
web:
build: .
command: python manage.py runserver 0.0.0.0:8000 && python manage.py migrate && python manage.py migrate feed 0012 --fake && python manage.py migrate && python manage.py migrate twikkerprofile 0006 --fake && python manage.py migrate
command: python manage.py runserver 0.0.0.0:7000 && python manage.py migrate && python manage.py migrate feed 0012 --fake && python manage.py migrate && python manage.py migrate twikkerprofile 0006 --fake && python manage.py migrate
volumes:
- .:/code
ports:
- "8000:8000"
- "7000:7000"
environment:
- POSTGRES_NAME=postgres
- POSTGRES_USER=postgres
Expand Down
4 changes: 2 additions & 2 deletions frontend/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VITE_API_BASE_URL = 'http://localhost:8000'
VITE_SOCKET_HOST = 'localhost:8000'
VITE_API_BASE_URL = 'http://localhost:7000'
VITE_SOCKET_HOST = 'localhost:7000'
22 changes: 11 additions & 11 deletions frontend/src/pages/Notifications.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@
>
<Avatar :avatar_url="notification.avatar_url" :size="8" class="mr-2"/>
<div>
<a v-if="notification.notification_type == 'message'">
<router-link :to="`/profile/${notification.created_by_username}`" v-if="notification.notification_type == 'message'">
<strong>{{ notification.created_by_username }}</strong> te mandou
uma mensagem
<small>{{ formatted_time(notification.created_at) }}</small>
</a>
<a v-if="notification.notification_type == 'follower'">
<strong>{{ notification.created_by_username }}</strong> começou a te
</router-link>
<router-link :to="`/profile/${notification.created_by_username}`" v-if="notification.notification_type == 'follower'">
<strong>{{ notification.created_by_username }}</strong> começou router-link te
seguir
<small>{{ formatted_time(notification.created_at) }}</small>
</a>
<a v-if="notification.notification_type == 'like'">
</router-link>
<router-link :to="`/profile/${notification.created_by_username}`" v-if="notification.notification_type == 'like'">
<strong>{{ notification.created_by_username }}</strong> curtiu um
tweek que você fez
<small>{{ formatted_time(notification.created_at) }}</small>
</a>
<a v-if="notification.notification_type == 'dislike'">
</router-link>
<router-link :to="`/profile/${notification.created_by_username}`" v-if="notification.notification_type == 'dislike'">
<strong>{{ notification.created_by_username }}</strong> não curtiu
um tweek que você fez
<small>{{ formatted_time(notification.created_at) }}</small>
</a>
<a v-if="notification.notification_type == 'mention'">
</router-link>
<router-link :to="`/profile/${notification.created_by_username}`" v-if="notification.notification_type == 'mention'">
<strong>{{ notification.created_by_username }}</strong> mencionou
você em um tweek
<small>{{ formatted_time(notification.created_at) }}</small>
</a>
</router-link>
</div>
</div>
</div>
Expand Down

0 comments on commit 3ff0c43

Please sign in to comment.