[NEW] Omnichannel Beta (#1674)

This commit is contained in:
Djorkaeff Alexandre 2020-02-07 10:24:16 -03:00 committed by GitHub
parent ba37bb1997
commit b90cf9e486
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 39 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -32,6 +32,8 @@ const RoomTypeIcon = React.memo(({
return <Image source={{ uri: 'hashtag' }} style={[styles.style, style, { width: size, height: size, tintColor: color }]} />;
} if (type === 'd') {
return <CustomIcon name='at' size={13} style={[styles.style, styles.discussion, { color }]} />;
} if (type === 'l') {
return <CustomIcon name='livechat' size={13} style={[styles.style, styles.discussion, { color }]} />;
}
return <Image source={{ uri: 'lock' }} style={[styles.style, style, { width: size, height: size, tintColor: color }]} />;
});

View File

@ -949,7 +949,7 @@ const RocketChat = {
},
roomTypeToApiType(t) {
const types = {
c: 'channels', d: 'im', p: 'groups'
c: 'channels', d: 'im', p: 'groups', l: 'channels'
};
return types[t];
},

View File

@ -14,9 +14,12 @@ export const onNotification = (notification) => {
} = EJSON.parse(data.ejson);
const types = {
c: 'channel', d: 'direct', p: 'group'
c: 'channel', d: 'direct', p: 'group', l: 'channels'
};
const roomName = type === 'd' ? sender.username : name;
let roomName = type === 'd' ? sender.username : name;
if (type === 'l') {
roomName = sender.name;
}
const params = {
host,

View File

@ -13,7 +13,7 @@ import EventEmitter from '../utils/events';
import { appStart } from '../actions';
const roomTypes = {
channel: 'c', direct: 'd', group: 'p'
channel: 'c', direct: 'd', group: 'p', channels: 'l'
};
const handleInviteLink = function* handleInviteLink({ params, requireLogin = false }) {

View File

@ -349,7 +349,10 @@ class RoomActionsView extends React.Component {
renderItem: this.renderItem
});
}
} else if (t === 'l') {
sections[2].data = [notificationsAction];
}
return sections;
}

View File

@ -117,7 +117,7 @@ class RoomInfoView extends React.Component {
}
}
const permissions = await RocketChat.hasPermission([PERMISSION_EDIT_ROOM], room.rid);
if (permissions[PERMISSION_EDIT_ROOM] && !room.prid) {
if (permissions[PERMISSION_EDIT_ROOM] && !room.prid && this.t !== 'l') {
navigation.setParams({ showEdit: true });
}
}

View File

@ -40,6 +40,8 @@ const Icon = React.memo(({ type, status, theme }) => {
icon = 'thread';
} else if (type === 'c') {
icon = 'hashtag';
} else if (type === 'l') {
icon = 'livechat';
} else {
icon = 'lock';
}

View File

@ -380,8 +380,7 @@ class RoomsListView extends React.Component {
.get('subscriptions')
.query(
Q.where('archived', false),
Q.where('open', true),
Q.where('t', Q.notEq('l'))
Q.where('open', true)
)
.observeWithColumns(['room_updated_at', 'unread', 'alert', 'user_mentions', 'f', 't']);

View File

@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "livechat.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "livechat@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "livechat@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB