Update design for updating overlay, minor fix in css file

This commit is contained in:
DrLeonardo 2019-05-09 21:34:08 +03:00
parent 94b5a07fc9
commit cbe673140b
4 changed files with 47 additions and 48 deletions

View file

@ -59,12 +59,12 @@ function initLoginScene() {
savePasswordBox = pane.lookup("#rememberchb"); savePasswordBox = pane.lookup("#rememberchb");
savePasswordBox.setSelected(settings.login === null || settings.rsaPassword !== null); savePasswordBox.setSelected(settings.login === null || settings.rsaPassword !== null);
authOptions = pane.lookup("#authOptions");
var link = pane.lookup("#link"); var link = pane.lookup("#link");
link.setText(config.linkText); link.setText(config.linkText);
link.setOnAction(function(event) app.getHostServices().showDocument(config.linkURL.toURI())); link.setOnAction(function(event) app.getHostServices().showDocument(config.linkURL.toURI()));
authOptions = pane.lookup("#authOptions");
pane.lookup("#goAuth").setOnAction(goAuth); pane.lookup("#goAuth").setOnAction(goAuth);
} }
@ -187,6 +187,12 @@ function goAuth(event) {
return; return;
} }
// Get auth
/* var auth = authOptions.getSelectionModel().getSelectedItem();
if (auth === null) {
return; // No auth selected
}*/
var rsaPassword = null; var rsaPassword = null;
if (!passwordField.isDisable()) { if (!passwordField.isDisable()) {
var password = passwordField.getText(); var password = passwordField.getText();
@ -202,7 +208,7 @@ function goAuth(event) {
} }
settings.login = login; settings.login = login;
doAuth(login, rsaPassword); doAuth(/*auth, */login, rsaPassword);
} }
/* ======== Console ======== */ /* ======== Console ======== */
@ -240,13 +246,12 @@ function verifyLauncher(e) {
//result.list[0].name; //result.list[0].name;
//result.list[0].displayName; //result.list[0].displayName;
result.list.forEach(function(auth_type, i, arr) { result.list.forEach(function(auth_type, i, arr) {
var serverAuth = new com.jfoenix.controls.JFXComboBox();
serverAuth.getStyleClass().add("authOptions");
(function() { (function() {
authOptions.getItems().add(auth_type.displayName); authOptions.getItems().add(auth_type.displayName);
//var sm = authOptions.getSelectionModel();
//sm.selectedIndexProperty()["addListener(javafx.beans.value.ChangeListener)"](settings.auth = i);
})(); })();
}); });
overlay.swap(0, processing.overlay, function(event) makeProfilesRequest(function(result) { overlay.swap(0, processing.overlay, function(event) makeProfilesRequest(function(result) {
settings.lastProfiles = result.profiles; settings.lastProfiles = result.profiles;

View file

@ -10,10 +10,6 @@ #background > #output {
-fx-background-radius: 0; -fx-background-radius: 0;
-fx-font-family: monospace; -fx-font-family: monospace;
-fx-font-size: 8pt; -fx-font-size: 8pt;
-fx-font-weight: regular;
}
#background > .textField {
-fx-font-weight: regular;
} }
#overlay > #output .content, #overlay > #output .content,

View file

@ -3,8 +3,6 @@
#overlay { #overlay {
-fx-background-color: transparent; -fx-background-color: transparent;
-fx-background-size: cover; -fx-background-size: cover;
-fx-pref-width: 693px;
-fx-pref-height: 450px;
-fx-background-image: url('../../images/background.jpg'); -fx-background-image: url('../../images/background.jpg');
} }
@ -23,8 +21,6 @@ #overlay > #description.error {
.downloadPane { .downloadPane {
-fx-background-color: rgba(0, 0, 0, 0.3); -fx-background-color: rgba(0, 0, 0, 0.3);
-fx-pref-width: 693px;
-fx-pref-height: 450px;
} }
/* Progress bar */ /* Progress bar */

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXProgressBar?>
<?import com.jfoenix.controls.JFXSpinner?> <?import com.jfoenix.controls.JFXSpinner?>
<?import java.net.URL?> <?import java.net.URL?>
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
@ -9,18 +8,21 @@
<!-- DrLeonardo Design --> <!-- 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> <children>
<Pane prefHeight="425.0" prefWidth="693.0" styleClass="downloadPane"> <Pane prefHeight="450.0" prefWidth="693.0" styleClass="downloadPane">
<children> <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="CENTER" layoutX="100.0" layoutY="125.0" prefHeight="30.0" prefWidth="495.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>
<Font name="System Bold" size="13.0" /> <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> </font>
</Label> </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" />
</children></Pane> </children></Pane>
</children> </children>
<stylesheets> <stylesheets>