mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
Update design for updating overlay, minor fix in css file
This commit is contained in:
parent
94b5a07fc9
commit
cbe673140b
4 changed files with 47 additions and 48 deletions
|
@ -59,12 +59,12 @@ function initLoginScene() {
|
|||
savePasswordBox = pane.lookup("#rememberchb");
|
||||
savePasswordBox.setSelected(settings.login === null || settings.rsaPassword !== null);
|
||||
|
||||
authOptions = pane.lookup("#authOptions");
|
||||
|
||||
var link = pane.lookup("#link");
|
||||
link.setText(config.linkText);
|
||||
link.setOnAction(function(event) app.getHostServices().showDocument(config.linkURL.toURI()));
|
||||
|
||||
authOptions = pane.lookup("#authOptions");
|
||||
|
||||
pane.lookup("#goAuth").setOnAction(goAuth);
|
||||
}
|
||||
|
||||
|
@ -187,25 +187,31 @@ function goAuth(event) {
|
|||
return;
|
||||
}
|
||||
|
||||
var rsaPassword = null;
|
||||
if (!passwordField.isDisable()) {
|
||||
var password = passwordField.getText();
|
||||
if (password !== null && !password.isEmpty()) {
|
||||
rsaPassword = settingsOverlay.setPassword(password);
|
||||
} else if (settings.rsaPassword !== null) {
|
||||
rsaPassword = settings.rsaPassword;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
// Get auth
|
||||
/* var auth = authOptions.getSelectionModel().getSelectedItem();
|
||||
if (auth === null) {
|
||||
return; // No auth selected
|
||||
}*/
|
||||
|
||||
settings.rsaPassword = savePasswordBox.isSelected() ? rsaPassword : null;
|
||||
}
|
||||
var rsaPassword = null;
|
||||
if (!passwordField.isDisable()) {
|
||||
var password = passwordField.getText();
|
||||
if (password !== null && !password.isEmpty()) {
|
||||
rsaPassword = settingsOverlay.setPassword(password);
|
||||
} else if (settings.rsaPassword !== null) {
|
||||
rsaPassword = settings.rsaPassword;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
settings.login = login;
|
||||
doAuth(login, rsaPassword);
|
||||
}
|
||||
settings.rsaPassword = savePasswordBox.isSelected() ? rsaPassword : null;
|
||||
}
|
||||
|
||||
/* ======== Console ======== */
|
||||
settings.login = login;
|
||||
doAuth(/*auth, */login, rsaPassword);
|
||||
}
|
||||
|
||||
/* ======== Console ======== */
|
||||
function goConsole(event) {
|
||||
setConsoleCurrentScene(consoleScene);
|
||||
}
|
||||
|
@ -236,18 +242,17 @@ function verifyLauncher(e) {
|
|||
initOffline();
|
||||
}
|
||||
overlay.swap(0, processing.overlay, function(event) makeAuthAvailabilityRequest(function(result) {
|
||||
//result.list;
|
||||
//result.list[0].name;
|
||||
//result.list[0].displayName;
|
||||
result.list.forEach(function(auth_type, i, arr) {
|
||||
//result.list;
|
||||
//result.list[0].name;
|
||||
//result.list[0].displayName;
|
||||
result.list.forEach(function(auth_type, i, arr) {
|
||||
(function() {
|
||||
authOptions.getItems().add(auth_type.displayName);
|
||||
//var sm = authOptions.getSelectionModel();
|
||||
//sm.selectedIndexProperty()["addListener(javafx.beans.value.ChangeListener)"](settings.auth = i);
|
||||
})();
|
||||
|
||||
var serverAuth = new com.jfoenix.controls.JFXComboBox();
|
||||
serverAuth.getStyleClass().add("authOptions");
|
||||
|
||||
(function() {
|
||||
authOptions.getItems().add(auth_type.displayName);
|
||||
})();
|
||||
});
|
||||
});
|
||||
overlay.swap(0, processing.overlay, function(event) makeProfilesRequest(function(result) {
|
||||
settings.lastProfiles = result.profiles;
|
||||
updateProfilesList(result.profiles);
|
||||
|
|
|
@ -10,10 +10,6 @@ #background > #output {
|
|||
-fx-background-radius: 0;
|
||||
-fx-font-family: monospace;
|
||||
-fx-font-size: 8pt;
|
||||
-fx-font-weight: regular;
|
||||
}
|
||||
#background > .textField {
|
||||
-fx-font-weight: regular;
|
||||
}
|
||||
|
||||
#overlay > #output .content,
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
#overlay {
|
||||
-fx-background-color: transparent;
|
||||
-fx-background-size: cover;
|
||||
-fx-pref-width: 693px;
|
||||
-fx-pref-height: 450px;
|
||||
-fx-background-image: url('../../images/background.jpg');
|
||||
}
|
||||
|
||||
|
@ -23,8 +21,6 @@ #overlay > #description.error {
|
|||
|
||||
.downloadPane {
|
||||
-fx-background-color: rgba(0, 0, 0, 0.3);
|
||||
-fx-pref-width: 693px;
|
||||
-fx-pref-height: 450px;
|
||||
}
|
||||
|
||||
/* Progress bar */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import com.jfoenix.controls.JFXProgressBar?>
|
||||
<?import com.jfoenix.controls.JFXSpinner?>
|
||||
<?import java.net.URL?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
|
@ -9,18 +8,21 @@
|
|||
|
||||
<!-- DrLeonardo Design -->
|
||||
|
||||
<Pane fx:id="overlay" prefHeight="425.0" prefWidth="693.0" xmlns="http://javafx.com/javafx/8.0.201" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<Pane fx:id="overlay" prefHeight="450.0" prefWidth="693.0" xmlns="http://javafx.com/javafx/8.0.201" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<children>
|
||||
<Pane prefHeight="425.0" prefWidth="693.0" styleClass="downloadPane">
|
||||
<Pane prefHeight="450.0" prefWidth="693.0" styleClass="downloadPane">
|
||||
<children>
|
||||
<Label fx:id="description" layoutX="17.0" layoutY="320.0" prefHeight="105.0" prefWidth="660.0" text="..." textFill="WHITE" />
|
||||
<Label fx:id="utitle" alignment="TOP_LEFT" layoutX="59.0" layoutY="279.0" prefHeight="18.0" prefWidth="470.0" text="Обновление..." textFill="WHITE">
|
||||
<font>
|
||||
<Font name="System Bold" size="13.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<JFXProgressBar fx:id="progress" layoutY="438.0" prefHeight="12.0" prefWidth="693.0" />
|
||||
<JFXSpinner layoutX="14.0" layoutY="271.0" prefHeight="35.0" prefWidth="32.0" />
|
||||
<Label fx:id="utitle" alignment="CENTER" layoutX="100.0" layoutY="125.0" prefHeight="30.0" prefWidth="495.0" text="Загрузка обновления..." textFill="WHITE">
|
||||
<font>
|
||||
<Font name="System Bold" size="20.0" />
|
||||
</font>
|
||||
</Label>
|
||||
<JFXSpinner fx:id="progress" layoutX="98.0" layoutY="226.0" prefHeight="100.0" prefWidth="100.0" />
|
||||
<Label fx:id="description" layoutX="216.0" layoutY="226.0" prefHeight="100.0" prefWidth="380.0" text="..." textFill="WHITE">
|
||||
<font>
|
||||
<Font name="System Bold" size="16.0" />
|
||||
</font>
|
||||
</Label>
|
||||
</children></Pane>
|
||||
</children>
|
||||
<stylesheets>
|
||||
|
|
Loading…
Reference in a new issue