Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
62dc0c49
Commit
62dc0c49
authored
Jul 16, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'linkmauve-better-chat_status'
parents
6717315d
bb5dff9a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
21 deletions
+25
-21
dist/converse.js
dist/converse.js
+12
-10
spec/messages.js
spec/messages.js
+1
-1
src/converse-chatboxes.js
src/converse-chatboxes.js
+4
-2
src/converse-chatview.js
src/converse-chatview.js
+4
-4
src/converse-message-view.js
src/converse-message-view.js
+3
-3
src/utils/core.js
src/utils/core.js
+1
-1
No files found.
dist/converse.js
View file @
62dc0c49
...
@@ -68518,10 +68518,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
...
@@ -68518,10 +68518,12 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}, false);
}, false);
xhr.onerror = () => {
xhr.onerror = () => {
let message
= __('Sorry, could not succesfully upload your file.')
;
let message;
if (xhr.responseText) {
if (xhr.responseText) {
message += ' ' + __('Your server\'s response: "%1$s"', xhr.responseText);
message = __('Sorry, could not succesfully upload your file. Your server’s response: "%1$s"', xhr.responseText);
} else {
message = __('Sorry, could not succesfully upload your file.');
}
}
this.save({
this.save({
...
@@ -70396,13 +70398,13 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
...
@@ -70396,13 +70398,13 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
if (u.isVisible(this.el)) {
if (u.isVisible(this.el)) {
if (show === 'offline') {
if (show === 'offline') {
text =
fullname + ' ' + __('has gone offline'
);
text =
__('%1$s has gone offline', fullname
);
} else if (show === 'away') {
} else if (show === 'away') {
text =
fullname + ' ' + __('has gone away'
);
text =
__('%1$s has gone away', fullname
);
} else if (show === 'dnd') {
} else if (show === 'dnd') {
text =
fullname + ' ' + __('is busy'
);
text =
__('%1$s is busy', fullname
);
} else if (show === 'online') {
} else if (show === 'online') {
text =
fullname + ' ' + __('is online'
);
text =
__('%1$s is online', fullname
);
}
}
if (text) {
if (text) {
...
@@ -74751,16 +74753,16 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
...
@@ -74751,16 +74753,16 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
if (this.model.get('sender') === 'me') {
if (this.model.get('sender') === 'me') {
text = __('Typing from another device');
text = __('Typing from another device');
} else {
} else {
text =
name + ' ' + __('is typing'
);
text =
__('%1$s is typing', name
);
}
}
} else if (this.model.get('chat_state') === _converse.PAUSED) {
} else if (this.model.get('chat_state') === _converse.PAUSED) {
if (this.model.get('sender') === 'me') {
if (this.model.get('sender') === 'me') {
text = __('Stopped typing on the other device');
text = __('Stopped typing on the other device');
} else {
} else {
text =
name + ' ' + __('has stopped typing'
);
text =
__('%1$s has stopped typing', name
);
}
}
} else if (this.model.get('chat_state') === _converse.GONE) {
} else if (this.model.get('chat_state') === _converse.GONE) {
text =
name + ' ' + __('has gone away'
);
text =
__('%1$s has gone away', name
);
} else {
} else {
return;
return;
}
}
...
@@ -87318,7 +87320,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
...
@@ -87318,7 +87320,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
return tpl_file({
return tpl_file({
'url': url,
'url': url,
'label_download': __('Download
: "%1$s
', filename)
'label_download': __('Download
"%1$s"
', filename)
});
});
};
};
spec/messages.js
View file @
62dc0c49
...
@@ -1688,7 +1688,7 @@
...
@@ -1688,7 +1688,7 @@
var
media
=
view
.
el
.
querySelector
(
'
.chat-msg .chat-msg-media
'
);
var
media
=
view
.
el
.
querySelector
(
'
.chat-msg .chat-msg-media
'
);
expect
(
media
.
innerHTML
.
replace
(
/
(\r\n
|
\n
|
\r)
/gm
,
""
)).
toEqual
(
expect
(
media
.
innerHTML
.
replace
(
/
(\r\n
|
\n
|
\r)
/gm
,
""
)).
toEqual
(
'
<!-- src/templates/file.html -->
'
+
'
<!-- src/templates/file.html -->
'
+
'
<a target="_blank" rel="noopener" href="http://localhost/funny.pdf">Download
: "funny.pdf
</a>
'
);
'
<a target="_blank" rel="noopener" href="http://localhost/funny.pdf">Download
"funny.pdf"
</a>
'
);
done
();
done
();
});
});
}));
}));
...
...
src/converse-chatboxes.js
View file @
62dc0c49
...
@@ -217,9 +217,11 @@
...
@@ -217,9 +217,11 @@
},
false
);
},
false
);
xhr
.
onerror
=
()
=>
{
xhr
.
onerror
=
()
=>
{
let
message
=
__
(
'
Sorry, could not succesfully upload your file.
'
)
;
let
message
;
if
(
xhr
.
responseText
)
{
if
(
xhr
.
responseText
)
{
message
+=
'
'
+
__
(
'
Your server
\'
s response: "%1$s"
'
,
xhr
.
responseText
)
message
=
__
(
'
Sorry, could not succesfully upload your file. Your server’s response: "%1$s"
'
,
xhr
.
responseText
)
}
else
{
message
=
__
(
'
Sorry, could not succesfully upload your file.
'
);
}
}
this
.
save
({
this
.
save
({
'
type
'
:
'
error
'
,
'
type
'
:
'
error
'
,
...
...
src/converse-chatview.js
View file @
62dc0c49
...
@@ -1071,13 +1071,13 @@
...
@@ -1071,13 +1071,13 @@
let
text
;
let
text
;
if
(
u
.
isVisible
(
this
.
el
))
{
if
(
u
.
isVisible
(
this
.
el
))
{
if
(
show
===
'
offline
'
)
{
if
(
show
===
'
offline
'
)
{
text
=
fullname
+
'
'
+
__
(
'
has gone offline
'
);
text
=
__
(
'
%1$s has gone offline
'
,
fullname
);
}
else
if
(
show
===
'
away
'
)
{
}
else
if
(
show
===
'
away
'
)
{
text
=
fullname
+
'
'
+
__
(
'
has gone away
'
);
text
=
__
(
'
%1$s has gone away
'
,
fullname
);
}
else
if
((
show
===
'
dnd
'
))
{
}
else
if
((
show
===
'
dnd
'
))
{
text
=
fullname
+
'
'
+
__
(
'
is busy
'
);
text
=
__
(
'
%1$s is busy
'
,
fullname
);
}
else
if
(
show
===
'
online
'
)
{
}
else
if
(
show
===
'
online
'
)
{
text
=
fullname
+
'
'
+
__
(
'
is online
'
);
text
=
__
(
'
%1$s is online
'
,
fullname
);
}
}
if
(
text
)
{
if
(
text
)
{
this
.
content
.
insertAdjacentHTML
(
this
.
content
.
insertAdjacentHTML
(
...
...
src/converse-message-view.js
View file @
62dc0c49
...
@@ -208,16 +208,16 @@
...
@@ -208,16 +208,16 @@
if
(
this
.
model
.
get
(
'
sender
'
)
===
'
me
'
)
{
if
(
this
.
model
.
get
(
'
sender
'
)
===
'
me
'
)
{
text
=
__
(
'
Typing from another device
'
);
text
=
__
(
'
Typing from another device
'
);
}
else
{
}
else
{
text
=
name
+
'
'
+
__
(
'
is typing
'
);
text
=
__
(
'
%1$s is typing
'
,
name
);
}
}
}
else
if
(
this
.
model
.
get
(
'
chat_state
'
)
===
_converse
.
PAUSED
)
{
}
else
if
(
this
.
model
.
get
(
'
chat_state
'
)
===
_converse
.
PAUSED
)
{
if
(
this
.
model
.
get
(
'
sender
'
)
===
'
me
'
)
{
if
(
this
.
model
.
get
(
'
sender
'
)
===
'
me
'
)
{
text
=
__
(
'
Stopped typing on the other device
'
);
text
=
__
(
'
Stopped typing on the other device
'
);
}
else
{
}
else
{
text
=
name
+
'
'
+
__
(
'
has stopped typing
'
);
text
=
__
(
'
%1$s has stopped typing
'
,
name
);
}
}
}
else
if
(
this
.
model
.
get
(
'
chat_state
'
)
===
_converse
.
GONE
)
{
}
else
if
(
this
.
model
.
get
(
'
chat_state
'
)
===
_converse
.
GONE
)
{
text
=
name
+
'
'
+
__
(
'
has gone away
'
);
text
=
__
(
'
%1$s has gone away
'
,
name
);
}
else
{
}
else
{
return
;
return
;
}
}
...
...
src/utils/core.js
View file @
62dc0c49
...
@@ -267,7 +267,7 @@
...
@@ -267,7 +267,7 @@
}
}
return
tpl_file
({
return
tpl_file
({
'
url
'
:
url
,
'
url
'
:
url
,
'
label_download
'
:
__
(
'
Download
: "%1$s
'
,
filename
)
'
label_download
'
:
__
(
'
Download
"%1$s"
'
,
filename
)
})
})
};
};
...
...
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