Commit 78fc68b4 by Kang Donghun

テストコミット

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