Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
foreign
/
customer-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
49b18f62
authored
Sep 26, 2021
by
Sixong.Zhu
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix emoji style
parent
9cbccb3a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
4 deletions
components/chat-room.vue
database/index.ts
hybrid-input/index.vue
store/index.ts
components/chat-room.vue
View file @
49b18f62
...
...
@@ -24,7 +24,7 @@
></div>
<div
ref=
"bottom"
class=
"chat-input flex-none
overflow-hidden
h-100"
class=
"chat-input flex-none h-100"
v-if=
"isChatMember"
>
<message-input
@
error=
"onError"
/>
...
...
database/index.ts
View file @
49b18f62
...
...
@@ -17,16 +17,25 @@ class ChatCacheDatabaseController {
if
(
that
.
db
)
{
that
.
buildTables
(
that
.
db
,
that
.
chatListKey
);
that
.
buildTables
(
that
.
db
,
that
.
chatMessageKey
);
console
.
log
(
`build index database for chat completed, 100%`
);
}
resolve
();
};
r
.
onsuccess
=
function
(
e
)
{
that
.
db
=
(
e
.
target
as
any
).
result
;
console
.
log
(
`index database init comepleted, 33%`
);
setupDb
();
};
r
.
onupgradeneeded
=
function
(
e
)
{
that
.
db
=
(
e
.
target
as
any
).
result
;
console
.
log
(
`index database init comepleted, 66%`
);
setupDb
();
};
r
.
onerror
=
function
(
e
)
{
console
.
log
(
`index database init failed,
${
e
}
`
);
};
}
else
{
resolve
();
}
...
...
@@ -124,7 +133,9 @@ class ChatCacheDatabaseController {
source1
.
push
(
item
);
}
}
const
source
=
source1
.
sort
((
x
,
y
)
=>
(
x
.
last_msg_ts
<
y
.
last_msg_ts
?
1
:
-
1
));
const
source
=
source1
.
sort
((
x
,
y
)
=>
x
.
last_msg_ts
<
y
.
last_msg_ts
?
1
:
-
1
);
if
(
this
.
db
)
{
const
store
=
this
.
buildStore
(
this
.
chatListKey
);
...
...
hybrid-input/index.vue
View file @
49b18f62
<
template
>
<div
class=
"input-wrap h-100
overflow-hidden
"
>
<div
class=
"input-wrap h-100"
>
<div
class=
"tool-bar"
>
<img
class=
"tool-bar-icon"
...
...
@@ -635,7 +635,7 @@ export default class Input extends Vue {
.emoji-picker
{
position
:
absolute
;
z-index
:
2
;
bottom
:
99
px
;
top
:
-232
px
;
left
:
-1px
;
background-color
:
#fff
;
padding
:
20px
;
...
...
store/index.ts
View file @
49b18f62
...
...
@@ -32,6 +32,7 @@ function uniqueMessages(
return
all
.
findIndex
((
k
)
=>
k
.
id
===
item
.
id
);
});
}
function
filterMessages
(
messages
:
NonNullable
<
ChatStore
.
STATE_CHAT_MSG_HISTORY
>
,
chatid
:
number
...
...
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