Skip to content

Commit

Permalink
push image update
Browse files Browse the repository at this point in the history
  • Loading branch information
itsMikeLowrey committed Jun 15, 2023
1 parent 9567e5f commit 6b03a69
Show file tree
Hide file tree
Showing 4 changed files with 6,739 additions and 166 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ dist-ssr
*.sw?
.env

.netlify/
.netlify/
netlify/functions/getAll.js
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"libsodium-wrappers": "^0.7.11",
"mailgun.js": "^9.0.1",
"mongodb": "^5.6.0",
"netlify-cli": "^15.6.0",
"vue": "^3.2.47",
"vue-router": "4"
},
Expand Down
14 changes: 10 additions & 4 deletions src/views/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ function localTime(epoch) {
var strTime = hours + ':' + minutes + ' ' + ampm + ' ' + day + '/' + month
return strTime;
}
function getChatImage(sender) {
if (sender !== 'dgoon') {
return 'https://res.cloudinary.com/dylevfpbl/image/upload/v1686024666/landingpage/avatars/man_2.svg'
}
return 'https://res.cloudinary.com/dylevfpbl/image/upload/v1686024702/landingpage/avatars/boy.svg'
}
onMounted(() => {
const routeInfo = router.currentRoute.value
const routeName = routeInfo.name
Expand Down Expand Up @@ -159,15 +165,15 @@ onMounted(() => {
'chat-end': message.sender !== 'dgoon' }">
<div class="chat-image avatar">
<div class="w-10 rounded-full">
<img src="https://res.cloudinary.com/dylevfpbl/image/upload/v1686024666/landingpage/avatars/man_2.svg" />
<img :src="getChatImage(message.sender)" />
</div>
</div>
<div class="chat-header">
<div class="chat-header text-white">
{{ message.sender }}

</div>
<div class="chat-bubble">{{ message.message }} </div>
<div class="chat-footer opacity-50">
<div class="chat-bubble break-words">{{ message.message }} </div>
<div class="chat-footer text-white">
Sent at {{localTime(message.timestamp)}}
</div>
</div>
Expand Down
Loading

0 comments on commit 6b03a69

Please sign in to comment.