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
496d2521
Commit
496d2521
authored
Jul 17, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
muc: Show room domain in header.
Also make sure room name gets saved once it's been updated.
parent
49dd36dd
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
81 additions
and
46 deletions
+81
-46
CHANGES.md
CHANGES.md
+4
-0
css/converse.css
css/converse.css
+20
-13
css/inverse.css
css/inverse.css
+20
-13
sass/_chatbox.scss
sass/_chatbox.scss
+3
-2
sass/_chatrooms.scss
sass/_chatrooms.scss
+16
-11
sass/converse/_variables.scss
sass/converse/_variables.scss
+1
-0
sass/inverse/_variables.scss
sass/inverse/_variables.scss
+1
-0
src/converse-muc.js
src/converse-muc.js
+15
-6
src/templates/chatroom_head.html
src/templates/chatroom_head.html
+1
-1
No files found.
CHANGES.md
View file @
496d2521
...
@@ -21,6 +21,10 @@
...
@@ -21,6 +21,10 @@
instead of jQuery's Deferred. [jcbrand]
instead of jQuery's Deferred. [jcbrand]
-
#866 Add babel in order to support ES2015 syntax [jcbrand]
-
#866 Add babel in order to support ES2015 syntax [jcbrand]
#### Bugfixes:
-
Room name wasn't being updated after changing it in the configuration form. [jcbrand]
## 3.1.1 (2017-07-12)
## 3.1.1 (2017-07-12)
-
Use a patched version of
[
awesomplete
](
https://github.com/LeaVerou/awesomplete
)
-
Use a patched version of
[
awesomplete
](
https://github.com/LeaVerou/awesomplete
)
...
...
css/converse.css
View file @
496d2521
...
@@ -1522,10 +1522,11 @@
...
@@ -1522,10 +1522,11 @@
#converse-embedded-chat
.chatbox
.chat-title
,
#converse-embedded-chat
.chatbox
.chat-title
,
#conversejs
.chatbox
.chat-title
{
#conversejs
.chatbox
.chat-title
{
color
:
white
;
color
:
white
;
line-height
:
15px
;
display
:
block
;
display
:
block
;
line-height
:
15px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
white-space
:
nowrap
;
}
#converse-embedded-chat
.chatbox
.chat-title
a
,
#converse-embedded-chat
.chatbox
.chat-title
a
,
#conversejs
.chatbox
.chat-title
a
{
#conversejs
.chatbox
.chat-title
a
{
color
:
white
;
color
:
white
;
...
@@ -2402,17 +2403,23 @@
...
@@ -2402,17 +2403,23 @@
#conversejs
.chat-head-chatroom
.chatbox-btn.button-on
{
#conversejs
.chat-head-chatroom
.chatbox-btn.button-on
{
background-color
:
white
;
background-color
:
white
;
color
:
#E77051
;
}
color
:
#E77051
;
}
#converse-embedded-chat
.chat-head-chatroom
.chatroom-description
,
#converse-embedded-chat
.chat-head-chatroom
.chat-title
,
#conversejs
.chat-head-chatroom
.chatroom-description
{
#conversejs
.chat-head-chatroom
.chat-title
{
color
:
white
;
color
:
#FF977C
;
}
font-size
:
80%
;
#converse-embedded-chat
.chat-head-chatroom
.chat-title
.chatroom-name
,
font-style
:
italic
;
#conversejs
.chat-head-chatroom
.chat-title
.chatroom-name
{
height
:
1.3em
;
color
:
white
;
}
overflow
:
hidden
;
#converse-embedded-chat
.chat-head-chatroom
.chat-title
.chatroom-description
,
text-overflow
:
ellipsis
;
#conversejs
.chat-head-chatroom
.chat-title
.chatroom-description
{
white-space
:
nowrap
;
color
:
white
;
margin
:
0
;
font-size
:
80%
;
margin-top
:
0.3em
;
}
font-style
:
italic
;
height
:
1.3em
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
margin
:
0
;
margin-top
:
0.3em
;
}
#converse-embedded-chat
.chatroom
,
#converse-embedded-chat
.chatroom
,
#conversejs
.chatroom
{
#conversejs
.chatroom
{
width
:
300px
;
}
width
:
300px
;
}
...
...
css/inverse.css
View file @
496d2521
...
@@ -1568,10 +1568,11 @@ body {
...
@@ -1568,10 +1568,11 @@ body {
#converse-embedded-chat
.chatbox
.chat-title
,
#converse-embedded-chat
.chatbox
.chat-title
,
#conversejs
.chatbox
.chat-title
{
#conversejs
.chatbox
.chat-title
{
color
:
white
;
color
:
white
;
line-height
:
15px
;
display
:
block
;
display
:
block
;
line-height
:
15px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
white-space
:
nowrap
;
}
#converse-embedded-chat
.chatbox
.chat-title
a
,
#converse-embedded-chat
.chatbox
.chat-title
a
,
#conversejs
.chatbox
.chat-title
a
{
#conversejs
.chatbox
.chat-title
a
{
color
:
white
;
color
:
white
;
...
@@ -2518,17 +2519,23 @@ body {
...
@@ -2518,17 +2519,23 @@ body {
#conversejs
.chat-head-chatroom
.chatbox-btn.button-on
{
#conversejs
.chat-head-chatroom
.chatbox-btn.button-on
{
background-color
:
white
;
background-color
:
white
;
color
:
#E77051
;
}
color
:
#E77051
;
}
#converse-embedded-chat
.chat-head-chatroom
.chatroom-description
,
#converse-embedded-chat
.chat-head-chatroom
.chat-title
,
#conversejs
.chat-head-chatroom
.chatroom-description
{
#conversejs
.chat-head-chatroom
.chat-title
{
color
:
white
;
color
:
#FF977C
;
}
font-size
:
80%
;
#converse-embedded-chat
.chat-head-chatroom
.chat-title
.chatroom-name
,
font-style
:
italic
;
#conversejs
.chat-head-chatroom
.chat-title
.chatroom-name
{
height
:
1.3em
;
color
:
white
;
}
overflow
:
hidden
;
#converse-embedded-chat
.chat-head-chatroom
.chat-title
.chatroom-description
,
text-overflow
:
ellipsis
;
#conversejs
.chat-head-chatroom
.chat-title
.chatroom-description
{
white-space
:
nowrap
;
color
:
white
;
margin
:
0
;
font-size
:
80%
;
margin-top
:
0.3em
;
}
font-style
:
italic
;
height
:
1.3em
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
margin
:
0
;
margin-top
:
0.3em
;
}
#converse-embedded-chat
.chatroom
,
#converse-embedded-chat
.chatroom
,
#conversejs
.chatroom
{
#conversejs
.chatroom
{
width
:
300px
;
}
width
:
300px
;
}
...
...
sass/_chatbox.scss
View file @
496d2521
...
@@ -100,10 +100,11 @@
...
@@ -100,10 +100,11 @@
}
}
.chat-title
{
.chat-title
{
color
:
$chat-head-text-color
;
color
:
$chat-head-text-color
;
line-height
:
15px
;
display
:
block
;
display
:
block
;
text-overflow
:
ellipsis
;
line-height
:
15px
;
overflow
:
hidden
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
a
{
a
{
color
:
$chat-head-text-color
;
color
:
$chat-head-text-color
;
width
:
100%
;
width
:
100%
;
...
...
sass/_chatrooms.scss
View file @
496d2521
...
@@ -19,17 +19,22 @@
...
@@ -19,17 +19,22 @@
color
:
$chatroom-head-color
;
color
:
$chatroom-head-color
;
}
}
}
}
.chat-title
{
.chatroom-description
{
color
:
$chatroom-color-lightest
;
color
:
white
;
.chatroom-name
{
font-size
:
80%
;
color
:
white
;
font-style
:
italic
;
}
height
:
1
.3em
;
.chatroom-description
{
overflow
:
hidden
;
color
:
white
;
text-overflow
:
ellipsis
;
font-size
:
80%
;
white-space
:
nowrap
;
font-style
:
italic
;
margin
:
0
;
height
:
1
.3em
;
margin-top
:
0
.3em
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
margin
:
0
;
margin-top
:
0
.3em
;
}
}
}
}
}
...
...
sass/converse/_variables.scss
View file @
496d2521
...
@@ -120,6 +120,7 @@ $font-path: "../fonticons/fonts/" !default;
...
@@ -120,6 +120,7 @@ $font-path: "../fonticons/fonts/" !default;
$chatroom-width
:
300px
!
default
;
$chatroom-width
:
300px
!
default
;
$chatroom-head-color
:
$red
!
default
;
$chatroom-head-color
:
$red
!
default
;
$chatroom-color-light
:
$light-red
!
default
;
$chatroom-color-light
:
$light-red
!
default
;
$chatroom-color-lightest
:
$light-red
!
default
;
$chatroom-color-dark
:
$darkest-red
!
default
;
$chatroom-color-dark
:
$darkest-red
!
default
;
$chatroom-message-them-color
:
$green
!
default
;
$chatroom-message-them-color
:
$green
!
default
;
$chatroom-toolbar-color
:
$reddish-white
!
default
;
$chatroom-toolbar-color
:
$reddish-white
!
default
;
...
...
sass/inverse/_variables.scss
View file @
496d2521
...
@@ -125,6 +125,7 @@ $chatroom-head-height: 62px !default;
...
@@ -125,6 +125,7 @@ $chatroom-head-height: 62px !default;
$chatroom-width
:
300px
!
default
;
$chatroom-width
:
300px
!
default
;
$chatroom-head-color
:
$red
!
default
;
$chatroom-head-color
:
$red
!
default
;
$chatroom-color-light
:
$light-red
!
default
;
$chatroom-color-light
:
$light-red
!
default
;
$chatroom-color-lightest
:
$light-red
!
default
;
$chatroom-color-dark
:
$darkest-red
!
default
;
$chatroom-color-dark
:
$darkest-red
!
default
;
$chatroom-message-them-color
:
$green
!
default
;
$chatroom-message-them-color
:
$green
!
default
;
$chatroom-toolbar-color
:
$reddish-white
!
default
;
$chatroom-toolbar-color
:
$reddish-white
!
default
;
...
...
src/converse-muc.js
View file @
496d2521
...
@@ -342,7 +342,15 @@
...
@@ -342,7 +342,15 @@
* are correct, for example that the "type" is set to
* are correct, for example that the "type" is set to
* "chatroom".
* "chatroom".
*/
*/
settings
=
_
.
assign
({
'
type
'
:
CHATROOMS_TYPE
},
settings
);
settings
=
_
.
assign
({
'
name
'
:
Strophe
.
unescapeNode
(
Strophe
.
getNodeFromJid
(
settings
.
jid
)
),
'
domain
'
:
Strophe
.
getDomainFromJid
(
settings
.
jid
),
'
type
'
:
CHATROOMS_TYPE
,
},
settings
);
return
_converse
.
chatboxviews
.
showChat
(
settings
);
return
_converse
.
chatboxviews
.
showChat
(
settings
);
};
};
...
@@ -1284,7 +1292,9 @@
...
@@ -1284,7 +1292,9 @@
});
});
$form
.
on
(
'
submit
'
,
(
ev
)
=>
{
$form
.
on
(
'
submit
'
,
(
ev
)
=>
{
ev
.
preventDefault
();
ev
.
preventDefault
();
this
.
saveConfiguration
(
ev
.
target
);
this
.
saveConfiguration
(
ev
.
target
).
then
(
this
.
getRoomFeatures
.
bind
(
this
)
);
});
});
},
},
...
@@ -1434,8 +1444,9 @@
...
@@ -1434,8 +1444,9 @@
* <feature var='urn:xmpp:mam:0'/>
* <feature var='urn:xmpp:mam:0'/>
*/
*/
const
features
=
{
const
features
=
{
'
features_fetched
'
:
true
'
features_fetched
'
:
true
,
};
'
name
'
:
iq
.
querySelector
(
'
identity
'
).
getAttribute
(
'
name
'
)
}
_
.
each
(
iq
.
querySelectorAll
(
'
feature
'
),
function
(
field
)
{
_
.
each
(
iq
.
querySelectorAll
(
'
feature
'
),
function
(
field
)
{
const
fieldname
=
field
.
getAttribute
(
'
var
'
);
const
fieldname
=
field
.
getAttribute
(
'
var
'
);
if
(
!
fieldname
.
startsWith
(
'
muc_
'
))
{
if
(
!
fieldname
.
startsWith
(
'
muc_
'
))
{
...
@@ -2623,8 +2634,6 @@
...
@@ -2623,8 +2634,6 @@
const
chatroom
=
_converse
.
openChatRoom
({
const
chatroom
=
_converse
.
openChatRoom
({
'
id
'
:
room_jid
,
'
id
'
:
room_jid
,
'
jid
'
:
room_jid
,
'
jid
'
:
room_jid
,
'
name
'
:
Strophe
.
unescapeNode
(
Strophe
.
getNodeFromJid
(
room_jid
)),
'
type
'
:
CHATROOMS_TYPE
,
'
box_id
'
:
b64_sha1
(
room_jid
),
'
box_id
'
:
b64_sha1
(
room_jid
),
'
password
'
:
$x
.
attr
(
'
password
'
)
'
password
'
:
$x
.
attr
(
'
password
'
)
});
});
...
...
src/templates/chatroom_head.html
View file @
496d2521
...
@@ -3,6 +3,6 @@
...
@@ -3,6 +3,6 @@
<a
class=
"chatbox-btn configure-chatroom-button icon-wrench"
title=
"{{{info_configure}}} "
></a>
<a
class=
"chatbox-btn configure-chatroom-button icon-wrench"
title=
"{{{info_configure}}} "
></a>
{[ } ]}
{[ } ]}
<div
class=
"chat-title"
title=
"{{{jid}}}"
>
<div
class=
"chat-title"
title=
"{{{jid}}}"
>
{{{ name
}}}
<span
class=
"chatroom-name"
>
{{{ name }}}
</span>
@{{{ domain
}}}
<p
class=
"chatroom-description"
>
{{{ description }}}
<p/>
<p
class=
"chatroom-description"
>
{{{ description }}}
<p/>
</div>
</div>
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