diff --git a/www/css/app.css b/www/css/app.css index 0db2219..5348695 100644 --- a/www/css/app.css +++ b/www/css/app.css @@ -26,4 +26,29 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. #settings-bin .card .item-icon { font-size: 6em; height: 1.23em; -} \ No newline at end of file +} + +.usericon { + border: 2px solid white; + border-radius: 50%; + height: 50px; + width: 50px; + display: inline-block; + overflow: hidden; +} + +.usericon svg { + width: 100%; + height: 100%; + /* Make it a bit bigger so we can't see the sides */ + transform: scale(1.1); +} + +.usericon-2x { + height: 100px; + width: 100px; +} + +.flex-wrap { + flex-wrap: wrap; +} diff --git a/www/css/home.css b/www/css/home.css index 21fd564..8841969 100644 --- a/www/css/home.css +++ b/www/css/home.css @@ -47,22 +47,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. background-position: top 5px left 0px; } -.usericon { - border: 2px solid white; - border-radius: 50%; - height: 50px; - width: 50px; - display: inline-block; - overflow: hidden; -} - -.usericon svg { - width: 100%; - height: 100%; - /* Make it a bit bigger so we can't see the sides */ - transform: scale(1.1); -} - #playerinfo .usericon { flex-shrink: 0; } diff --git a/www/js/profile.js b/www/js/profile.js index 01b5c21..bf694ab 100644 --- a/www/js/profile.js +++ b/www/js/profile.js @@ -6,5 +6,17 @@ function loadProfile() { - + callAPI("getprofile", { + username: localStorage.getItem("username"), + password: localStorage.getItem("password"), + id: $(".page[data-name=profile]").data("playerid") + }, function (data) { + console.log(data); + $(".playerinfoflex").addClass("color-theme-" + SETTINGS.teams[data.profile.teamid].color); + $("#playericon .usericon").html(getAvatarIcon(data.profile.id, data.profile.teamid)); + $("#playerteaminfo").html(" " + SETTINGS.teams[data.profile.teamid].name); + $("#playerlevelinfo").html("Level " + data.profile.level * 1); + }, function (err) { + app.dialog.alert(msg, "Error"); + }); } \ No newline at end of file diff --git a/www/pages/profile.html b/www/pages/profile.html index d2aad34..1850be0 100644 --- a/www/pages/profile.html +++ b/www/pages/profile.html @@ -6,12 +6,24 @@