Commit 78fc68b4 by Kang Donghun

テストコミット

parent d1dfba50
...@@ -2739,6 +2739,9 @@ CHAT_UI.makeNameCardInCollaboration = function(shopMemberId) { ...@@ -2739,6 +2739,9 @@ CHAT_UI.makeNameCardInCollaboration = function(shopMemberId) {
}); });
let isCollaborationHost = coview_api.getRoomUsers(); let isCollaborationHost = coview_api.getRoomUsers();
console.log("loginId = " + nameCardInfo.loginId);
let whosHost = $("#collaboration_user_" + nameCardInfo.loginId).hasClass("host");
console.log("whosHost = " + whosHost);
nameCardInfo.profileUrl = CHAT.getProfileImgUrl(nameCardInfo.profileUrl); nameCardInfo.profileUrl = CHAT.getProfileImgUrl(nameCardInfo.profileUrl);
let namecardHtml = Mustache.render(namecardTemplate, { let namecardHtml = Mustache.render(namecardTemplate, {
shopMemberId: nameCardInfo.shopMemberId, shopMemberId: nameCardInfo.shopMemberId,
...@@ -2747,7 +2750,8 @@ CHAT_UI.makeNameCardInCollaboration = function(shopMemberId) { ...@@ -2747,7 +2750,8 @@ CHAT_UI.makeNameCardInCollaboration = function(shopMemberId) {
name: nameCardInfo.shopMemberName, name: nameCardInfo.shopMemberName,
groupPathList: nameCardInfo.groupPathList, groupPathList: nameCardInfo.groupPathList,
isFavorite: nameCardInfo.isFavorite, isFavorite: nameCardInfo.isFavorite,
isHost: isCollaborationHost isHost: isCollaborationHost,
whosHost: whosHost
}); });
let namecardObj = $(jQuery.parseHTML(namecardHtml)).on('click', function() { let namecardObj = $(jQuery.parseHTML(namecardHtml)).on('click', function() {
...@@ -2780,7 +2784,7 @@ CHAT_UI.insertFavoriteUserInCollaboration = function(shopMemberId) { ...@@ -2780,7 +2784,7 @@ CHAT_UI.insertFavoriteUserInCollaboration = function(shopMemberId) {
CHAT_UI.dismissLoadingIndicator(); CHAT_UI.dismissLoadingIndicator();
}; };
CHAT_UI.startPipMode() = function() { CHAT_UI.startPipMode= function() {
if (CHAT_UTIL.isIOS()) { if (CHAT_UTIL.isIOS()) {
} else if (CHAT_UTIL.isAndroid()) { } else if (CHAT_UTIL.isAndroid()) {
android.startPipMode(); android.startPipMode();
......
...@@ -194,7 +194,6 @@ $(function () { ...@@ -194,7 +194,6 @@ $(function () {
coview_api.JoinRoom(globalUserInfo.roomId, globalUserInfo.coWorkType); coview_api.JoinRoom(globalUserInfo.roomId, globalUserInfo.coWorkType);
} }
Coview_moveToVideoShareArea(); Coview_moveToVideoShareArea();
break; break;
case "CreateRoomResponse": case "CreateRoomResponse":
if (json.resultCode == 200) { if (json.resultCode == 200) {
...@@ -287,6 +286,12 @@ $(function () { ...@@ -287,6 +286,12 @@ $(function () {
wc_api.dispatchEvent (new Event ("message"), {"api":"fileChange","fileName":backgroundFileName}); wc_api.dispatchEvent (new Event ("message"), {"api":"fileChange","fileName":backgroundFileName});
} }
break; break;
case "HostRequest":
if (coview_api.getRoomUsers()) {
alert("ホスト変更申請が届きました。UserID : " + json.hostId);
};
console.log('consoleLog', json);
break;
default: default:
console.log("Unrecognized api", json); console.log("Unrecognized api", json);
break; break;
...@@ -336,8 +341,24 @@ function Coview_changeHost(userId) { ...@@ -336,8 +341,24 @@ function Coview_changeHost(userId) {
} }
function Coview_addLoginId(loginId) { function Coview_addLoginId(loginId) {
console.log("addUser loginId = " + loginId); console.log("addUser loginId = " + loginId);
coview_api.addUser(loginId); var url = "https://livetaskyell.abookcloud.com/auth/getuser";
$.ajax({
url : url,
method : 'post',
data : {
id : loginId
},
success : function (result) {
console.log("result", result);
if (result.statusCode != 200) {
coview_api.addUser(loginId);
}
},
error : function (err) {
console.log(err.toString());
}
});
} }
function Coview_connect_audio_collaboration() { function Coview_connect_audio_collaboration() {
...@@ -369,5 +390,11 @@ function hostSearchInterval() { ...@@ -369,5 +390,11 @@ function hostSearchInterval() {
} }
} }
} }
timeInterval = setInterval(hostSearch, 3000); timeInterval = setInterval(hostSearch, 2000);
} }
\ No newline at end of file
function applyForHostChange() {
// coview_api.addEventProcess({"api": "HostRequest", "hostId": CHAT.globalLoginParameter.loginId});
wc_api.dispatchEvent (new Event ("message"), {"api":"HostRequest", "hostId": CHAT.globalLoginParameter.loginId});
// fw.sendToMsg('others', 'CHANGE_HOST_APPLY', {"hostId": CHAT.globalLoginParameter.loginId});
};
\ No newline at end of file
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<span>キャンセル</span> <span>キャンセル</span>
</div> </div>
</button> </button>
<button type="button" class="profile_chat_btn border-0 bg_blue text_white"> <button type="button" class="profile_chat_btn border-0 bg_blue text_white" onclick="applyForHostChange();">
<div class="d-flex flex-column"> <div class="d-flex flex-column">
<span>リクエスト</span> <span>リクエスト</span>
</div> </div>
......
...@@ -48,14 +48,26 @@ ...@@ -48,14 +48,26 @@
</button> </button>
{{/isHost}} {{/isHost}}
{{^isHost}} {{^isHost}}
<button type="button" class="ch_host_btn border-0 bg_grey text_white" onclick="Coview_changeHost('{{loginId}}');" disabled> {{#whosHost}}
<div class="d-flex flex-column"> <button type="button" class="ch_host_btn border-0 bg_blue text_white" data-toggle="modal" data-target="#hostRequestModal" value="#profileModal2">
<div class="img_wrap"> <div class="d-flex flex-column">
<img src="icon/icon_change_host.png" alt="ホスト変更"> <div class="img_wrap">
<img src="icon/icon_change_host.png" alt="ホスト変更">
</div>
<span>ホスト変更</span>
</div> </div>
<span>ホスト変更</span> </button>
</div> {{/whosHost}}
</button> {{^whosHost}}
<button type="button" class="ch_host_btn border-0 bg_grey text_white" data-toggle="modal" data-target="#hostRequestModal" value="#profileModal2" disabled>
<div class="d-flex flex-column">
<div class="img_wrap">
<img src="icon/icon_change_host.png" alt="ホスト変更">
</div>
<span>ホスト変更</span>
</div>
</button>
{{/whosHost}}
{{/isHost}} {{/isHost}}
</div> </div>
</div> </div>
......
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