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
df948a8d
Commit
df948a8d
authored
May 03, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also allow a single-user chat to be embedded into the page
parent
4c15ac2e
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
78 additions
and
106 deletions
+78
-106
Makefile
Makefile
+0
-6
css/converse.css
css/converse.css
+13
-11
dev.html
dev.html
+3
-0
sass/_embedded.scss
sass/_embedded.scss
+10
-10
sass/converse.scss
sass/converse.scss
+1
-1
src/build-no-dependencies.js
src/build-no-dependencies.js
+3
-3
src/build.js
src/build.js
+4
-5
src/config.js
src/config.js
+1
-1
src/converse-core.js
src/converse-core.js
+2
-7
src/converse-embedded.js
src/converse-embedded.js
+40
-19
src/converse-muc-embedded.js
src/converse-muc-embedded.js
+0
-42
src/converse.js
src/converse.js
+1
-1
No files found.
Makefile
View file @
df948a8d
...
...
@@ -185,8 +185,6 @@ BUILDS = dist/converse.js \
dist/converse.min.js
\
dist/converse-headless.js
\
dist/converse-headless.min.js
\
dist/converse-muc-embedded.js
\
dist/converse-muc-embedded.min.js
\
dist/converse-no-dependencies.min.js
\
dist/converse-no-dependencies.js
...
...
@@ -209,10 +207,6 @@ dist/converse-no-dependencies.js: transpile src stamp-npm
$(RJS)
-o
src/build-no-dependencies.js
optimize
=
none
out
=
dist/converse-no-dependencies.js
dist/converse-no-dependencies.min.js
:
transpile src stamp-npm
$(RJS)
-o
src/build-no-dependencies.js
out
=
dist/converse-no-dependencies.min.js
dist/converse-muc-embedded.js
:
transpile src stamp-npm
$(RJS)
-o
src/build.js paths.converse
=
src/converse-embedded
include
=
converse
out
=
dist/converse-muc-embedded.js
optimize
=
none
dist/converse-muc-embedded.min.js
:
transpile src stamp-npm
$(RJS)
-o
src/build.js paths.converse
=
src/converse-embedded
include
=
converse
out
=
dist/converse-muc-embedded.min.js
.PHONY
:
dist
dist
::
build
...
...
css/converse.css
View file @
df948a8d
...
...
@@ -8628,21 +8628,23 @@ body.reset {
bottom
:
auto
;
height
:
100%
;
width
:
100%
;
}
#conversejs
.converse-embedded
.flyout
{
bottom
:
0
;
}
#conversejs
.converse-embedded
.chatroom
{
#conversejs
.converse-embedded
.chatbox
{
margin
:
0
;
height
:
100%
;
width
:
100%
;
}
#conversejs
.converse-embedded
.chatbox
.box-flyout
{
#conversejs
.converse-embedded
.chatbox
.flyout.box-flyout
{
bottom
:
0
;
box-shadow
:
none
;
height
:
100%
;
}
height
:
100%
;
min-width
:
auto
;
width
:
100%
;
}
#conversejs
.converse-embedded
.chatbox
.chat-title
{
padding
:
0.3em
;
font-size
:
120%
;
}
#conversejs
.converse-embedded
.chatbox-btn
{
display
:
none
;
}
#conversejs
.converse-embedded
.chatroom
.box-flyout
{
m
in-width
:
auto
;
#conversejs
.converse-embedded
.chatroom
{
m
argin
:
0
;
width
:
100%
;
}
#conversejs
.converse-embedded
.chatroom
.box-flyout
.occupants-heading
{
font-size
:
120%
;
}
...
...
dev.html
View file @
df948a8d
...
...
@@ -65,6 +65,9 @@
notify_all_room_messages
:
[
'
discuss@conference.conversejs.org
'
],
auto_join_private_chats
:
[
'
opkode@jappix.com
'
],
auto_reconnect
:
true
,
// bosh_service_url: 'http://chat.example.org:5280/http-bind/',
bosh_service_url
:
'
https://conversejs.org/http-bind/
'
,
// Please use this connection manager only for testing purposes
...
...
sass/_
muc_
embedded.scss
→
sass/_embedded.scss
View file @
df948a8d
...
...
@@ -21,19 +21,19 @@
width
:
100%
;
}
.flyout
{
bottom
:
0
;
}
.chatroom
{
.chatbox
{
margin
:
0
;
height
:
100%
;
width
:
100%
;
}
.chatbox
{
.box-flyout
{
.flyout.box-flyout
{
bottom
:
0
;
box-shadow
:
none
;
height
:
100%
;
min-width
:
auto
;
width
:
100%
;
}
.chat-title
{
padding
:
0
.3em
;
font-size
:
120%
;
...
...
@@ -43,9 +43,9 @@
display
:
none
;
}
.chatroom
{
.box-flyout
{
min-width
:
auto
;
margin
:
0
;
width
:
100%
;
.box-flyout
{
.occupants-heading
{
font-size
:
120%
;
}
...
...
sass/converse.scss
View file @
df948a8d
...
...
@@ -54,4 +54,4 @@
@import
"converse/minimized_chats"
;
@import
"bookmarks"
;
@import
"awesomplete"
;
@import
"
muc_
embedded"
;
@import
"embedded"
;
src/build-no-dependencies.js
View file @
df948a8d
...
...
@@ -28,12 +28,12 @@
"
converse-core
"
:
"
builds/converse-core
"
,
"
converse-disco
"
:
"
builds/converse-disco
"
,
"
converse-dragresize
"
:
"
builds/converse-dragresize
"
,
"
converse-
headline
"
:
"
builds/converse-headline
"
,
"
converse-
embedded
"
:
"
builds/converse-embedded
"
,
"
converse-fullscreen
"
:
"
builds/converse-fullscreen
"
,
"
converse-headline
"
:
"
builds/converse-headline
"
,
"
converse-mam
"
:
"
builds/converse-mam
"
,
"
converse-minimize
"
:
"
builds/converse-minimize
"
,
"
converse-muc
"
:
"
builds/converse-muc
"
,
"
converse-muc-embedded
"
:
"
builds/converse-muc-embedded
"
,
"
converse-notification
"
:
"
builds/converse-notification
"
,
"
converse-otr
"
:
"
builds/converse-otr
"
,
"
converse-ping
"
:
"
builds/converse-ping
"
,
...
...
@@ -43,9 +43,9 @@
"
converse-rosterview
"
:
"
builds/converse-rosterview
"
,
"
converse-singleton
"
:
"
builds/converse-singleton
"
,
"
converse-vcard
"
:
"
builds/converse-vcard
"
,
"
form-utils
"
:
"
builds/utils/form
"
,
"
i18n
"
:
"
builds/i18n
"
,
"
utils
"
:
"
builds/utils/core
"
,
"
form-utils
"
:
"
builds/utils/form
"
,
"
muc-utils
"
:
"
builds/utils/muc
"
},
wrap
:
{
...
...
src/build.js
View file @
df948a8d
...
...
@@ -11,15 +11,14 @@
"
converse-core
"
:
"
builds/converse-core
"
,
"
converse-disco
"
:
"
builds/converse-disco
"
,
"
converse-dragresize
"
:
"
builds/converse-dragresize
"
,
"
converse-embedded
"
:
"
builds/converse-embedded
"
,
"
converse-fullscreen
"
:
"
builds/converse-fullscreen
"
,
"
converse-headline
"
:
"
builds/converse-headline
"
,
"
converse-http-file-upload
"
:
"
builds/converse-http-file-upload
"
,
"
converse-mam
"
:
"
builds/converse-mam
"
,
"
converse-minimize
"
:
"
builds/converse-minimize
"
,
"
converse-modal
"
:
"
builds/converse-modal
"
,
"
converse-muc
"
:
"
builds/converse-muc
"
,
"
converse-muc-views
"
:
"
builds/converse-muc-views
"
,
"
converse-muc-embedded
"
:
"
builds/converse-muc-embedded
"
,
"
converse-notification
"
:
"
builds/converse-notification
"
,
"
converse-otr
"
:
"
builds/converse-otr
"
,
"
converse-ping
"
:
"
builds/converse-ping
"
,
...
...
@@ -29,10 +28,10 @@
"
converse-rosterview
"
:
"
builds/converse-rosterview
"
,
"
converse-singleton
"
:
"
builds/converse-singleton
"
,
"
converse-vcard
"
:
"
builds/converse-vcard
"
,
"
i18n
"
:
"
builds/i18n
"
,
"
utils
"
:
"
builds/utils/core
"
,
"
form-utils
"
:
"
builds/utils/form
"
,
"
muc-utils
"
:
"
builds/utils/muc
"
"
i18n
"
:
"
builds/i18n
"
,
"
muc-utils
"
:
"
builds/utils/muc
"
,
"
utils
"
:
"
builds/utils/core
"
},
wrap
:
{
startFile
:
"
start.frag
"
,
...
...
src/config.js
View file @
df948a8d
...
...
@@ -78,6 +78,7 @@ require.config({
"
converse-core
"
:
"
src/converse-core
"
,
"
converse-disco
"
:
"
src/converse-disco
"
,
"
converse-dragresize
"
:
"
src/converse-dragresize
"
,
"
converse-embedded
"
:
"
src/converse-embedded
"
,
"
converse-fullscreen
"
:
"
src/converse-fullscreen
"
,
"
converse-headline
"
:
"
src/converse-headline
"
,
"
converse-mam
"
:
"
src/converse-mam
"
,
...
...
@@ -85,7 +86,6 @@ require.config({
"
converse-minimize
"
:
"
src/converse-minimize
"
,
"
converse-modal
"
:
"
src/converse-modal
"
,
"
converse-muc
"
:
"
src/converse-muc
"
,
"
converse-muc-embedded
"
:
"
src/converse-muc-embedded
"
,
"
converse-muc-views
"
:
"
src/converse-muc-views
"
,
"
converse-notification
"
:
"
src/converse-notification
"
,
"
converse-otr
"
:
"
src/converse-otr
"
,
...
...
src/converse-core.js
View file @
df948a8d
...
...
@@ -77,7 +77,7 @@
'
converse-core
'
,
'
converse-disco
'
,
'
converse-dragresize
'
,
'
converse-
dropdown
'
,
'
converse-
embedded
'
,
'
converse-fullscreen
'
,
'
converse-headline
'
,
'
converse-http-file-upload
'
,
...
...
@@ -86,7 +86,6 @@
'
converse-minimize
'
,
'
converse-modal
'
,
'
converse-muc
'
,
'
converse-muc-embedded
'
,
'
converse-muc-views
'
,
'
converse-notification
'
,
'
converse-otr
'
,
...
...
@@ -1848,12 +1847,8 @@
_
.
forEach
([
// eslint-disable-line lodash/prefer-map
"
converse-bookmarks
"
,
"
converse-controlbox
"
,
"
converse-dragresize
"
,
"
converse-headline
"
,
"
converse-minimize
"
,
"
converse-otr
"
,
"
converse-register
"
,
"
converse-vcard
"
,
"
converse-register
"
],
(
name
)
=>
{
_converse
.
blacklisted_plugins
.
push
(
name
)
});
...
...
src/converse-embedded.js
View file @
df948a8d
/*global define */
if
(
typeof
define
!==
'
undefined
'
)
{
// The section below determines which plugins will be included in a build
define
([
"
converse-core
"
,
/* START: Removable components
* --------------------
* Any of the following components may be removed if they're not needed.
// Converse.js
// http://conversejs.org
//
// Copyright (c) 2012-2018, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
(
function
(
root
,
factory
)
{
define
([
"
converse-core
"
,
"
converse-muc
"
],
factory
);
}(
this
,
function
(
converse
)
{
"
use strict
"
;
const
{
Backbone
,
_
}
=
converse
.
env
;
converse
.
plugins
.
add
(
'
converse-embedded
'
,
{
enabled
(
_converse
)
{
return
_converse
.
view_mode
===
'
embedded
'
;
},
initialize
()
{
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
"
converse-chatview
"
,
// Renders standalone chat boxes for single user chat
"
converse-mam
"
,
// XEP-0313 Message Archive Management
"
converse-muc
"
,
// XEP-0045 Multi-user chat
"
converse-muc-embedded
"
,
"
converse-ping
"
,
// XEP-0199 XMPP Ping
"
converse-notification
"
,
// HTML5 Notifications
/* END: Removable components */
],
function
(
converse
)
{
return
converse
;
this
.
_converse
.
api
.
settings
.
update
({
'
allow_logout
'
:
false
,
// No point in logging out when we have auto_login as true.
'
allow_muc_invitations
'
:
false
,
// Doesn't make sense to allow because only
// roster contacts can be invited
'
hide_muc_server
'
:
true
});
}
const
{
_converse
}
=
this
;
if
(
!
_
.
isArray
(
_converse
.
auto_join_rooms
)
&&
!
_
.
isArray
(
_converse
.
auto_join_private_chats
))
{
throw
new
Error
(
"
converse-embedded: auto_join_rooms must be an Array
"
);
}
if
(
_converse
.
auto_join_rooms
.
length
!==
1
&&
_converse
.
auto_join_private_chats
.
length
!==
1
)
{
throw
new
Error
(
"
converse-embedded: It doesn't make
"
+
"
sense to have the auto_join_rooms setting to zero or
"
+
"
more then one, since only one chat room can be open
"
+
"
at any time.
"
);
}
}
});
}));
src/converse-muc-embedded.js
deleted
100644 → 0
View file @
4c15ac2e
// Converse.js
// http://conversejs.org
//
// Copyright (c) 2012-2018, the Converse.js developers
// Licensed under the Mozilla Public License (MPLv2)
(
function
(
root
,
factory
)
{
define
([
"
converse-core
"
,
"
converse-muc
"
],
factory
);
}(
this
,
function
(
converse
)
{
"
use strict
"
;
const
{
Backbone
,
_
}
=
converse
.
env
;
converse
.
plugins
.
add
(
'
converse-muc-embedded
'
,
{
enabled
(
_converse
)
{
return
_converse
.
view_mode
===
'
embedded
'
;
},
initialize
()
{
/* The initialize function gets called as soon as the plugin is
* loaded by converse.js's plugin machinery.
*/
this
.
_converse
.
api
.
settings
.
update
({
'
allow_logout
'
:
false
,
// No point in logging out when we have auto_login as true.
'
allow_muc_invitations
'
:
false
,
// Doesn't make sense to allow because only
// roster contacts can be invited
'
hide_muc_server
'
:
true
,
// Federation is disabled, so no use in
// showing the MUC server.
});
const
{
_converse
}
=
this
;
if
(
!
_
.
isArray
(
_converse
.
auto_join_rooms
))
{
throw
new
Error
(
"
converse-muc-embedded: auto_join_rooms must be an Array
"
);
}
if
(
_converse
.
auto_join_rooms
.
length
!==
1
)
{
throw
new
Error
(
"
converse-muc-embedded: It doesn't make
"
+
"
sense to have the auto_join_rooms setting to zero or
"
+
"
more then one, since only one chat room can be open
"
+
"
at any time.
"
);
}
}
});
}));
src/converse.js
View file @
df948a8d
...
...
@@ -11,12 +11,12 @@ if (typeof define !== 'undefined') {
"
converse-chatview
"
,
// Renders standalone chat boxes for single user chat
"
converse-controlbox
"
,
// The control box
"
converse-dragresize
"
,
// Allows chat boxes to be resized by dragging them
"
converse-embedded
"
,
"
converse-fullscreen
"
,
"
converse-headline
"
,
// Support for headline messages
"
converse-mam
"
,
// XEP-0313 Message Archive Management
"
converse-minimize
"
,
// Allows chat boxes to be minimized
"
converse-muc
"
,
// XEP-0045 Multi-user chat
"
converse-muc-embedded
"
,
"
converse-muc-views
"
,
"
converse-muc-views
"
,
// Views related to MUC
"
converse-notification
"
,
// HTML5 Notifications
...
...
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