diff --git a/config.xml b/config.xml index ac78fed4..12624b3f 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - + VRChat Mobile A sample Apache Cordova application that responds to the deviceready event. @@ -7,6 +7,7 @@ Apache Cordova Team + @@ -19,6 +20,7 @@ + diff --git a/www/main.js b/www/main.js index 80822a7d..1505ca7f 100644 --- a/www/main.js +++ b/www/main.js @@ -106,22 +106,21 @@ function reqKey(success,error){ function setUserdata(data){ localStorage["token"] = data["authToken"]; localStorage["user_icon_url"] = data["currentAvatarThumbnailImageUrl"]; - localStorage["user_name"] = data["displayName"].length; + localStorage["api_username"] = data["displayName"]; localStorage["friends_num"] = data["friends"].length; console.log(data); } function showInfo(data){ $("#userpanel").show(); - console.log("xxxx showInfo"); + console.log("Loading User Data"); var icon = localStorage["user_icon_url"]; - var name = localStorage["user_name"]; + var name = localStorage["user"]; var fr_num = localStorage["friends_num"]; - console.log(name) var $img = $("").attr({src: icon,id:"myicon"}); - var $name= $("
").text("N/A"); + var $name = $("
").text("logged in as " + name); var $onfr = $("
").attr({id:"onfr" ,title:"onlinefriends"}); - var $allfr = $("
").attr({id:"allfr",title:"allfriends"}).text(" Friends"); + var $allfr = $("
").attr({id:"allfr",title:"allfriends"}).text(" / " + fr_num + " friends"); $("#userpanel").empty().append($img).append($name).append($onfr).append($allfr); @@ -133,9 +132,10 @@ function reqToken(success,error){ var p = getPassword(); var k = getClientapikey(); - sendReqCommand({user:u,pass:p,key:k,type:"basic"},"auth/user",(data)=>{ + sendReqCommand({user:u,pass:p,key:k,type:"auth"},"auth/user",(data)=>{ setUserdata(data); success(data); + console.log("connected") },error); } function fetchOnlinedata(success){ @@ -175,7 +175,7 @@ function showfriends(data){ src:val["currentAvatarThumbnailImageUrl"], align:"middle" }); - console.log("name ",val["displayName"]); + console.log("****name ",val["displayName"]); var worldid = worldId(val["location"]); var instanceid = instanceId(val["location"]); @@ -190,7 +190,7 @@ function showfriends(data){ $("#friends").append($newli); }); -} + } function preset_in(str){ return " in " + str; } @@ -324,7 +324,7 @@ function login(){ //�ł��Ȃ�������token���Â��Ƃ������ƂȂ̂�reqtoken�ōX�V���� reqToken( (data)=>{ - //setUserdata(data); + //�擾�ɐ���������setUserdata���ĕ\�� loginsuccess(data); },()=>{ //�擾�Ɏ��s�������\��error:���O�C���ł��܂����ł��� @@ -356,7 +356,6 @@ function logout(){ $("#loginpanel").show(); $("#friendspanel").hide(); $("#userpanel").hide(); - $("#profile").hide(); loginstatusclear(); backgroundsend("logout"); } diff --git a/www/popup.css b/www/popup.css index 89acaf94..6d4a2c92 100644 --- a/www/popup.css +++ b/www/popup.css @@ -34,14 +34,21 @@ float:left list-style-type: none; + } img { border-radius: 50%; + } .c_img{ float:left; border-radius: 50%; + padding-right: 10%; + padding-top :5%; + padding-left: 5%; + + } ul li,ol li { list-style-position: none; @@ -66,6 +73,7 @@ margin-top: 5px; } a{ color:#FFF; + padding-left: 27%; } a:hover{ color:#5555FF; @@ -74,4 +82,8 @@ a:hover{ #friends { position: relative; right: 26px; + padding-left: 27%; +} +#displayNamestyle{ + padding-left: 27%; } \ No newline at end of file diff --git a/www/popup.js b/www/popup.js index 501a6804..fa300eb8 100644 --- a/www/popup.js +++ b/www/popup.js @@ -1,4 +1,3 @@ - $(document).ready(function(){ if(islogin()){ @@ -32,30 +31,6 @@ $(document).ready(function(){ }); - $("#soundenable").prop("checked",JSON.parse(localStorage["sound"])); - $("#soundenable").click(()=>{ - localStorage["sound"] = $("#soundenable").prop("checked"); - }); - $("#notificationenable").prop("checked",JSON.parse(localStorage["notification"])); - $("#notificationenable").click(()=>{ - localStorage["notification"] = $("#notificationenable").prop("checked"); - console.log(localStorage["notification"]); - if(isNotification()){ - console.log("notification_on"); - backgroundsend("notification_on"); - }else{ - console.log("notification_off"); - backgroundsend("notification_off"); - } - }); - + - $("#soundvolume").val(JSON.parse(localStorage["volume"])); - $("#soundvolume").on('input change',()=>{ - localStorage["volume"] = $("#soundvolume").val(); }); - $("#soundvolume").mouseup(()=>{ - console.log("soundvolume chaneged"); - backgroundsend("soundplay"); - }) -}); diff --git a/www/profile.html b/www/profile.html new file mode 100644 index 00000000..55b97482 --- /dev/null +++ b/www/profile.html @@ -0,0 +1,91 @@ + + + + + Forty by HTML5 UP + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + \ No newline at end of file