Little Fix

This commit is contained in:
JoshOOOWAH 2019-05-27 15:12:11 +05:00
parent d0b92f8e64
commit bfb3511e8e
5 changed files with 32 additions and 2 deletions

View file

@ -51,11 +51,11 @@ public static UserAuthResponse mToken(String code, VkApiClient vk) {
LaunchServer.server.config.OAuthAppSecret,
LaunchServer.server.config.getOAuthBackURL(),
code).execute();
return authResponse;
} catch (ApiException e) {
e.printStackTrace();
} catch (ClientException e) {
e.printStackTrace();
}
return authResponse;
}
}

View file

@ -314,6 +314,16 @@ function doOAuth() {
makeOAuthRequest(function (result) {
openURL(new java.net.URL(result.URL));
overlay.hide(600000, function () {
setCurrentScene(loginScene);
});
return result;
})
makeWaitAuth(function (result) {
FunctionalBridge.setAuthParams(result);
loginData = { pp: result.playerProfile , accessToken: result.accessToken, permissions: result.permissions,
auth_type: settings.auth};
overlay.hide(0, function () {
setCurrentScene(menuScene);
});
return result;

View file

@ -127,6 +127,11 @@ function makeOAuthRequest(callback) {
task.updateMessage("Ожидание авторизация на сервере");
startTask(task);
}
function makeOAuthRequest(callback) {
var task = newRequestTask(new OAuthRequest(FunctionalBridge.getHWID()));
processing.setTaskProperties(task, callback, null, true);
startTask(task);
}
function launchClient(assetHDir, clientHDir, profile, params, callback) {

View file

@ -157,10 +157,26 @@ .auth {
-fx-effect: dropshadow(gaussian, rgba(23, 25, 29, 0.3), 15, 0, 0, 3);
}
.vkauth {
-jfx-button-type: FLAT;
-fx-background-radius: 0;
-fx-font-size: 0pt;
-fx-background-image: url('images/icons/vk.png');
-fx-background-repeat: no-repeat;
-fx-pref-width: 62px;
-fx-pref-height: 62px;
-fx-effect: dropshadow(gaussian, rgba(23, 25, 29, 0.3), 15, 0, 0, 3);
}
.auth:hover,
.auth:pressed {
-fx-background-color: #75e18c;
}
.vkauth:hover,
.vkauth:pressed {
-fx-background-color: #75e18c;
}
#password,
#login {

View file

@ -15,7 +15,6 @@ public final class OAuthRequest extends Request<AuthRequestEvent> implements Req
public OAuthRequest(HWID hwid)
{
LogHelper.info("Requesting");
this.hwid = hwid;
}