Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
e1937ef
first working state of matterbridge PoC, server side only
Aug 11, 2020
5486c64
check if participant is moderator for all bridge related actions
Aug 12, 2020
15b94b4
implement UI for matterbridge management
Aug 12, 2020
2fa346e
add 'check all' bridge manager method
Aug 12, 2020
ec55933
fix relaunch when check, add new default part for my room, clean matt…
Aug 13, 2020
5532cfb
small design improvement
Aug 13, 2020
da8730d
check bridge process when getting it
Aug 13, 2020
784323d
implement method to kill zombie matterbridge processes
Aug 13, 2020
328fe65
stupid
Aug 13, 2020
2504198
Adjust the design of bridge basic settings
gary-kim Aug 14, 2020
7c588e9
design detail
Aug 14, 2020
b3399bc
php lint
Aug 14, 2020
3b2845d
add label to all inputs
Aug 14, 2020
71b0414
add a few systems
Aug 16, 2020
ebb2d83
factorize parts in one versatile component
Aug 17, 2020
b76e7ee
avoid deletion of my part
Aug 17, 2020
0eb911c
add discord and telegram
Aug 17, 2020
2b0ad77
add steam
Aug 17, 2020
f1f78e7
add zulip
Aug 17, 2020
67f6aa5
first round of design fixes
Aug 17, 2020
c2df67b
add info links (to mb doc) for all bridge type
Aug 17, 2020
b550604
simplify part management now that there is no local part in UI, get r…
Aug 17, 2020
8b1d5fa
fix after first review
Aug 17, 2020
6b824b4
lint fix
Aug 17, 2020
09b053e
create bot user if it does not exist
Aug 18, 2020
01a0114
begin to manage bot access token
Aug 18, 2020
a960586
generate new room-specific app token when enabling bridge, revoke all…
Aug 19, 2020
ae873eb
add doc
Aug 19, 2020
18ab5f2
new DB table to store bridge configs
Aug 19, 2020
260494d
set avatar to brige bot user
Aug 19, 2020
298f0d9
review fixes
Aug 19, 2020
824674a
directly load image content
Aug 19, 2020
a8c3f51
change config key for bot password
Aug 20, 2020
c1d761c
rebased to get settings tab, + another round of fixes
Aug 20, 2020
efb28a4
improve insert/update in bridge table
Aug 20, 2020
f931672
Use room object from enviroment
nickvergessen Aug 20, 2020
df0f9ec
log debug info, level 1
Aug 20, 2020
9b83640
lint fix
Aug 20, 2020
9ed27b3
basic toggle matterbridge via admin settings
Aug 21, 2020
8013641
stop all bridges when disabling admin setting
Aug 21, 2020
452c7dc
lint
Aug 21, 2020
4bacb51
lint2
Aug 21, 2020
90d758c
lint3
Aug 21, 2020
4ecff56
Adjust design of Matterbridge integration
jancborchardt Aug 21, 2020
9a94fb3
tab replacement
Aug 21, 2020
6d0b2c8
Allow to install the Matterbridge app directly in the Talk settings
nickvergessen Aug 24, 2020
6ee5c04
Move stopAllBridges to a controller without a Room
nickvergessen Aug 24, 2020
be31ca6
Fix migration
nickvergessen Aug 24, 2020
791f831
Only available for admins
nickvergessen Aug 24, 2020
d112702
Simple ticks without parameters
nickvergessen Aug 24, 2020
1c8004f
Add a description to the admin settings
nickvergessen Aug 24, 2020
f1269e0
settings routes before conversation specific ones
nickvergessen Aug 24, 2020
4ad2f3b
Make installing feel smoother and explain the timeout
nickvergessen Aug 24, 2020
a7ca2c7
Rename to Matterbridge everywhere
nickvergessen Aug 24, 2020
4700152
Fix unit tests
nickvergessen Aug 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
factorize parts in one versatile component
Signed-off-by: Julien Veyssier <[email protected]>
  • Loading branch information
Julien Veyssier authored and nickvergessen committed Aug 25, 2020
commit ebb2d83fea7261d87f105b7df5deba9ff896ceda
316 changes: 235 additions & 81 deletions src/components/BridgeSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,43 +48,17 @@
<ul>
<li>
<hr>
<TalkBridgePart v-if="myPart"
<BridgePart v-if="myPart"
:num="0"
:part="myPart" />
:part="myPart"
:type="thisRoomType" />
</li>
<li v-for="(part, i) in editableParts" :key="i">
<hr>
<TalkBridgePart v-if="part.type === 'nctalk'"
:num="i+1"
:part="part"
@deletePart="onDelete(i)" />
<MattermostBridgePart v-if="part.type === 'mattermost'"
:num="i+1"
:part="part"
@deletePart="onDelete(i)" />
<MatrixBridgePart v-if="part.type === 'matrix'"
:num="i+1"
:part="part"
@deletePart="onDelete(i)" />
<RocketchatBridgePart v-if="part.type === 'rocketchat'"
:num="i+1"
:part="part"
@deletePart="onDelete(i)" />
<SlackBridgePart v-if="part.type === 'slack'"
:num="i+1"
:part="part"
@deletePart="onDelete(i)" />
<IrcBridgePart v-if="part.type === 'irc'"
:num="i+1"
:part="part"
@deletePart="onDelete(i)" />
<MsteamsBridgePart v-if="part.type === 'msteams'"
:num="i+1"
:part="part"
@deletePart="onDelete(i)" />
<XmppBridgePart v-if="part.type === 'xmpp'"
<BridgePart
:num="i+1"
:part="part"
:type="types[part.type]"
@deletePart="onDelete(i)" />
</li>
</ul>
Expand All @@ -101,29 +75,15 @@ import { showSuccess } from '@nextcloud/dialogs'
import ActionCheckbox from '@nextcloud/vue/dist/Components/ActionCheckbox'
import ActionButton from '@nextcloud/vue/dist/Components/ActionButton'
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
import TalkBridgePart from './RightSidebar/Bridge/TalkBridgePart'
import MatrixBridgePart from './RightSidebar/Bridge/MatrixBridgePart'
import MattermostBridgePart from './RightSidebar/Bridge/MattermostBridgePart'
import RocketchatBridgePart from './RightSidebar/Bridge/RocketchatBridgePart'
import SlackBridgePart from './RightSidebar/Bridge/SlackBridgePart'
import IrcBridgePart from './RightSidebar/Bridge/IrcBridgePart'
import MsteamsBridgePart from './RightSidebar/Bridge/MsteamsBridgePart'
import XmppBridgePart from './RightSidebar/Bridge/XmppBridgePart'
import BridgePart from './RightSidebar/Bridge/BridgePart'

export default {
name: 'BridgeSettings',
components: {
ActionCheckbox,
ActionButton,
Multiselect,
TalkBridgePart,
MatrixBridgePart,
MattermostBridgePart,
RocketchatBridgePart,
SlackBridgePart,
IrcBridgePart,
MsteamsBridgePart,
XmppBridgePart,
BridgePart,
},

mixins: [
Expand All @@ -137,40 +97,228 @@ export default {
enabled: false,
parts: [],
loading: false,
formatedTypes: [
{
displayName: t('spreed', 'Nextcloud Talk'),
type: 'nctalk',
types: {
nctalk: {
name: t('spreed', 'Nextcloud Talk'),
fields: {
server: {
type: 'url',
placeholder: t('spreed', 'Nextcloud URL'),
icon: 'icon-link',
},
login: {
type: 'text',
placeholder: t('spreed', 'Nextcloud user'),
icon: 'icon-user',
},
password: {
type: 'password',
placeholder: t('spreed', 'User password'),
icon: 'icon-category-auth',
},
channel: {
type: 'text',
placeholder: t('spreed', 'Talk room'),
icon: 'icon-group',
},
},
},
{
displayName: t('spreed', 'Matrix'),
type: 'matrix',
matrix: {
name: t('spreed', 'Matrix'),
fields: {
server: {
type: 'url',
placeholder: t('spreed', 'Matrix server URL'),
icon: 'icon-link',
},
login: {
type: 'text',
placeholder: t('spreed', 'User'),
icon: 'icon-user',
},
password: {
type: 'password',
placeholder: t('spreed', 'User password'),
icon: 'icon-category-auth',
},
channel: {
type: 'text',
placeholder: t('spreed', 'Matrix channel'),
icon: 'icon-group',
},
},
},
{
displayName: t('spreed', 'Mattermost'),
type: 'mattermost',
mattermost: {
name: t('spreed', 'Mattermost'),
fields: {
server: {
type: 'url',
placeholder: t('spreed', 'Mattermost server URL'),
icon: 'icon-link',
},
login: {
type: 'text',
placeholder: t('spreed', 'Mattermost user'),
icon: 'icon-user',
},
password: {
type: 'password',
placeholder: t('spreed', 'User password'),
icon: 'icon-category-auth',
},
team: {
type: 'text',
placeholder: t('spreed', 'Team name'),
icon: 'icon-group',
},
channel: {
type: 'text',
placeholder: t('spreed', 'Channel name'),
icon: 'icon-group',
},
},
},
{
displayName: t('spreed', 'Rocket.Chat'),
type: 'rocketchat',
rocketchat: {
name: t('spreed', 'Rocket.Chat'),
fields: {
server: {
type: 'url',
placeholder: t('spreed', 'Rocket.Chat server URL'),
icon: 'icon-link',
},
login: {
type: 'text',
placeholder: t('spreed', 'User name or e-mail address'),
icon: 'icon-user',
},
password: {
type: 'password',
placeholder: t('spreed', 'Password'),
icon: 'icon-category-auth',
},
channel: {
type: 'text',
placeholder: t('spreed', 'Rocket.Chat channel'),
icon: 'icon-group',
},
},
},
{
displayName: t('spreed', 'Slack'),
type: 'slack',
slack: {
name: t('spreed', 'Slack'),
fields: {
token: {
type: 'password',
placeholder: t('spreed', 'API token'),
icon: 'icon-category-auth',
},
channel: {
type: 'text',
placeholder: t('spreed', 'Slack channel'),
icon: 'icon-group',
},
},
},
{
displayName: t('spreed', 'IRC'),
type: 'irc',
irc: {
name: t('spreed', 'IRC'),
fields: {
server: {
type: 'url',
placeholder: t('spreed', 'IRC server URL'),
icon: 'icon-link',
},
nick: {
type: 'text',
placeholder: t('spreed', 'Nickname'),
icon: 'icon-user',
},
password: {
type: 'password',
placeholder: t('spreed', 'Password'),
icon: 'icon-category-auth',
},
channel: {
type: 'text',
placeholder: t('spreed', 'IRC channel'),
icon: 'icon-group',
},
},
},
{
displayName: t('spreed', 'Microsoft Teams'),
type: 'msteams',
msteams: {
name: t('spreed', 'Microsoft Teams'),
fields: {
tenantid: {
type: 'text',
placeholder: t('spreed', 'Tenant ID'),
icon: 'icon-user',
},
clientid: {
type: 'password',
placeholder: t('spreed', 'Client ID'),
icon: 'icon-user',
},
teamid: {
type: 'text',
placeholder: t('spreed', 'Team ID'),
icon: 'icon-category-auth',
},
threadid: {
type: 'text',
placeholder: t('spreed', 'Thread ID'),
icon: 'icon-group',
},
},
},
{
displayName: t('spreed', 'Xmpp/Jabber'),
type: 'xmpp',
xmpp: {
name: t('spreed', 'Xmpp/Jabber'),
fields: {
server: {
type: 'url',
placeholder: t('spreed', 'Xmpp/Jabber server URL'),
icon: 'icon-link',
},
muc: {
type: 'url',
placeholder: t('spreed', 'MUC server URL'),
icon: 'icon-link',
},
jid: {
type: 'text',
placeholder: t('spreed', 'Jabber ID'),
icon: 'icon-user',
},
nick: {
type: 'text',
placeholder: t('spreed', 'Nickname'),
icon: 'icon-user',
},
password: {
type: 'password',
placeholder: t('spreed', 'Password'),
icon: 'icon-category-auth',
},
channel: {
type: 'text',
placeholder: t('spreed', 'Channel'),
icon: 'icon-group',
},
},
},
],
},
thisRoomType: {
name: t('spreed', 'This room'),
fields: {
login: {
type: 'text',
placeholder: t('spreed', 'Nextcloud user'),
icon: 'icon-user',
},
password: {
type: 'password',
placeholder: t('spreed', 'User password'),
icon: 'icon-category-auth',
},
},
},
newPartPlaceholder: t('spreed', 'Add new bridge'),
selectedType: null,
}
Expand All @@ -188,6 +336,15 @@ export default {
this.getBridge(token)
return token
},
formatedTypes() {
return Object.keys(this.types).map((k) => {
const t = this.types[k]
return {
displayName: t.name,
type: k,
}
})
},
editableParts() {
return this.parts.filter((p) => {
return p.type !== 'nctalk' || p.channel !== this.token
Expand All @@ -208,16 +365,13 @@ export default {

methods: {
clickAddPart() {
const type = this.selectedType.type
const typeKey = this.selectedType.type
const type = this.types[typeKey]
const newPart = {
type,
server: '',
login: '',
password: '',
channel: '',
type: typeKey,
}
if (type === 'mattermost') {
newPart.team = ''
for (const fieldKey in type.fields) {
newPart[fieldKey] = ''
}
this.parts.unshift(newPart)
this.selectedType = null
Expand Down
Loading