@@ -15,6 +15,12 @@ local dkjson = require "dkjson"
1515
1616local influenceInfo = itemLib .influenceInfo .all
1717
18+ local realmList = {
19+ { label = " PC" , id = " PC" , realmCode = " pc" , hostName = " https://www.pathofexile.com/" , profileURL = " account/view-profile/" },
20+ { label = " Xbox" , id = " XBOX" , realmCode = " xbox" , hostName = " https://www.pathofexile.com/" , profileURL = " account/view-profile/" },
21+ { label = " Sony" , id = " SONY" , realmCode = " sony" , hostName = " https://www.pathofexile.com/" , profileURL = " account/view-profile/" },
22+ }
23+
1824function addOAuthControls (self )
1925 self .usingOauth = true
2026 self .isAuthorized = function () return main .api .authToken ~= nil end
@@ -170,11 +176,6 @@ function addOAuthControls(self)
170176 main .api :DownloadCharacterList (realm .realmCode , onResponse )
171177 end
172178
173- local realmList = {
174- { label = " PC" , id = " PC" , realmCode = " pc" },
175- { label = " Xbox" , id = " XBOX" , realmCode = " xbox" },
176- { label = " Sony" , id = " SONY" , realmCode = " sony" },
177- }
178179 self .controls .accountRealm = new (" DropDownControl" , { " TOPLEFT" , self .controls .charSelectHeader , " BOTTOMLEFT" },
179180 { 0 , rowSpacing , 60 , 20 }, realmList , function ()
180181 setLeaguesFromCharList ()
@@ -293,13 +294,7 @@ function addAccountNameControls(self)
293294 self .controls .siteAccountNameHeader .shown = function ()
294295 return self .charImportMode == " GETACCOUNTNAME"
295296 end
296- local realmList = {
297- { label = " PC" , id = " PC" , realmCode = " pc" , hostName = " https://www.pathofexile.com/" , profileURL = " account/view-profile/" },
298- { label = " Xbox" , id = " XBOX" , realmCode = " xbox" , hostName = " https://www.pathofexile.com/" , profileURL = " account/view-profile/" },
299- { label = " Sony" , id = " SONY" , realmCode = " sony" , hostName = " https://www.pathofexile.com/" , profileURL = " account/view-profile/" },
300- { label = " Hotcool" , id = " PC" , realmCode = " pc" , hostName = " https://pathofexile.tw/" , profileURL = " account/view-profile/" },
301- { label = " Tencent" , id = " PC" , realmCode = " pc" , hostName = " https://poe.game.qq.com/" , profileURL = " account/view-profile/" },
302- }
297+
303298 self .controls .siteAccountRealm = new (" DropDownControl" ,
304299 { " TOPLEFT" , self .controls .siteAccountNameHeader , " BOTTOMLEFT" },
305300 { 0 , 4 , 60 , 20 }, realmList )
0 commit comments