From 5ae4bc24113d5e9223d3b4e94b9734469f8825bb Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Tue, 15 Oct 2024 10:41:21 +0100 Subject: [PATCH] fix message --- src/app/services/auth.service.ts | 10 ++++++++++ .../ui/chat/component/messages/messages.page.html | 4 +++- src/app/ui/chat/modal/messages/messages.page.html | 3 ++- src/app/ui/chat/store/model/message.ts | 11 +++++++++++ version/git-version.ts | 12 ++++++------ 5 files changed, 32 insertions(+), 8 deletions(-) diff --git a/src/app/services/auth.service.ts b/src/app/services/auth.service.ts index 5b0e2b780..3f7d75df6 100644 --- a/src/app/services/auth.service.ts +++ b/src/app/services/auth.service.ts @@ -115,6 +115,11 @@ export class AuthService { this.errorHandler.handleError(error); this.httpErroHandle.loginHttpStatusHandle(error) captureException(error); + + if(error?.status == 403) { + console.log('error?.status == 403') + } + } finally { return response } @@ -290,6 +295,11 @@ export class AuthService { this.errorHandler.handleError(error); this.httpErroHandle.loginHttpStatusHandle(error) captureException(error); + + if(error?.status == 403) { + console.log('error?.status == 403') + } + } finally { return response } diff --git a/src/app/ui/chat/component/messages/messages.page.html b/src/app/ui/chat/component/messages/messages.page.html index c5f0505ed..37ecd206e 100644 --- a/src/app/ui/chat/component/messages/messages.page.html +++ b/src/app/ui/chat/component/messages/messages.page.html @@ -134,7 +134,9 @@
-
+ +
+ {{ message.hour }} diff --git a/src/app/ui/chat/modal/messages/messages.page.html b/src/app/ui/chat/modal/messages/messages.page.html index 7bdbe8c08..0f330698c 100644 --- a/src/app/ui/chat/modal/messages/messages.page.html +++ b/src/app/ui/chat/modal/messages/messages.page.html @@ -151,7 +151,8 @@
-
+
+ {{ message.hour }} diff --git a/src/app/ui/chat/store/model/message.ts b/src/app/ui/chat/store/model/message.ts index aa87cf095..f2d00ce06 100644 --- a/src/app/ui/chat/store/model/message.ts +++ b/src/app/ui/chat/store/model/message.ts @@ -57,6 +57,7 @@ export class MessageViewModal { showReaction = false showMessage = false ballon = false + hour = '' constructor(model?: IMessage) { if(model) { @@ -70,6 +71,16 @@ export class MessageViewModal { if(this.isDeleted == false && this.messageType == IMessageType.normal) { this.showMessage = true } + + + // Format the time to "HH:MM" + if(this.sentAt) { + const date = new Date(this.sentAt); + + // Format the time to "HH:MM" + this.hour = date.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', hour12: false }); + } + } setMessageUIType() { diff --git a/version/git-version.ts b/version/git-version.ts index f7a04692b..f9f1dfc39 100644 --- a/version/git-version.ts +++ b/version/git-version.ts @@ -1,11 +1,11 @@ export let versionData = { - "shortSHA": "ed3b19962", - "SHA": "ed3b19962236fd8851b2067cd5ff59a06f3bee68", + "shortSHA": "48b6d671f", + "SHA": "48b6d671fe05332a5521ea1dce8f782b3f2b9d85", "branch": "feature/chat-new-api-peter", "lastCommitAuthor": "'Peter Maquiran'", - "lastCommitTime": "'Thu Oct 10 12:19:09 2024 +0100'", - "lastCommitMessage": "register component", - "lastCommitNumber": "6093", - "changeStatus": "On branch feature/chat-new-api-peter\nYour branch is ahead of 'origin/feature/chat-new-api-peter' by 8 commits.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/ui/chat/component/group-contacts/group-contacts.page.ts\n\tmodified: src/app/ui/chat/component/messages/messages.page.html\n\tmodified: src/app/ui/chat/modal/chat-popover/chat-popover.page.html\n\tmodified: src/app/ui/chat/modal/chat-popover/chat-popover.page.ts\n\tmodified: src/app/ui/chat/modal/group-contacts/group-contacts.page.ts\n\tmodified: src/app/ui/chat/modal/messages/messages.page.html\n\tmodified: version/git-version.ts", + "lastCommitTime": "'Fri Oct 11 12:10:43 2024 +0100'", + "lastCommitMessage": "visual alingment", + "lastCommitNumber": "6094", + "changeStatus": "On branch feature/chat-new-api-peter\nYour branch is ahead of 'origin/feature/chat-new-api-peter' by 9 commits.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/services/auth.service.ts\n\tmodified: src/app/ui/chat/component/messages/messages.page.html\n\tmodified: src/app/ui/chat/modal/messages/messages.page.html\n\tmodified: src/app/ui/chat/store/model/message.ts", "changeAuthor": "peter.maquiran" } \ No newline at end of file