<div class="main">
    <div class="main_inner clearfix">
      <div class="no_network"><span>当前网络不可用，请检查你的网络设置</span></div>
          <div class="toolbar pull-left" ng-show="!showState.isPhone||!showState.isChat">
              <div class="bar LeftNav">
                  <div class="LeftNav-item" title="我的" ui-sref="main.userinfo">
                      <div class="user">
                        <div id="loginuser" class="portrait" ng-show="!mainData.loginUser.portraitUri">
                          {{mainData.loginUser.firstchar}}
                        </div>
                        <img class="userPic Avatar--22"  ng-show="mainData.loginUser.portraitUri"
                                             ng-src="{{mainData.loginUser.portraitUri||'assets/img/barBg.png'}}">
                          <!-- <i class="Presence Presence--stacked Presence--toolbar"></i> -->
                      </div>
                  </div>
                <div class="LeftNav-item iconfont-single"  title="会话" ng-class="{cur:!switchbtn.isFriendList}" ng-click="switchbtn.isFriendList=false;switchbtn.issearchList=false">
                    <div class="singleChat">
                        <a >single chat</a>
                        <i class="badge bg-tred" ng-show="mainData.conversation.totalUnreadCount>0">{{mainData.conversation.totalUnreadCount>99 ? "99+" : mainData.conversation.totalUnreadCount}}</i>
                    </div>
                </div>
                <div class="LeftNav-item iconfont-group"  title="联系人" ng-class="{cur:switchbtn.isFriendList}" ng-click="switchbtn.isFriendList=true;switchbtn.issearchList=false">
                    <div class="groupChat">
                        <a  >group chat</a>
                        <i class="Presence Presence--stacked" ng-show="mainData.notification.hasNewNotification"></i>
                    </div>
                </div>
                  <div class="LeftNav-item iconfont-add"  addbtn>
                    <div>
                      <a >add</a>
                      <ul class="addPanel" style="display:none">
                          <li id="createGroup"><a  ui-sref="main.creategroup">创建群组</a></li>
                          <li id="addFriends"><a  ui-sref="main.searchfriend">添加好友</a></li>
                          <!-- <li id="addDiscussion"><a  ui-sref="main.discussionaddmember({iscreate: 'true', idorname: ''})">发起聊天</a></li> -->
                          <!-- <li id="addGroup"><a href="javascript:void (0)" ui-sref="main.searchgroup">加入群组</a></li> -->
                      </ul>
                    </div>
                  </div>
              </div>
          </div>
          <div class="mainBox pull-left" ng-show="!showState.isPhone||!showState.isChat">
              <div id="search-friend">
                <search-input search="search(content)"  control="searchControl" delay-time="0" show-text="搜索"></search-input>
              </div>
              <div id="chatArea" class="chatArea" ng-show="!switchbtn.isFriendList&&!switchbtn.issearchList">
                <p class="withoutFriends" style="text-align:center;margin-top: 200px;" ng-show="!mainData.conversation.conversations||!mainData.conversation.conversations.length">您还没有添加会话</p>
                  <conversation ng-repeat="item in mainData.conversation.conversations" item='item'></conversation>
              </div>
              <div class="communicateList" ng-show="switchbtn.isFriendList&&!switchbtn.issearchList">
                  <div class="noticeBar">
                      <div class="noticeBarHeader">新消息</div>
                      <div class="noticeBarBody">
                          <div class="noticeBarList">
                              <div class="notice_item ">
                                  <div class="photo">
                                      <img class="img" src="assets/img/noticeIcon.png" alt="通知">
                                  </div>
                                  <div class="info" ng-click="tonotification()">
                                      <h3 class="nickname">
                                          <span class="nickname_text">新通知</span>
                                      </h3>
                                  </div>
                                  <i class="Presence Presence--noticeBar unread" ng-show="mainData.notification.hasNewNotification"></i>
                              </div>
                          </div>
                      </div>
                  </div>
                  <div class="groupArea">
                      <div class="groupAreaHeader" ng-click="showgroups=!showgroups">群组<span class="caret" ng-class="{'open':!showgroups}"></span></div>
                      <div class="groupAreaBody" ng-show="!showgroups">
                        <groupitem  ng-repeat="item in mainData.contactsList.groupList" item="item" class="noticeBarList"></groupitem>
                      </div>
                  </div>

                  <div class="membersArea">
                      <div class="membersAreaHeader" ng-click="showfriends=!showfriends">联系人<span class="caret" ng-class="{'open':!showfriends}"></span></div>

                      <div class="membersAreaBody" ng-show="!showfriends">
                        <div class="namesortWrap namesortA" ng-repeat="subgroup in mainData.contactsList.subgroupList">
                            <div class="namesortHd">{{subgroup.title}}</div>
                            <frienditem class="members_item " ng-repeat="item in subgroup.list" item="item"></frienditem>
                        </div>
                          <!-- <frienditem ng-repeat="item in mainData.contactsList.friendList" item="item"></frienditem> -->
                      </div>
                  </div>
              </div>
              <div class="communicateList" ng-show="switchbtn.issearchList">
                <div class="membersArea" ng-show="searchList.friendList.length">
                    <div class="membersAreaHeader">联系人</div>
                    <div class="membersAreaBody">
                        <div class="namesortWrap">
                          <frienditem class="members_item "  ng-repeat="item in searchList.friendList" item="item"></frienditem>
                      </div>
                    </div>
                </div>
                <div class="groupArea" ng-show="searchList.groupList.length">
                    <div class="groupAreaHeader">群组</div>
                    <div class="groupAreaBody">
                      <groupitem  ng-repeat="item in searchList.groupList" item="item" class="noticeBarList"></groupitem>
                    </div>
                    <!-- <groupitem  ng-repeat="item in searchList.groupList" item="item"></groupitem> -->
                </div>
              </div>
          </div>

          <div  class="chatBox" ui-view="" ng-show="!showState.isPhone||showState.isChat">
            <div class="drag_area"></div>
            <div class="emptyBox">
            </div>
          </div>
    </div>
    <div class="previewPicLayer"></div>
    <div class="previewPic" ng-keypress="checkSend($event)" tabindex="1">
        <span class="closeBtn"  ng-click="showPasteDiv(false)"></span>
        <h2>发送图片</h2>
        <div class="picWrap">
            <img class="picContent" alt=""/>
        </div>
        <div class="picFooter">
            <button type="button" class="btn" ng-click="showPasteDiv(false)">取消</button>
            <button type="button" class="btn cur" ng-click="uploadPasteImage()">发送</button>
        </div>
    </div>
    <div class="load-container">
        <div class="loader">Loading...</div>
    </div>
    <audio id="playsound" style="width: 0px;height: 0px;display: none;" src="assets/img/sms-received.mp3" controls="controls"></audio>
</div>
