Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chat_webview
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abookCommunication
chat_webview
Commits
e3cf3b7f
Commit
e3cf3b7f
authored
Apr 01, 2021
by
Lee Munkyeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
メッセージUI
parent
9a9fc89d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
2 deletions
+22
-2
public_new/js/chat-ui.js
+8
-1
public_new/js/chat-websocket.js
+2
-1
public_new/template/template_my_message.html
+6
-0
public_new/template/template_user_message.html
+6
-0
No files found.
public_new/js/chat-ui.js
View file @
e3cf3b7f
...
@@ -1187,13 +1187,20 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
...
@@ -1187,13 +1187,20 @@ CHAT_UI.loadMessages = function(roomId, roomName) {
message
.
message
=
replacePath
;
message
.
message
=
replacePath
;
/* if (message.message contain) {
/* if (message.message contain) {
}*/
}*/
var
isToday
=
false
;
if
(
messageTime
.
createdAt
.
includes
(
':'
))
{
isToday
=
true
;
}
let
html
=
Mustache
.
render
(
template
,
{
let
html
=
Mustache
.
render
(
template
,
{
text
:
message
.
message
,
text
:
message
.
message
,
from
:
message
.
loginId
,
from
:
message
.
loginId
,
shopMemberId
:
message
.
shopMemberId
,
shopMemberId
:
message
.
shopMemberId
,
profileImage
:
message
.
profileUrl
,
profileImage
:
message
.
profileUrl
,
createdAtDay
:
messageTime
.
createdAtDay
,
createdAtDay
:
messageTime
.
createdAtDay
,
createdAtTime
:
messageTime
.
createdAtTime
createdAtTime
:
messageTime
.
createdAtTime
,
isToday
:
isToday
});
});
html
=
message
.
message
.
includes
(
'attachedImages'
)
||
message
.
message
.
includes
(
'attachedVideos'
)
?
CHAT_UTIL
.
htmlDecode
(
html
)
:
html
;
html
=
message
.
message
.
includes
(
'attachedImages'
)
||
message
.
message
.
includes
(
'attachedVideos'
)
?
CHAT_UTIL
.
htmlDecode
(
html
)
:
html
;
workVal
=
html
+
workVal
;
workVal
=
html
+
workVal
;
...
...
public_new/js/chat-websocket.js
View file @
e3cf3b7f
...
@@ -200,7 +200,8 @@ function setSocketAction () {
...
@@ -200,7 +200,8 @@ function setSocketAction () {
from
:
message
.
from
,
from
:
message
.
from
,
profileImage
:
message
.
profileImagePath
,
profileImage
:
message
.
profileImagePath
,
createdAtDay
:
messageTime
.
createdAtDay
,
createdAtDay
:
messageTime
.
createdAtDay
,
createdAtTime
:
messageTime
.
createdAtTime
createdAtTime
:
messageTime
.
createdAtTime
,
isToday
:
true
});
});
// イメージの場合、img tagを追加する
// イメージの場合、img tagを追加する
html
=
message
.
text
.
includes
(
'attachedImages'
)
||
message
.
text
.
includes
(
'attachedVideos'
)
?
CHAT_UTIL
.
htmlDecode
(
html
)
:
html
;
html
=
message
.
text
.
includes
(
'attachedImages'
)
||
message
.
text
.
includes
(
'attachedVideos'
)
?
CHAT_UTIL
.
htmlDecode
(
html
)
:
html
;
...
...
public_new/template/template_my_message.html
View file @
e3cf3b7f
<div
class=
"room_right"
>
<div
class=
"room_right"
>
<div
class=
"text"
>
{{text}}
</div>
<div
class=
"text"
>
{{text}}
</div>
{{#isToday}}
<div
class=
"date d-flex flex-column"
><span></span><span>
{{createdAtTime}}
</span></div>
{{/isToday}}
{{^isToday}}
<div
class=
"date d-flex flex-column"
><span>
{{createdAtDay}}
</span><span>
{{createdAtTime}}
</span></div>
<div
class=
"date d-flex flex-column"
><span>
{{createdAtDay}}
</span><span>
{{createdAtTime}}
</span></div>
{{/isToday}}
<div
class=
"read d-flex align-items-end"
><span></span></div>
<div
class=
"read d-flex align-items-end"
><span></span></div>
</div>
</div>
\ No newline at end of file
public_new/template/template_user_message.html
View file @
e3cf3b7f
...
@@ -6,6 +6,11 @@
...
@@ -6,6 +6,11 @@
<div
class=
"name"
>
{{from}}
</div>
<div
class=
"name"
>
{{from}}
</div>
<div
class=
"text"
>
{{text}}
</div>
<div
class=
"text"
>
{{text}}
</div>
</div>
</div>
{{#isToday}}
<div
class=
"date d-flex flex-column"
><span></span><span>
{{createdAtTime}}
</span></div>
{{/isToday}}
{{^isToday}}
<div
class=
"date d-flex flex-column"
><span>
{{createdAtDay}}
</span><span>
{{createdAtTime}}
</span></div>
<div
class=
"date d-flex flex-column"
><span>
{{createdAtDay}}
</span><span>
{{createdAtTime}}
</span></div>
{{/isToday}}
<div
class=
"read d-flex align-items-end"
><span></span></div>
<div
class=
"read d-flex align-items-end"
><span></span></div>
</div>
</div>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment