Commit 850dcd11 by Kim Peace

Fixed host change logics

parent ac05490a
...@@ -71,6 +71,7 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function (data) { ...@@ -71,6 +71,7 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function (data) {
case "API_SEND_OWNER_CHANGE_COMPLETE": case "API_SEND_OWNER_CHANGE_COMPLETE":
FermiWebSocketMessageHandler.apiSendOwnerChangeComplete(data); FermiWebSocketMessageHandler.apiSendOwnerChangeComplete(data);
CollaborationFeature.updateHost(); CollaborationFeature.updateHost();
break; break;
case "API_SEND_OWNER_CHANGE_CONFIRM": case "API_SEND_OWNER_CHANGE_CONFIRM":
if (globalUserInfo.collaborationType == COLLABORATION_TYPE.CAMERA) { if (globalUserInfo.collaborationType == COLLABORATION_TYPE.CAMERA) {
...@@ -93,6 +94,10 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function (data) { ...@@ -93,6 +94,10 @@ FermiWebSocketMessageHandler.handleMessagesToAll = function (data) {
} }
CollaborationFeature.updateHost(); CollaborationFeature.updateHost();
break; break;
case "SWITCH_VIDEO":
CollaborationFeature.updateHost();
CollaborationUI.userListSlideOut();
$(".profile_favorite_btn").click();
default: default:
break; break;
} }
......
...@@ -234,6 +234,12 @@ CollaborationFeature.didReceivedJoinRoomInfoResponseMessage = function () { ...@@ -234,6 +234,12 @@ CollaborationFeature.didReceivedJoinRoomInfoResponseMessage = function () {
NativeBridgeDelegate.joinRoom(roomInfo.roomID, roomInfo.roomName); NativeBridgeDelegate.joinRoom(roomInfo.roomID, roomInfo.roomName);
}; };
CoviewBridge.changeHostFromModal = function () {
const userID = $("#changeHostModal").data("bs.modal")._config.collaborationid
// call in agent_app.js
coview_api.HostChange(userID);
};
CoviewBridge.changeHost = function (userID) { CoviewBridge.changeHost = function (userID) {
// call in agent_app.js // call in agent_app.js
coview_api.HostChange(userID); coview_api.HostChange(userID);
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
<span>キャンセル</span> <span>キャンセル</span>
</div> </div>
</button> </button>
<button type="button" onclick="CoviewBridge.changeHost({{shopMemberId}});" class="profile_chat_btn border-0 bg_blue text_white"> <button type="button" onclick="CoviewBridge.changeHostFromModal();"
class="profile_chat_btn border-0 bg_blue text_white">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<span>引き渡し</span> <span>引き渡し</span>
</div> </div>
......
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
<button type="button" class="border-0 bg_navy" <button type="button" class="border-0 bg_navy"
onclick="CollaborationUI.removeFavoriteUserInCollaboration({{shopMemberId}})" id="favoriteButton"> onclick="CollaborationUI.removeFavoriteUserInCollaboration({{shopMemberId}})" id="favoriteButton">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<span class="star active shopmember_{{shopMemberId}}" onclick="CHAT_UI.favoriteUserChange('{{shopMemberId}}',this)"></span> <span class="star active shopmember_{{shopMemberId}}"
onclick="CHAT_UI.favoriteUserChange('{{shopMemberId}}',this)"></span>
<span>お気に入り解除</span> <span>お気に入り解除</span>
</div> </div>
</button> </button>
...@@ -31,14 +32,16 @@ ...@@ -31,14 +32,16 @@
<button type="button" class="border-0 bg_navy" <button type="button" class="border-0 bg_navy"
onclick="CollaborationUI.insertFavoriteUserInCollaboration({{shopMemberId}})" id="favoriteButton"> onclick="CollaborationUI.insertFavoriteUserInCollaboration({{shopMemberId}})" id="favoriteButton">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<span class="star disable shopmember_{{shopMemberId}}" onclick="Namecard.favoriteUserChange('{{shopMemberId}}',this)"></span> <span class="star disable shopmember_{{shopMemberId}}"
onclick="Namecard.favoriteUserChange('{{shopMemberId}}',this)"></span>
<span>お気に入り登録</span> <span>お気に入り登録</span>
</div> </div>
</button> </button>
{{/isFavorite}} {{/isFavorite}}
{{#isHost}} {{#isHost}}
<button type="button" class="ch_host_btn border-0 bg_green text_white" <button type="button" class="ch_host_btn border-0 bg_green text_white" data-toggle="modal"
onclick="FermiWebSocketBridge.requestHostChange('{{collaborationId}}');"> data-target="#changeHostModal" value="#profileModal2" data-collaborationId='{{collaborationId}}'>
<!-- onclick="FermiWebSocketBridge.requestHostChange('{{collaborationId}}');"> -->
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<div class="img_wrap"> <div class="img_wrap">
<img src="icon/icon_change_host.svg" alt="ホスト変更"> <img src="icon/icon_change_host.svg" alt="ホスト変更">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment