PLT-6484 Add /leave command to leave a channel (#6402)

* PLT-6484 Add /leave command to leave a channel

* Text changes requeted on review.

* PLT-6484 Display the right error message when trying to /leave town-square

* PLT-6484 Be able to execute /leave command in direct and group message channels with the same effect as clicking x

* PLT-6484 Refactor to create new leave_private_channel_modal.jsx

* PLT-6484 Remove previous leave private channel logic to use new leave_private_channel_modal.jsx

* Remove dot in command description. Change localized error when leaving Town square.

* disable /leave command in reply threads on the right-hand sidebar, since it is not obvious which channel you should leave
Этот коммит содержится в:
David Meza
2017-08-03 07:59:42 -05:00
коммит произвёл Joram Wilander
родитель 19804c4e40
Коммит b54d134299
11 изменённых файлов: 315 добавлений и 119 удалений

Просмотреть файл

@@ -45,6 +45,7 @@ import ImportThemeModal from 'components/user_settings/import_theme_modal.jsx';
import InviteMemberModal from 'components/invite_member_modal.jsx';
import LeaveTeamModal from 'components/leave_team_modal.jsx';
import ResetStatusModal from 'components/reset_status_modal';
import LeavePrivateChannelModal from 'components/modals/leave_private_channel_modal.jsx';
import iNoBounce from 'inobounce';
import * as UserAgent from 'utils/user_agent.jsx';
@@ -231,6 +232,7 @@ export default class NeedsTeam extends React.Component {
<DeletePostModal/>
<RemovedFromChannelModal/>
<ResetStatusModal/>
<LeavePrivateChannelModal/>
</div>
</div>
);