Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
MManoah committed Aug 27, 2020
1 parent 42ac422 commit 3b3289b
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 17 deletions.
14 changes: 13 additions & 1 deletion src/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ img {
}
#friendName {
cursor: text;
margin-top: 110px;
margin-top: 0px;
}
#lobbyMember {
cursor: text;
Expand Down Expand Up @@ -349,3 +349,15 @@ dd{
padding-bottom: 1px;
cursor: pointer;
}
.lobbyInfo{
color: white;
margin: 0;
font-size: 25px;
line-height: 20px;
}
#topLobbyInfo{
margin-top: 20px;
}
#postGame{
cursor: text;
}
29 changes: 20 additions & 9 deletions src/html/club.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
<div class="dragtop"></div>
<div class="clubPage">
<h1 id="sClub">Select A Club</h1>
<h4 class="clubT">
*Logout and Log Back In If It Doesn't Work*
</h4>
<h4 class="clubT">*Logout and Log Back In If It Doesn't Work*</h4>
<h4 class="clubT">*And Restart This Program*</h4>
<h4 class="clubT">*You must also be in a club first*</h4>
<h4 class="clubT">*User Clubs is located in config/clubs.json*</h4>
Expand All @@ -18,10 +16,10 @@ <h4 class="clubT">*User Clubs is located in config/clubs.json*</h4>
onblur="this.size=1;"
onchange="this.size=1; this.blur();"
>
<option disabled selected value> Choose a Club </option>
<option disabled selected value>Choose a Club</option>
<option class="club" value="clubName">clubName</option>
</select>
<br>
<br />
<select
name="clubs2"
id="customClubs"
Expand All @@ -30,9 +28,14 @@ <h4 class="clubT">*User Clubs is located in config/clubs.json*</h4>
onblur="this.size=1;"
onchange="this.size=1; this.blur();"
>
<option disabled selected value> User Clubs </option>
<option disabled selected value>User Clubs</option>
</select>

<h4 class="lobbyInfo" id="topLobbyInfo">
*Enter summoners name, they MUST be connected to the chat.
</h4>
<h4 class="lobbyInfo">
If they left the lobby, it will not work*
</h4>
<br />
<div class="clubData">
<input
Expand All @@ -47,15 +50,23 @@ <h4 class="clubT">*User Clubs is located in config/clubs.json*</h4>
type="text"
id="champSelect"
class="form-control"
placeholder="Champ Select Member"
placeholder="Champ Select Lobby"
/>
</div>
<div class="clubData">
<input
type="text"
id="postGame"
class="form-control"
placeholder="Post Game Lobby"
/>
</div>
<div class="clubData">
<input
type="text"
id="lobbyMember"
class="form-control"
placeholder="Custom Game Member"
placeholder="Custom/Party Lobby"
/>
</div>
<div class="clubData">
Expand Down
13 changes: 7 additions & 6 deletions src/javascript/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ class ClientConnection {
url: this.url,
};
this.#endpoints = {
presetIcon: "/lol-summoner/v1/current-summoner/icon",
lolChat: "/lol-chat/v1/me",
aram: "/lol-champ-select/v1/team-boost/purchase",
profile: "/lol-summoner/v1/current-summoner/summoner-profile",
friends: "/lol-chat/v1/friends",
conversations: "/lol-chat/v1/conversations",
presetIcon: "/lol-summoner/v1/current-summoner/icon/",
lolChat: "/lol-chat/v1/me/",
aram: "/lol-champ-select/v1/team-boost/purchase/",
profile: "/lol-summoner/v1/current-summoner/summoner-profile/",
friends: "/lol-chat/v1/friends/",
conversations: "/lol-chat/v1/conversations/",
};
}

Expand Down Expand Up @@ -204,6 +204,7 @@ class ClientConnection {
options["method"] = "GET";
request(options, function (error, response) {
let summoners = JSON.parse(response.body);
console.log(summoners);
for (let i = 0; i < summoners.length; i++) {
let currentSummoner = summoners[i];
if (currentSummoner.name.toUpperCase() === summonerSearch) {
Expand Down
11 changes: 10 additions & 1 deletion src/javascript/club.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var clubCode = document.getElementById("clubCode");
var friendName = document.getElementById("friendName");
var lobbyMember = document.getElementById("lobbyMember");
var champSelectMem = document.getElementById("champSelect");
var postGameMem = document.getElementById("postGame");
var getClubData = document.getElementById("getClubData");
var customClubs = document.getElementById("customClubs");
var fs = require("fs");
Expand Down Expand Up @@ -69,7 +70,8 @@ function getClub(sendRequest) {
clubCode.value === "" &&
friendName.value === "" &&
lobbyMember.value === "" &&
champSelectMem.value === ""
champSelectMem.value === "" &&
postGameMem.value === ""
) {
return dialog.showErrorBox(
"Error",
Expand All @@ -84,6 +86,13 @@ function getClub(sendRequest) {
sendRequest,
clubInfo
);
} else if (postGameMem.value !== "") {
LeagueClient.requestClub(
"postGame",
champSelectMem.value.toUpperCase(),
sendRequest,
clubInfo
);
} else if (lobbyMember.value !== "") {
LeagueClient.requestClub(
"customGame",
Expand Down

0 comments on commit 3b3289b

Please sign in to comment.