Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

Commit

Permalink
Version 1.1.3
Browse files Browse the repository at this point in the history
Fixed some little things still not progress on getting profile image and the script that counts all your friends
  • Loading branch information
RoxyBoxxy committed Aug 27, 2018
1 parent eb69ef0 commit 7ef67a3
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 38 deletions.
4 changes: 3 additions & 1 deletion config.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.roxyboxxy.vrchub" version="1.1.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="com.roxyboxxy.vrchub" version="1.1.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>VRChat Mobile</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="[email protected]" href="http://cordova.io">
Apache Cordova Team
</author>
<icon density="mdpi" height="57" platform="ios" src="res\icon\android\icon-96-xhdpi.png" width="57" />
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
Expand All @@ -19,6 +20,7 @@
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<plugin name="cordova-plugin-firebase" spec="^1.0.5" />
<engine name="android" spec="^7.0.0" />
<engine name="browser" spec="^5.0.4" />
</widget>
21 changes: 10 additions & 11 deletions www/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = $("<img>").attr({src: icon,id:"myicon"});
var $name= $("<div>").text("N/A");
var $name = $("<div>").text("logged in as " + name);
var $onfr = $("<div>").attr({id:"onfr" ,title:"onlinefriends"});
var $allfr = $("<div>").attr({id:"allfr",title:"allfriends"}).text(" Friends");
var $allfr = $("<div>").attr({id:"allfr",title:"allfriends"}).text(" / " + fr_num + " friends");
$("#userpanel").empty().append($img).append($name).append($onfr).append($allfr);


Expand All @@ -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){
Expand Down Expand Up @@ -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"]);

Expand All @@ -190,7 +190,7 @@ function showfriends(data){
$("#friends").append($newli);

});
}
}
function preset_in(str){
return " in " + str;
}
Expand Down Expand Up @@ -324,7 +324,7 @@ function login(){
//�ł��Ȃ�������token���Â��Ƃ������ƂȂ̂�reqtoken�ōX�V����
reqToken(
(data)=>{
//setUserdata(data);
//�擾�ɐ���������setUserdata���ĕ\��
loginsuccess(data);
},()=>{
//�擾�Ɏ��s�������\��error:���O�C���ł��܂����ł���
Expand Down Expand Up @@ -356,7 +356,6 @@ function logout(){
$("#loginpanel").show();
$("#friendspanel").hide();
$("#userpanel").hide();
$("#profile").hide();
loginstatusclear();
backgroundsend("logout");
}
Expand Down
12 changes: 12 additions & 0 deletions www/popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -66,6 +73,7 @@ margin-top: 5px;
}
a{
color:#FFF;
padding-left: 27%;
}
a:hover{
color:#5555FF;
Expand All @@ -74,4 +82,8 @@ a:hover{
#friends {
position: relative;
right: 26px;
padding-left: 27%;
}
#displayNamestyle{
padding-left: 27%;
}
27 changes: 1 addition & 26 deletions www/popup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

$(document).ready(function(){

if(islogin()){
Expand Down Expand Up @@ -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");
})
});
91 changes: 91 additions & 0 deletions www/profile.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<!DOCTYPE HTML>
<!--
Forty by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
<head>
<title>Forty by HTML5 UP</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="stylesheet" href="assets/css/main.css" />
<noscript><link rel="stylesheet" href="assets/css/noscript.css" /></noscript>
<script src="jquery-1.12.4.min.js"></script>

<script src="popup.js"></script>
<link rel="stylesheet" type="text/css" href="popup.css">

</head>
<body class="is-preload">

<!-- Wrapper -->
<div id="wrapper">

<!-- Header -->
<header id="header" class="alt">
<a href="index.html" class="logo"><strong>VRChat Mobile</strong></a>
<nav>
<a href="#menu">Menu</a>
</nav>
</header>

<!-- Menu -->
<nav id="menu">
<ul class="actions stacked">
<li>
<li><a href="index.html" class="button fit">Freinds</a></li>


<div id="loginpanel">
<div>
<div class="info">username:</div><input type="text" id="username" size="20"></input>
</div>
<div>
<div class="info">password:</div><input type="password" id="password" size="20"></input>
</div>
<div>
<button type="button" id="login">Login</button>
</div>
<hr />
</div>
</li>
<li><a id="logout" class="button fit">Logout</a></li>
<li><a href="#settings" class="button fit">Settings</a></li>
<li>
<a>Version 1.1B</a>
</li>
</ul>
</nav>

<!-- Banner -->


<!-- Main -->


<div id="userpanel">
</div>


<!-- Contact -->


<!-- Footer -->


</div>

<!-- Scripts -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/jquery.scrolly.min.js"></script>
<script src="assets/js/jquery.scrollex.min.js"></script>
<script src="assets/js/browser.min.js"></script>
<script src="assets/js/breakpoints.min.js"></script>
<script src="assets/js/util.js"></script>
<script src="assets/js/main.js"></script>
<script src="main.js"></script>
<script src="popup.js"></script>

</body>
</html>

0 comments on commit 7ef67a3

Please sign in to comment.