[NEW] Omnichannel Beta (#1674)
After Width: | Height: | Size: 488 B |
After Width: | Height: | Size: 759 B |
After Width: | Height: | Size: 820 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.5 KiB |
|
@ -32,6 +32,8 @@ const RoomTypeIcon = React.memo(({
|
||||||
return <Image source={{ uri: 'hashtag' }} style={[styles.style, style, { width: size, height: size, tintColor: color }]} />;
|
return <Image source={{ uri: 'hashtag' }} style={[styles.style, style, { width: size, height: size, tintColor: color }]} />;
|
||||||
} if (type === 'd') {
|
} if (type === 'd') {
|
||||||
return <CustomIcon name='at' size={13} style={[styles.style, styles.discussion, { color }]} />;
|
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 }]} />;
|
return <Image source={{ uri: 'lock' }} style={[styles.style, style, { width: size, height: size, tintColor: color }]} />;
|
||||||
});
|
});
|
||||||
|
|
|
@ -949,7 +949,7 @@ const RocketChat = {
|
||||||
},
|
},
|
||||||
roomTypeToApiType(t) {
|
roomTypeToApiType(t) {
|
||||||
const types = {
|
const types = {
|
||||||
c: 'channels', d: 'im', p: 'groups'
|
c: 'channels', d: 'im', p: 'groups', l: 'channels'
|
||||||
};
|
};
|
||||||
return types[t];
|
return types[t];
|
||||||
},
|
},
|
||||||
|
|
|
@ -14,9 +14,12 @@ export const onNotification = (notification) => {
|
||||||
} = EJSON.parse(data.ejson);
|
} = EJSON.parse(data.ejson);
|
||||||
|
|
||||||
const types = {
|
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 = {
|
const params = {
|
||||||
host,
|
host,
|
||||||
|
|
|
@ -13,7 +13,7 @@ import EventEmitter from '../utils/events';
|
||||||
import { appStart } from '../actions';
|
import { appStart } from '../actions';
|
||||||
|
|
||||||
const roomTypes = {
|
const roomTypes = {
|
||||||
channel: 'c', direct: 'd', group: 'p'
|
channel: 'c', direct: 'd', group: 'p', channels: 'l'
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleInviteLink = function* handleInviteLink({ params, requireLogin = false }) {
|
const handleInviteLink = function* handleInviteLink({ params, requireLogin = false }) {
|
||||||
|
|
|
@ -349,7 +349,10 @@ class RoomActionsView extends React.Component {
|
||||||
renderItem: this.renderItem
|
renderItem: this.renderItem
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
} else if (t === 'l') {
|
||||||
|
sections[2].data = [notificationsAction];
|
||||||
}
|
}
|
||||||
|
|
||||||
return sections;
|
return sections;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ class RoomInfoView extends React.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const permissions = await RocketChat.hasPermission([PERMISSION_EDIT_ROOM], room.rid);
|
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 });
|
navigation.setParams({ showEdit: true });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,8 @@ const Icon = React.memo(({ type, status, theme }) => {
|
||||||
icon = 'thread';
|
icon = 'thread';
|
||||||
} else if (type === 'c') {
|
} else if (type === 'c') {
|
||||||
icon = 'hashtag';
|
icon = 'hashtag';
|
||||||
|
} else if (type === 'l') {
|
||||||
|
icon = 'livechat';
|
||||||
} else {
|
} else {
|
||||||
icon = 'lock';
|
icon = 'lock';
|
||||||
}
|
}
|
||||||
|
|
|
@ -380,8 +380,7 @@ class RoomsListView extends React.Component {
|
||||||
.get('subscriptions')
|
.get('subscriptions')
|
||||||
.query(
|
.query(
|
||||||
Q.where('archived', false),
|
Q.where('archived', false),
|
||||||
Q.where('open', true),
|
Q.where('open', true)
|
||||||
Q.where('t', Q.notEq('l'))
|
|
||||||
)
|
)
|
||||||
.observeWithColumns(['room_updated_at', 'unread', 'alert', 'user_mentions', 'f', 't']);
|
.observeWithColumns(['room_updated_at', 'unread', 'alert', 'user_mentions', 'f', 't']);
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 488 B |
After Width: | Height: | Size: 820 B |
After Width: | Height: | Size: 1.3 KiB |