mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-04-19 14:33:04 +03:00
Little Fix
This commit is contained in:
parent
d0b92f8e64
commit
bfb3511e8e
5 changed files with 32 additions and 2 deletions
|
@ -51,11 +51,11 @@ public static UserAuthResponse mToken(String code, VkApiClient vk) {
|
||||||
LaunchServer.server.config.OAuthAppSecret,
|
LaunchServer.server.config.OAuthAppSecret,
|
||||||
LaunchServer.server.config.getOAuthBackURL(),
|
LaunchServer.server.config.getOAuthBackURL(),
|
||||||
code).execute();
|
code).execute();
|
||||||
return authResponse;
|
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} catch (ClientException e) {
|
} catch (ClientException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
return authResponse;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -314,6 +314,16 @@ function doOAuth() {
|
||||||
makeOAuthRequest(function (result) {
|
makeOAuthRequest(function (result) {
|
||||||
openURL(new java.net.URL(result.URL));
|
openURL(new java.net.URL(result.URL));
|
||||||
overlay.hide(600000, function () {
|
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);
|
setCurrentScene(menuScene);
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -127,6 +127,11 @@ function makeOAuthRequest(callback) {
|
||||||
task.updateMessage("Ожидание авторизация на сервере");
|
task.updateMessage("Ожидание авторизация на сервере");
|
||||||
startTask(task);
|
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) {
|
function launchClient(assetHDir, clientHDir, profile, params, callback) {
|
||||||
|
|
|
@ -157,10 +157,26 @@ .auth {
|
||||||
-fx-effect: dropshadow(gaussian, rgba(23, 25, 29, 0.3), 15, 0, 0, 3);
|
-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:hover,
|
||||||
.auth:pressed {
|
.auth:pressed {
|
||||||
-fx-background-color: #75e18c;
|
-fx-background-color: #75e18c;
|
||||||
}
|
}
|
||||||
|
.vkauth:hover,
|
||||||
|
.vkauth:pressed {
|
||||||
|
-fx-background-color: #75e18c;
|
||||||
|
}
|
||||||
|
|
||||||
#password,
|
#password,
|
||||||
#login {
|
#login {
|
||||||
|
|
|
@ -15,7 +15,6 @@ public final class OAuthRequest extends Request<AuthRequestEvent> implements Req
|
||||||
|
|
||||||
public OAuthRequest(HWID hwid)
|
public OAuthRequest(HWID hwid)
|
||||||
{
|
{
|
||||||
LogHelper.info("Requesting");
|
|
||||||
this.hwid = hwid;
|
this.hwid = hwid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue