Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Madara
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
Madara
Commits
c5a1a5e2
Commit
c5a1a5e2
authored
Sep 29, 2019
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/viitto/madara
parents
536bdf24
1d7fc82c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
14 deletions
+20
-14
index.vue
src/renderer/components/msssage/index.vue
+19
-10
contenteditor.vue
src/renderer/components/tools/contenteditor.vue
+1
-4
No files found.
src/renderer/components/msssage/index.vue
View file @
c5a1a5e2
...
@@ -112,8 +112,11 @@
...
@@ -112,8 +112,11 @@
<div
class=
"msgbase"
>
<div
class=
"msgbase"
>
<div
class=
"last"
>
<div
class=
"last"
>
<span
class=
"at-me"
v-if=
"session.atId"
>
[有人@我]
</span>
<span
class=
"at-me"
v-if=
"session.atId"
>
[有人@我]
</span>
<span
v-if=
"session.isMute && session.unread>0"
>
[
{{
session
.
unread
}}
]
</span>
<tenplate
v-if=
"session.isMute && session.unread>0 && !session.historiMsg"
>
{{
session
.
lastMsgShow
}}
<span>
[
{{
session
.
unread
}}
]
</span>
</tenplate>
<span
v-if=
"!session.historiMsg"
>
{{
session
.
lastMsgShow
}}
</span>
<span
v-if=
"session.historiMsg && currentSession.id !== session.id"
style=
"color: red"
>
[草稿]
</span>
{{
session
.
historiMsg
}}
</div>
</div>
<div
class=
"no-tip"
v-if=
"session.isMute"
>
<div
class=
"no-tip"
v-if=
"session.isMute"
>
<i
class=
"iconfont iconmiandarao-kai"
></i>
<i
class=
"iconfont iconmiandarao-kai"
></i>
...
@@ -155,8 +158,11 @@
...
@@ -155,8 +158,11 @@
<div
class=
"msgbase"
>
<div
class=
"msgbase"
>
<div
class=
"last"
>
<div
class=
"last"
>
<span
class=
"at-me"
v-if=
"session.atId"
>
[有人@我]
</span>
<span
class=
"at-me"
v-if=
"session.atId"
>
[有人@我]
</span>
<span
v-if=
"session.isMute && session.unread>0"
>
[
{{
session
.
unread
}}
]
</span>
<tenplate
v-if=
"session.isMute && session.unread>0 && !session.historiMsg"
>
{{
session
.
lastMsgShow
}}
<span>
[
{{
session
.
unread
}}
]
</span>
</tenplate>
<span
v-if=
"!session.historiMsg"
>
{{
session
.
lastMsgShow
}}
</span>
<span
v-if=
"session.historiMsg && currentSession.id !== session.id"
style=
"color: red"
>
[草稿]
</span>
{{
session
.
historiMsg
}}
</div>
</div>
<div
class=
"no-tip"
v-if=
"session.isMute"
>
<div
class=
"no-tip"
v-if=
"session.isMute"
>
<i
class=
"iconfont iconmiandarao-kai"
></i>
<i
class=
"iconfont iconmiandarao-kai"
></i>
...
@@ -328,10 +334,7 @@ export default {
...
@@ -328,10 +334,7 @@ export default {
this
.
$electron
.
ipcRenderer
.
send
(
"close-team-box"
);
this
.
$electron
.
ipcRenderer
.
send
(
"close-team-box"
);
this
.
$store
.
dispatch
(
'resetNoMoreHistoryMsgs'
);
this
.
$store
.
dispatch
(
'resetNoMoreHistoryMsgs'
);
this
.
currentSession
.
id
=
''
;
this
.
currentSession
.
id
=
''
;
let
_this
=
this
;
this
.
currentSession
=
session
;
// setTimeout(()=>{
_this
.
currentSession
=
session
;
// }, 20)
if
(
session
.
atId
){
if
(
session
.
atId
){
this
.
clearAtMe
()
this
.
clearAtMe
()
this
.
atIds
=
session
.
atId
this
.
atIds
=
session
.
atId
...
@@ -453,6 +456,9 @@ export default {
...
@@ -453,6 +456,9 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
MsgBus
.
$on
(
'change-historic'
,
function
(){
console
.
log
(
"asdasd 哈哈哈哈"
)
})
this
.
audio_base
=
this
.
$electron
.
remote
.
getGlobal
(
"AUDIO_PATH"
)
+
'audio/'
this
.
audio_base
=
this
.
$electron
.
remote
.
getGlobal
(
"AUDIO_PATH"
)
+
'audio/'
if
(
window
.
localStorage
.
top
)
{
if
(
window
.
localStorage
.
top
)
{
this
.
TOPSESSION
=
JSON
.
parse
(
window
.
localStorage
.
top
);
this
.
TOPSESSION
=
JSON
.
parse
(
window
.
localStorage
.
top
);
...
@@ -638,7 +644,6 @@ export default {
...
@@ -638,7 +644,6 @@ export default {
}
}
if
(
item
.
scene
!==
"team"
)
{
if
(
item
.
scene
!==
"team"
)
{
item
.
isMute
=
false
;
item
.
isMute
=
false
;
this
.
$store
.
state
.
mutelist
.
forEach
(
x
=>
{
this
.
$store
.
state
.
mutelist
.
forEach
(
x
=>
{
if
(
x
.
account
==
item
.
to
)
{
if
(
x
.
account
==
item
.
to
)
{
item
.
isMute
=
true
;
item
.
isMute
=
true
;
...
@@ -662,12 +667,16 @@ export default {
...
@@ -662,12 +667,16 @@ export default {
}
}
if
(
historicList
&&
historicList
.
length
>
0
){
if
(
historicList
&&
historicList
.
length
>
0
){
let
sessionlist
=
this
.
sessionlistArr
let
sessionlist
=
this
.
sessionlistArr
historicList
.
map
(
y
=>
{
historicList
.
map
(
(
y
,
i
)
=>
{
if
(
item
.
id
==
y
.
id
)
{
if
(
item
.
id
==
y
.
id
)
{
item
.
historiMsg
=
y
.
innerHTML
item
.
historiMsg
=
y
.
innerHTML
if
(
y
.
innerHTML
.
replace
(
/
\s
+/g
,
""
)
==
''
)
{
historicList
.
splice
(
i
,
1
);
}
}
}
})
})
}
}
window
.
localStorage
.
historicList
=
JSON
.
stringify
(
historicList
)
return
item
;
return
item
;
});
});
if
(
!
this
.
$electron
.
remote
.
getCurrentWindow
().
isVisible
())
{
if
(
!
this
.
$electron
.
remote
.
getCurrentWindow
().
isVisible
())
{
...
...
src/renderer/components/tools/contenteditor.vue
View file @
c5a1a5e2
...
@@ -267,10 +267,6 @@ export default {
...
@@ -267,10 +267,6 @@ export default {
for(let i = 0; i < historicList.length; i++) {
for(let i = 0; i < historicList.length; i++) {
if (this.chatId === historicList[i].id) {
if (this.chatId === historicList[i].id) {
rp = true
rp = true
if (sessionText.replace(/
\
s+/g,"") == '') {
historicList.splice(i, 1);
break;
}
historicList[i].innerHTML = sessionText
historicList[i].innerHTML = sessionText
break;
break;
}
}
...
@@ -378,6 +374,7 @@ export default {
...
@@ -378,6 +374,7 @@ export default {
while (dom.hasChildNodes()) {
while (dom.hasChildNodes()) {
dom.removeChild(dom.firstChild);
dom.removeChild(dom.firstChild);
}
}
this.changeTxt()
},
},
addContent(txt) {
addContent(txt) {
var txtElement = document.createTextNode(txt);
var txtElement = document.createTextNode(txt);
...
...
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