Update design
BIN
Launcher/runtime/dialog/images/icons/back.png
Normal file
After Width: | Height: | Size: 346 B |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 16 KiB |
BIN
Launcher/runtime/dialog/images/icons/console.png
Normal file
After Width: | Height: | Size: 417 B |
Before Width: | Height: | Size: 1,014 B |
Before Width: | Height: | Size: 978 B |
Before Width: | Height: | Size: 547 B |
Before Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 322 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 427 B |
Before Width: | Height: | Size: 361 B |
Before Width: | Height: | Size: 407 B |
|
@ -48,7 +48,7 @@
|
||||||
</font>
|
</font>
|
||||||
</JFXButton>
|
</JFXButton>
|
||||||
<JFXButton id="clientSettings" alignment="CENTER" centerShape="false" contentDisplay="CENTER" layoutX="281.0" layoutY="355.0" styleClass="clientSettings" text="" textAlignment="CENTER" />
|
<JFXButton id="clientSettings" alignment="CENTER" centerShape="false" contentDisplay="CENTER" layoutX="281.0" layoutY="355.0" styleClass="clientSettings" text="" textAlignment="CENTER" />
|
||||||
<Label id="serverStatus" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="306.0" layoutY="12.0" prefHeight="25.0" prefWidth="60.0" text="12/100" textAlignment="RIGHT" textFill="WHITE">
|
<Label id="serverStatus" alignment="TOP_RIGHT" contentDisplay="RIGHT" layoutX="246.0" layoutY="12.0" prefHeight="25.0" prefWidth="104.0" text="12/100" textAlignment="RIGHT" textFill="WHITE">
|
||||||
<font>
|
<font>
|
||||||
<Font name="System Bold" size="16.0" />
|
<Font name="System Bold" size="16.0" />
|
||||||
</font>
|
</font>
|
||||||
|
|
|
@ -24,7 +24,7 @@ #overlay > #action.close {
|
||||||
-fx-background-position: center;
|
-fx-background-position: center;
|
||||||
-jfx-button-type: FLAT;
|
-jfx-button-type: FLAT;
|
||||||
-fx-background-color: #2d83ce;
|
-fx-background-color: #2d83ce;
|
||||||
-fx-pref-width: 100px;
|
-fx-pref-width: 150px;
|
||||||
-fx-pref-height: 25px;
|
-fx-pref-height: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ #overlay > #action.kill {
|
||||||
-fx-background-position: center;
|
-fx-background-position: center;
|
||||||
-jfx-button-type: FLAT;
|
-jfx-button-type: FLAT;
|
||||||
-fx-background-color: #CE5757;
|
-fx-background-color: #CE5757;
|
||||||
-fx-pref-width: 100px;
|
-fx-pref-width: 150px;
|
||||||
-fx-pref-height: 25px;
|
-fx-pref-height: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,6 @@
|
||||||
|
|
||||||
<!-- Debug controls -->
|
<!-- Debug controls -->
|
||||||
<JFXTextArea fx:id="output" prefHeight="425.0" prefWidth="693.0" />
|
<JFXTextArea fx:id="output" prefHeight="425.0" prefWidth="693.0" />
|
||||||
<JFXButton fx:id="copy" defaultButton="true" layoutX="465.0" layoutY="386.0" prefHeight="30.0" prefWidth="100.0" text="Копировать" />
|
<JFXButton fx:id="copy" defaultButton="true" layoutX="423.0" layoutY="390.0" prefHeight="30.0" prefWidth="100.0" text="Копировать" />
|
||||||
<JFXButton fx:id="action" layoutX="579.0" layoutY="386.0" prefHeight="25.0" prefWidth="100.0" text="Убить" />
|
<JFXButton fx:id="action" layoutX="583.0" layoutY="390.0" prefHeight="25.0" prefWidth="100.0" text="Убить" />
|
||||||
</Pane>
|
</Pane>
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
/*-- DrLeonardo Design --*/
|
||||||
#holder {
|
#holder {
|
||||||
-fx-background-color: #fff;
|
-fx-background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Labels */
|
/* Labels */
|
||||||
#holder > #settingsTitle {
|
#holder > #settingsTitle {
|
||||||
-fx-font-size: 14pt;
|
-fx-font-size: 14pt;
|
||||||
|
@ -13,7 +15,7 @@ #holder > #apply{
|
||||||
-fx-text-fill: white;
|
-fx-text-fill: white;
|
||||||
-fx-background-position: center;
|
-fx-background-position: center;
|
||||||
-jfx-button-type: FLAT;
|
-jfx-button-type: FLAT;
|
||||||
-fx-pref-width: 100px;
|
-fx-pref-width: 150px;
|
||||||
-fx-pref-height: 25px;
|
-fx-pref-height: 25px;
|
||||||
}
|
}
|
||||||
#holder > #apply:hover,
|
#holder > #apply:hover,
|
||||||
|
@ -38,3 +40,4 @@ .separator *.line {
|
||||||
-fx-border-color: transparent;
|
-fx-border-color: transparent;
|
||||||
-fx-border-width: 0 0 10 0;
|
-fx-border-width: 0 0 10 0;
|
||||||
}
|
}
|
||||||
|
/*-- DrLeonardo Design --*/
|
|
@ -13,9 +13,9 @@
|
||||||
<children>
|
<children>
|
||||||
<Pane id="holder" prefHeight="425.0" prefWidth="693.0">
|
<Pane id="holder" prefHeight="425.0" prefWidth="693.0">
|
||||||
<children>
|
<children>
|
||||||
<JFXScrollPane id="modlist" prefHeight="425.0" prefWidth="693.0">
|
<JFXScrollPane id="modlist" prefHeight="425.0" prefWidth="694.0">
|
||||||
<content>
|
<content>
|
||||||
<VBox prefHeight="424.0" prefWidth="693.0">
|
<VBox prefHeight="232.0" prefWidth="689.0">
|
||||||
<children>
|
<children>
|
||||||
</children>
|
</children>
|
||||||
<padding>
|
<padding>
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
</VBox>
|
</VBox>
|
||||||
</content>
|
</content>
|
||||||
</JFXScrollPane>
|
</JFXScrollPane>
|
||||||
<JFXButton fx:id="apply" defaultButton="true" layoutX="580.0" layoutY="388.0" prefHeight="25.0" prefWidth="100.0" text="Применить" />
|
<JFXButton fx:id="apply" defaultButton="true" layoutX="532.0" layoutY="390.0" prefHeight="25.0" prefWidth="100.0" text="Применить" />
|
||||||
</children>
|
</children>
|
||||||
</Pane>
|
</Pane>
|
||||||
</children>
|
</children>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
var options = {
|
var options = {
|
||||||
file: DirBridge.dir.resolve("options.bin"),
|
file: DirBridge.dir.resolve("options.bin"),
|
||||||
|
|
||||||
/* options and overlay functions */
|
|
||||||
load: function(profiles) {
|
load: function(profiles) {
|
||||||
LogHelper.debug("Loading options file");
|
LogHelper.debug("Loading options file");
|
||||||
try {
|
try {
|
||||||
|
@ -139,11 +138,11 @@ var options = {
|
||||||
textDescr = new javafx.scene.text.Text(modDescription);
|
textDescr = new javafx.scene.text.Text(modDescription);
|
||||||
if(subLevel > 1) {
|
if(subLevel > 1) {
|
||||||
for(var i = 1; i < subLevel; i++){
|
for(var i = 1; i < subLevel; i++){
|
||||||
textDescr.setWrappingWidth(370-(25*i));
|
textDescr.setWrappingWidth(640-(25*i));
|
||||||
textDescr.setTranslateX(25+(25*i));
|
textDescr.setTranslateX(25+(25*i));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
textDescr.setWrappingWidth(370);
|
textDescr.setWrappingWidth(640);
|
||||||
textDescr.setTranslateX(25);
|
textDescr.setTranslateX(25);
|
||||||
}
|
}
|
||||||
textDescr.setTextAlignment(javafx.scene.text.TextAlignment.JUSTIFY);
|
textDescr.setTextAlignment(javafx.scene.text.TextAlignment.JUSTIFY);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Label */
|
/*-- DrLeonardo Design --*/
|
||||||
#overlay > #description {
|
#overlay > #description {
|
||||||
-fx-font-size: 12pt;
|
-fx-font-size: 12pt;
|
||||||
-fx-text-fill: #fff;
|
-fx-text-fill: #fff;
|
||||||
|
@ -8,3 +8,4 @@ #overlay > #description {
|
||||||
#overlay > #description.error {
|
#overlay > #description.error {
|
||||||
-fx-text-fill: red;
|
-fx-text-fill: red;
|
||||||
}
|
}
|
||||||
|
/*-- DrLeonardo Design --*/
|
|
@ -1,22 +1,17 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import com.jfoenix.controls.JFXSpinner?>
|
||||||
<?import java.net.URL?>
|
<?import java.net.URL?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
<?import javafx.scene.image.Image?>
|
|
||||||
<?import javafx.scene.image.ImageView?>
|
|
||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.Pane?>
|
||||||
|
|
||||||
<!-- DrLeonardo Design | Fixes by Yaroslavik -->
|
<!-- DrLeonardo Design | Fixes by Yaroslavik -->
|
||||||
|
|
||||||
<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="425.0" prefWidth="693.0" xmlns="http://javafx.com/javafx/8.0.201" xmlns:fx="http://javafx.com/fxml/1">
|
||||||
<children>
|
<children>
|
||||||
<ImageView id="spinner" fx:id="spinner" fitHeight="161.0" fitWidth="161.0" layoutX="266.0" layoutY="93.0" y="-6.0">
|
|
||||||
<image>
|
|
||||||
<Image url="@../../images/icons/loading.gif" />
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
|
||||||
<!-- Description -->
|
<!-- Description -->
|
||||||
<Label fx:id="description" alignment="CENTER" contentDisplay="CENTER" layoutX="205.0" layoutY="248.0" prefHeight="64.0" prefWidth="283.0" text="..." textAlignment="CENTER" />
|
<Label fx:id="description" alignment="CENTER" contentDisplay="CENTER" layoutX="205.0" layoutY="272.0" prefHeight="120.0" prefWidth="283.0" text="..." textAlignment="CENTER" />
|
||||||
|
<JFXSpinner fx:id="spinner" layoutX="313.0" layoutY="178.0" prefHeight="70.0" prefWidth="67.0" />
|
||||||
</children>
|
</children>
|
||||||
<stylesheets>
|
<stylesheets>
|
||||||
<URL value="@processing.css" />
|
<URL value="@processing.css" />
|
||||||
|
|
|
@ -10,14 +10,12 @@ var processing = {
|
||||||
processing.description = processing.overlay.lookup("#description");
|
processing.description = processing.overlay.lookup("#description");
|
||||||
|
|
||||||
// Set images
|
// Set images
|
||||||
processing.processingImage = new javafx.scene.image.Image(
|
|
||||||
Launcher.getResourceURL("dialog/images/icons/loading.gif").toString());
|
|
||||||
processing.errorImage = new javafx.scene.image.Image(
|
processing.errorImage = new javafx.scene.image.Image(
|
||||||
Launcher.getResourceURL("dialog/images/icons/error.png").toString());
|
Launcher.getResourceURL("dialog/images/icons/error.png").toString());
|
||||||
},
|
},
|
||||||
|
|
||||||
resetOverlay: function() {
|
resetOverlay: function() {//JFXSpinner spinner = new JFXSpinner();
|
||||||
processing.spinner.setImage(processing.processingImage);
|
//processing.spinner.setImage(processing.processingImage);
|
||||||
processing.description.getStyleClass().remove("error");
|
processing.description.getStyleClass().remove("error");
|
||||||
processing.description.setText("...");
|
processing.description.setText("...");
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
|
/*-- DrLeonardo Design --*/
|
||||||
#holder {
|
#holder {
|
||||||
-fx-background-color: #fff;
|
-fx-background-color: #fff;
|
||||||
}
|
}
|
||||||
#holder > #transferDialog {
|
#holder > #transferDialog {
|
||||||
-fx-background-color: RGBA(0, 0, 0, 0.1);
|
-fx-background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
-fx-pref-width: 694px;
|
||||||
|
-fx-pref-height: 425px;
|
||||||
}
|
}
|
||||||
/* Labels */
|
/* Labels */
|
||||||
#holder > #settingsTitle {
|
#holder > #settingsTitle {
|
||||||
|
@ -41,37 +44,42 @@ #holder > #ramSlider:pressed > .thumb {
|
||||||
|
|
||||||
/* Dir options */
|
/* Dir options */
|
||||||
#holder > #deleteDir, #cancelTransfer {
|
#holder > #deleteDir, #cancelTransfer {
|
||||||
-fx-background-color: #CE5757;
|
|
||||||
-fx-text-fill: white;
|
|
||||||
-fx-background-radius: 0;
|
-fx-background-radius: 0;
|
||||||
|
-fx-text-fill: white;
|
||||||
|
-fx-background-position: center;
|
||||||
|
-jfx-button-type: FLAT;
|
||||||
|
-fx-background-color: #CE5757;
|
||||||
|
-fx-pref-width: 150px;
|
||||||
|
-fx-pref-height: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#holder > #deleteDir:hover,#cancelTransfer:hover,
|
#holder > #deleteDir:hover,#cancelTransfer:hover,
|
||||||
#holder > #deleteDir:focused,#cancelTransfer:focused {
|
#holder > #deleteDir:focused,#cancelTransfer:focused {
|
||||||
-fx-opacity: 0.8;
|
-fx-background-color: #DB5252;
|
||||||
}
|
}
|
||||||
|
|
||||||
#holder > #changeDir {
|
#holder > #changeDir {
|
||||||
-fx-background-color: #B4B4B4;
|
-fx-background-color: transparent;
|
||||||
-fx-text-fill: white;
|
-fx-text-fill: #909090;
|
||||||
-fx-background-radius: 0;
|
-fx-background-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#holder > #changeDir:hover,
|
#holder > #changeDir:focused,
|
||||||
#holder > #changeDir:focused {
|
|
||||||
-fx-opacity: 0.8;
|
|
||||||
}
|
|
||||||
|
|
||||||
#holder > #changeDir:pressed {
|
#holder > #changeDir:pressed {
|
||||||
-fx-opacity: 0.8;
|
-fx-font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
#holder > #apply,#applyTransfer{
|
#holder > #apply,#applyTransfer{
|
||||||
-fx-background-color: #61B373;
|
-fx-background-color: #61B373;
|
||||||
-fx-text-fill: #fff;
|
|
||||||
-fx-background-radius: 0;
|
-fx-background-radius: 0;
|
||||||
|
-fx-text-fill: white;
|
||||||
|
-fx-background-position: center;
|
||||||
|
-jfx-button-type: FLAT;
|
||||||
|
-fx-pref-width: 150px;
|
||||||
|
-fx-pref-height: 25px;
|
||||||
}
|
}
|
||||||
#holder > #apply:hover,#applyTransfer:hover,
|
#holder > #apply:hover,#applyTransfer:hover,
|
||||||
#holder > #apply:focused,#applyTransfer:focused{
|
#holder > #apply:focused,#applyTransfer:focused{
|
||||||
-fx-background-color: #74C085;
|
-fx-background-color: #74C085;
|
||||||
}
|
}
|
||||||
|
/*-- DrLeonardo Design --*/
|
|
@ -15,48 +15,44 @@
|
||||||
|
|
||||||
<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="425.0" prefWidth="693.0" xmlns="http://javafx.com/javafx/8.0.201" xmlns:fx="http://javafx.com/fxml/1">
|
||||||
<children>
|
<children>
|
||||||
<Pane id="holder" layoutX="1.0" layoutY="-1.0" prefHeight="425.0" prefWidth="693.0">
|
<Pane id="holder" prefHeight="425.0" prefWidth="694.0">
|
||||||
<children>
|
<children>
|
||||||
<JFXCheckBox fx:id="autoEnter" layoutX="14.0" layoutY="127.0" text="Автовход на сервер" />
|
<JFXCheckBox fx:id="autoEnter" checkedColor="#61b373" layoutX="14.0" layoutY="127.0" text="Автовход на сервер" unCheckedColor="#909090" />
|
||||||
<Text fill="#8c8c8c" layoutX="38.0" layoutY="143.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Включение авто-входа означает что вы сразу после загрузки клиента попадете на сервер" wrappingWidth="636.9999872148037" y="15.0" />
|
<Text fill="#8c8c8c" layoutX="38.0" layoutY="143.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Включение авто-входа означает что вы сразу после загрузки клиента попадете на сервер" wrappingWidth="636.9999872148037" y="15.0" />
|
||||||
<JFXCheckBox fx:id="fullScreen" layoutX="13.0" layoutY="250.0" text="Клиент в полный экран" />
|
<JFXCheckBox fx:id="fullScreen" checkedColor="#61b373" layoutX="13.0" layoutY="250.0" text="Клиент в полный экран" unCheckedColor="#909090" />
|
||||||
<Text fill="#8c8c8c" layoutX="38.0" layoutY="267.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Включение данной функции позволяет запустить игру сразу в полноэкранном режиме" wrappingWidth="636.9999872148037" y="15.0" />
|
<Text fill="#8c8c8c" layoutX="38.0" layoutY="267.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Включение данной функции позволяет запустить игру сразу в полноэкранном режиме" wrappingWidth="636.9999872148037" y="15.0" />
|
||||||
<JFXCheckBox id="debug" layoutX="13.0" layoutY="183.0" text="Режим Отладки" />
|
<JFXCheckBox id="debug" checkedColor="#61b373" layoutX="13.0" layoutY="183.0" text="Режим Отладки" unCheckedColor="#909090" />
|
||||||
<Text fill="#8c8c8c" layoutX="38.0" layoutY="198.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Режим отладки позволяет просмотреть лог запуска и работы программы в реальном времени прямо из лаунчера, что упрощает поиск нужной информации" wrappingWidth="637.0000016447157" y="15.0" />
|
<Text fill="#8c8c8c" layoutX="38.0" layoutY="198.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Режим отладки позволяет просмотреть лог запуска и работы программы в реальном времени прямо из лаунчера, что упрощает поиск нужной информации" wrappingWidth="637.0000016447157" y="15.0" />
|
||||||
|
|
||||||
<!-- RAM settings -->
|
<!-- RAM settings -->
|
||||||
<TextFlow layoutX="126.0" layoutY="17.0" prefHeight="16.0" prefWidth="19.0">
|
<TextFlow layoutX="126.0" layoutY="15.0" prefHeight="16.0" prefWidth="112.0">
|
||||||
<Text fx:id="ramLabel" />
|
<Text fx:id="ramLabel" />
|
||||||
</TextFlow>
|
</TextFlow>
|
||||||
<Separator layoutY="112.0" prefHeight="3.0" prefWidth="693.0" />
|
<Separator layoutY="112.0" prefHeight="3.0" prefWidth="693.0" />
|
||||||
<!-- RAM settings -->
|
<!-- RAM settings -->
|
||||||
|
|
||||||
<!-- Deldir settings -->
|
<!-- Deldir settings -->
|
||||||
<JFXButton fx:id="deleteDir" layoutX="328.0" layoutY="365.0" prefHeight="25.0" prefWidth="245.0" text="Очистить данные игровых клиентов" textAlignment="CENTER" wrapText="true">
|
<JFXButton fx:id="deleteDir" layoutX="374.0" layoutY="365.0" prefHeight="25.0" prefWidth="245.0" text="Удалить клиенты" textAlignment="CENTER" wrapText="true" />
|
||||||
<font>
|
|
||||||
<Font name="System Bold" size="12.0" />
|
|
||||||
</font>
|
|
||||||
</JFXButton>
|
|
||||||
<!-- Deldir settings -->
|
<!-- Deldir settings -->
|
||||||
|
|
||||||
<!-- Changedir settings -->
|
<!-- Changedir settings -->
|
||||||
<JFXButton fx:id="changeDir" layoutY="401.0" prefHeight="25.0" prefWidth="200.0" text="Сменить директорию загрузки" textAlignment="CENTER" wrapText="true" />
|
<JFXButton fx:id="changeDir" layoutY="400.0" prefHeight="25.0" prefWidth="200.0" text="Сменить директорию загрузки" textAlignment="CENTER" wrapText="true" />
|
||||||
<Hyperlink id="dirLabel" alignment="TOP_LEFT" layoutX="199.0" layoutY="402.0" prefHeight="23.0" prefWidth="493.0" text="C:/Users" />
|
<Hyperlink id="dirLabel" alignment="TOP_LEFT" layoutX="200.0" layoutY="401.0" prefHeight="23.0" prefWidth="493.0" text="C:/Users" />
|
||||||
<!-- Changedir settings -->
|
<!-- Changedir settings -->
|
||||||
|
|
||||||
<JFXButton fx:id="apply" defaultButton="true" layoutX="583.0" layoutY="365.0" prefHeight="23.0" prefWidth="100.0" text="Применить" />
|
<JFXButton fx:id="apply" defaultButton="true" layoutX="534.0" layoutY="365.0" prefHeight="23.0" prefWidth="100.0" text="Применить" />
|
||||||
<Text layoutX="16.0" layoutY="28.0">Выделение памяти: </Text>
|
<Text layoutX="16.0" layoutY="28.0">Выделение памяти: </Text>
|
||||||
<JFXSlider fx:id="ramSlider" layoutX="14.0" layoutY="76.0" prefHeight="14.0" prefWidth="663.0" />
|
<JFXSlider fx:id="ramSlider" layoutX="14.0" layoutY="76.0" prefHeight="14.0" prefWidth="663.0" />
|
||||||
<Separator layoutY="400.0" prefHeight="3.0" prefWidth="693.0" />
|
<Separator layoutY="400.0" prefHeight="3.0" prefWidth="693.0" />
|
||||||
<Pane fx:id="transferDialog" layoutX="-1.0" layoutY="1.0" prefHeight="425.0" prefWidth="694.0" visible="false">
|
<Pane fx:id="transferDialog" prefHeight="425.0" prefWidth="694.0" visible="false">
|
||||||
<children>
|
<children>
|
||||||
<Text fill="WHITE" layoutX="147.0" layoutY="195.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Перенести все данные в новую директорию?" wrappingWidth="400.13671875">
|
<Text fill="WHITE" layoutX="147.0" layoutY="198.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Перенести все данные в новую директорию?" wrappingWidth="400.13671875">
|
||||||
<font>
|
<font>
|
||||||
<Font size="19.0" />
|
<Font size="19.0" />
|
||||||
</font>
|
</font>
|
||||||
</Text>
|
</Text>
|
||||||
<JFXButton fx:id="applyTransfer" layoutX="178.0" layoutY="226.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="124.0" text="Да, перенести!" />
|
<JFXButton fx:id="applyTransfer" layoutX="165.0" layoutY="226.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="124.0" text="Да, перенести!" />
|
||||||
<JFXButton fx:id="cancelTransfer" layoutX="392.0" layoutY="226.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="124.0" text="Нет, не нужно." />
|
<JFXButton fx:id="cancelTransfer" layoutX="379.0" layoutY="226.0" mnemonicParsing="false" prefHeight="25.0" prefWidth="124.0" text="Нет, не нужно." />
|
||||||
</children>
|
</children>
|
||||||
</Pane>
|
</Pane>
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,23 @@
|
||||||
var settingsClass = Java.extend(LauncherSettingsClass.static, {
|
var settingsClass = Java.extend(LauncherSettingsClass.static, {
|
||||||
setDefault: function() {
|
setDefault: function() {
|
||||||
// Auth settings
|
|
||||||
settings.login = null;
|
settings.login = null;
|
||||||
settings.rsaPassword = null;
|
settings.rsaPassword = null;
|
||||||
settings.profile = 0;
|
settings.profile = 0;
|
||||||
|
|
||||||
// Client settings
|
|
||||||
settings.updatesDir = DirBridge.defaultUpdatesDir;
|
settings.updatesDir = DirBridge.defaultUpdatesDir;
|
||||||
settings.autoEnter = config.autoEnterDefault;
|
settings.autoEnter = config.autoEnterDefault;
|
||||||
settings.fullScreen = config.fullScreenDefault;
|
settings.fullScreen = config.fullScreenDefault;
|
||||||
settings.setRAM(config.ramDefault);
|
settings.setRAM(config.ramDefault);
|
||||||
|
|
||||||
// Offline cache
|
|
||||||
settings.lastDigest = null;
|
settings.lastDigest = null;
|
||||||
settings.lastProfiles.clear();
|
settings.lastProfiles.clear();
|
||||||
settings.lastHDirs.clear();
|
settings.lastHDirs.clear();
|
||||||
|
|
||||||
// Apply CLI params
|
|
||||||
cliParams.applySettings();
|
cliParams.applySettings();
|
||||||
},
|
},
|
||||||
|
|
||||||
setPassword: function(password) {
|
setPassword: function(password) {
|
||||||
var encrypted = SecurityHelper.newRSAEncryptCipher(Launcher.getConfig().publicKey).doFinal(IOHelper.encode(password));
|
var encrypted = SecurityHelper.newRSAEncryptCipher(Launcher.getConfig().publicKey).doFinal(IOHelper.encode(password));
|
||||||
//settings.password = encrypted;
|
|
||||||
return encrypted;
|
return encrypted;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -43,7 +38,6 @@ var settingsOverlay = {
|
||||||
initOverlay: function() {
|
initOverlay: function() {
|
||||||
settingsOverlay.overlay = loadFXML("dialog/overlay/settings/settings.fxml");
|
settingsOverlay.overlay = loadFXML("dialog/overlay/settings/settings.fxml");
|
||||||
|
|
||||||
// Lookup autoEnter checkbox
|
|
||||||
var holder = settingsOverlay.overlay.lookup("#holder");
|
var holder = settingsOverlay.overlay.lookup("#holder");
|
||||||
|
|
||||||
var autoEnterBox = holder.lookup("#autoEnter");
|
var autoEnterBox = holder.lookup("#autoEnter");
|
||||||
|
@ -51,40 +45,34 @@ var settingsOverlay = {
|
||||||
autoEnterBox.selectedProperty()["addListener(javafx.beans.value.ChangeListener)"](
|
autoEnterBox.selectedProperty()["addListener(javafx.beans.value.ChangeListener)"](
|
||||||
function(o, ov, nv) settings.autoEnter = nv);
|
function(o, ov, nv) settings.autoEnter = nv);
|
||||||
|
|
||||||
// Lookup dir label
|
|
||||||
settingsOverlay.dirLabel = holder.lookup("#dirLabel");
|
settingsOverlay.dirLabel = holder.lookup("#dirLabel");
|
||||||
settingsOverlay.dirLabel.setOnAction(function(event)
|
settingsOverlay.dirLabel.setOnAction(function(event)
|
||||||
app.getHostServices().showDocument(settings.updatesDir.toUri()));
|
app.getHostServices().showDocument(settings.updatesDir.toUri()));
|
||||||
settingsOverlay.updateDirLabel();
|
settingsOverlay.updateDirLabel();
|
||||||
|
|
||||||
// Lokup transferDialog pane
|
|
||||||
settingsOverlay.transferDialog = holder.lookup("#transferDialog");
|
settingsOverlay.transferDialog = holder.lookup("#transferDialog");
|
||||||
settingsOverlay.transferDialog.setVisible(false);
|
settingsOverlay.transferDialog.setVisible(false);
|
||||||
|
|
||||||
// Lookup change dir button
|
|
||||||
holder.lookup("#changeDir").setOnAction(function(event) {
|
holder.lookup("#changeDir").setOnAction(function(event) {
|
||||||
|
|
||||||
var chooser = new javafx.stage.DirectoryChooser();
|
var chooser = new javafx.stage.DirectoryChooser();
|
||||||
chooser.setTitle("Сменить директорию загрузок");
|
chooser.setTitle("Сменить директорию загрузок");
|
||||||
chooser.setInitialDirectory(DirBridge.dir.toFile());
|
chooser.setInitialDirectory(DirBridge.dir.toFile());
|
||||||
|
|
||||||
// Set new result
|
|
||||||
var newDir = chooser.showDialog(stage);
|
var newDir = chooser.showDialog(stage);
|
||||||
if (newDir !== null) {
|
if (newDir !== null) {
|
||||||
settingsOverlay.transferCatalogDialog(newDir.toPath());
|
settingsOverlay.transferCatalogDialog(newDir.toPath());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Lookup fullScreen checkbox
|
|
||||||
var fullScreenBox = holder.lookup("#fullScreen");
|
var fullScreenBox = holder.lookup("#fullScreen");
|
||||||
fullScreenBox.setSelected(settings.fullScreen);
|
fullScreenBox.setSelected(settings.fullScreen);
|
||||||
fullScreenBox.selectedProperty()["addListener(javafx.beans.value.ChangeListener)"](
|
fullScreenBox.selectedProperty()["addListener(javafx.beans.value.ChangeListener)"](
|
||||||
function(o, ov, nv) settings.fullScreen = nv);
|
function(o, ov, nv) settings.fullScreen = nv);
|
||||||
|
|
||||||
// Lookup RAM label
|
|
||||||
settingsOverlay.ramLabel = holder.lookup("#ramLabel");
|
settingsOverlay.ramLabel = holder.lookup("#ramLabel");
|
||||||
settingsOverlay.updateRAMLabel();
|
settingsOverlay.updateRAMLabel();
|
||||||
|
|
||||||
// Lookup RAM slider options
|
|
||||||
var ramSlider = holder.lookup("#ramSlider");
|
var ramSlider = holder.lookup("#ramSlider");
|
||||||
ramSlider.setMax(JVMHelper.RAM);
|
ramSlider.setMax(JVMHelper.RAM);
|
||||||
ramSlider.setSnapToTicks(true);
|
ramSlider.setSnapToTicks(true);
|
||||||
|
@ -99,7 +87,6 @@ var settingsOverlay = {
|
||||||
settingsOverlay.updateRAMLabel();
|
settingsOverlay.updateRAMLabel();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Lookup delete dir button
|
|
||||||
var deleteDirButton = holder.lookup("#deleteDir");
|
var deleteDirButton = holder.lookup("#deleteDir");
|
||||||
deleteDirButton.setOnAction(function(event) {
|
deleteDirButton.setOnAction(function(event) {
|
||||||
if (!settingsOverlay.deleteDirPressedAgain) {
|
if (!settingsOverlay.deleteDirPressedAgain) {
|
||||||
|
@ -108,7 +95,6 @@ var settingsOverlay = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete dir!
|
|
||||||
settingsOverlay.deleteUpdatesDir();
|
settingsOverlay.deleteUpdatesDir();
|
||||||
settingsOverlay.deleteDirPressedAgain = false;
|
settingsOverlay.deleteDirPressedAgain = false;
|
||||||
settingsOverlay.count = settingsOverlay.count+1;
|
settingsOverlay.count = settingsOverlay.count+1;
|
||||||
|
@ -124,14 +110,11 @@ var settingsOverlay = {
|
||||||
))));
|
))));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Lookup debug checkbox
|
|
||||||
var debugBox = settingsOverlay.overlay.lookup("#debug");
|
var debugBox = settingsOverlay.overlay.lookup("#debug");
|
||||||
debugBox.setSelected(LogHelper.isDebugEnabled());
|
debugBox.setSelected(LogHelper.isDebugEnabled());
|
||||||
debugBox.selectedProperty()["addListener(javafx.beans.value.ChangeListener)"](
|
debugBox.selectedProperty()["addListener(javafx.beans.value.ChangeListener)"](
|
||||||
function(o, ov, nv) LogHelper.setDebugEnabled(nv));
|
function(o, ov, nv) LogHelper.setDebugEnabled(nv));
|
||||||
|
|
||||||
|
|
||||||
// Lookup apply settings button
|
|
||||||
holder.lookup("#apply").setOnAction(function(event) overlay.hide(0, null));
|
holder.lookup("#apply").setOnAction(function(event) overlay.hide(0, null));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -145,7 +128,6 @@ var settingsOverlay = {
|
||||||
settingsOverlay.transferDialog.setVisible(false);
|
settingsOverlay.transferDialog.setVisible(false);
|
||||||
});
|
});
|
||||||
settingsOverlay.transferDialog.lookup("#applyTransfer").setOnAction(function(event) {
|
settingsOverlay.transferDialog.lookup("#applyTransfer").setOnAction(function(event) {
|
||||||
//Здесь могла быть ваша реклама, либо DirBridge.move();
|
|
||||||
DirBridge.move(newDir);
|
DirBridge.move(newDir);
|
||||||
settings.updatesDir = newDir;
|
settings.updatesDir = newDir;
|
||||||
DirBridge.dirUpdates = settings.updatesDir;
|
DirBridge.dirUpdates = settings.updatesDir;
|
||||||
|
@ -177,17 +159,17 @@ var settingsOverlay = {
|
||||||
};
|
};
|
||||||
LogHelper.debug("Dir: %s", DirBridge.dir);
|
LogHelper.debug("Dir: %s", DirBridge.dir);
|
||||||
var settings = new settingsClass;
|
var settings = new settingsClass;
|
||||||
|
|
||||||
/* ====================== CLI PARAMS ===================== */
|
/* ====================== CLI PARAMS ===================== */
|
||||||
var cliParams = {
|
var cliParams = {
|
||||||
login: null, password: null, profile: -1, autoLogin: false, // Auth
|
login: null, password: null, profile: -1, autoLogin: false,
|
||||||
updatesDir: null, autoEnter: null, fullScreen: null, ram: -1, // Client
|
updatesDir: null, autoEnter: null, fullScreen: null, ram: -1,
|
||||||
offline: false, // Offline
|
offline: false,
|
||||||
|
|
||||||
init: function(params) {
|
init: function(params) {
|
||||||
var named = params.getNamed();
|
var named = params.getNamed();
|
||||||
var unnamed = params.getUnnamed();
|
var unnamed = params.getUnnamed();
|
||||||
|
|
||||||
// Read auth cli params
|
|
||||||
cliParams.login = named.get("login");
|
cliParams.login = named.get("login");
|
||||||
cliParams.password = named.get("password");
|
cliParams.password = named.get("password");
|
||||||
var profile = named.get("profile");
|
var profile = named.get("profile");
|
||||||
|
@ -196,7 +178,6 @@ var cliParams = {
|
||||||
}
|
}
|
||||||
cliParams.autoLogin = unnamed.contains("--autoLogin");
|
cliParams.autoLogin = unnamed.contains("--autoLogin");
|
||||||
|
|
||||||
// Read client cli params
|
|
||||||
var updatesDir = named.get("updatesDir");
|
var updatesDir = named.get("updatesDir");
|
||||||
if (updatesDir !== null) {
|
if (updatesDir !== null) {
|
||||||
cliParams.updatesDir = IOHelper.toPath(named.get("updatesDir"));
|
cliParams.updatesDir = IOHelper.toPath(named.get("updatesDir"));
|
||||||
|
@ -214,7 +195,6 @@ var cliParams = {
|
||||||
cliParams.ram = java.lang.Integer.parseInt(ram);
|
cliParams.ram = java.lang.Integer.parseInt(ram);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read offline cli param
|
|
||||||
var offline = named.get("offline");
|
var offline = named.get("offline");
|
||||||
if (offline !== null) {
|
if (offline !== null) {
|
||||||
cliParams.offline = java.lang.Boolean.parseBoolean(offline);
|
cliParams.offline = java.lang.Boolean.parseBoolean(offline);
|
||||||
|
@ -222,7 +202,6 @@ var cliParams = {
|
||||||
},
|
},
|
||||||
|
|
||||||
applySettings: function() {
|
applySettings: function() {
|
||||||
// Apply auth params
|
|
||||||
if (cliParams.login !== null) {
|
if (cliParams.login !== null) {
|
||||||
settings.login = cliParams.login;
|
settings.login = cliParams.login;
|
||||||
}
|
}
|
||||||
|
@ -233,9 +212,7 @@ var cliParams = {
|
||||||
settings.profile = cliParams.profile;
|
settings.profile = cliParams.profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply client params
|
|
||||||
if (cliParams.updatesDir !== null) {
|
if (cliParams.updatesDir !== null) {
|
||||||
//settings.updatesDir = cliParams.updatesDir;
|
|
||||||
}
|
}
|
||||||
if (cliParams.autoEnter !== null) {
|
if (cliParams.autoEnter !== null) {
|
||||||
settings.autoLogin = cliParams.autoEnter;
|
settings.autoLogin = cliParams.autoEnter;
|
||||||
|
@ -247,7 +224,6 @@ var cliParams = {
|
||||||
settings.setRAM(cliParams.ram);
|
settings.setRAM(cliParams.ram);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apply offline param
|
|
||||||
if (cliParams.offline !== null) {
|
if (cliParams.offline !== null) {
|
||||||
settings.offline = cliParams.offline;
|
settings.offline = cliParams.offline;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
/*-- DrLeonardo Design --*/
|
||||||
|
/* Background */
|
||||||
|
#overlay {
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
-fx-background-size: cover;
|
||||||
|
-fx-pref-width: 693px;
|
||||||
|
-fx-pref-height: 425px;
|
||||||
|
-fx-background-image: url('../../images/background.jpg');
|
||||||
|
}
|
||||||
|
|
||||||
#overlay > #utitle {
|
#overlay > #utitle {
|
||||||
-fx-alignment: top-left;
|
-fx-alignment: top-left;
|
||||||
}
|
}
|
||||||
|
@ -8,11 +18,13 @@ #overlay > #description {
|
||||||
}
|
}
|
||||||
|
|
||||||
#overlay > #description.error {
|
#overlay > #description.error {
|
||||||
-fx-text-fill: red;
|
-fx-text-fill: #CE5757;
|
||||||
}
|
}
|
||||||
|
|
||||||
.downloadPane {
|
.downloadPane {
|
||||||
-fx-background-color: rgba(0, 0, 0, 0.46);
|
-fx-background-color: rgba(0, 0, 0, 0.3);
|
||||||
|
-fx-pref-width: 693px;
|
||||||
|
-fx-pref-height: 425px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Progress bar */
|
/* Progress bar */
|
||||||
|
@ -42,3 +54,4 @@ .progress-bar > .track {
|
||||||
-fx-background-insets: 0;
|
-fx-background-insets: 0;
|
||||||
-fx-background-radius: 3px;
|
-fx-background-radius: 3px;
|
||||||
}
|
}
|
||||||
|
/*-- DrLeonardo Design --*/
|
|
@ -1,43 +1,30 @@
|
||||||
<?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 java.net.URL?>
|
<?import java.net.URL?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
<?import javafx.scene.control.ProgressBar?>
|
|
||||||
<?import javafx.scene.image.Image?>
|
|
||||||
<?import javafx.scene.image.ImageView?>
|
|
||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.Pane?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
<!-- DrLeonardo Design -->
|
<!-- DrLeonardo Design -->
|
||||||
|
|
||||||
<Pane fx:id="overlay" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.20" xmlns:fx="http://javafx.com/fxml/1">
|
<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">
|
||||||
<children>
|
<children>
|
||||||
<ImageView fitHeight="400.0" fitWidth="600.0" pickOnBounds="true" preserveRatio="true">
|
<Pane prefHeight="425.0" prefWidth="693.0" styleClass="downloadPane">
|
||||||
<image>
|
<children>
|
||||||
<Image url="@../../images/background.png" />
|
<Label fx:id="description" layoutX="14.0" layoutY="302.0" prefHeight="98.0" prefWidth="660.0" text="..." textFill="WHITE" />
|
||||||
</image>
|
<Label fx:id="utitle" alignment="TOP_LEFT" layoutX="59.0" layoutY="269.0" prefHeight="18.0" prefWidth="470.0" text="Обновление..." textFill="WHITE">
|
||||||
</ImageView>
|
<font>
|
||||||
<Pane layoutY="28.0" prefHeight="372.0" prefWidth="600.0" styleClass="downloadPane" />
|
<Font size="13.0" />
|
||||||
<ImageView fitHeight="12.0" fitWidth="11.0" layoutX="9.0" layoutY="8.0">
|
</font>
|
||||||
<image>
|
</Label>
|
||||||
<Image url="@../../images/icons/logo_small.png" />
|
<JFXProgressBar fx:id="progress" layoutY="407.0" prefHeight="18.0" prefWidth="693.0" />
|
||||||
</image>
|
<JFXSpinner layoutX="14.0" layoutY="261.0" prefHeight="35.0" prefWidth="32.0" />
|
||||||
</ImageView>
|
</children></Pane>
|
||||||
<Label fx:id="description" layoutX="12.0" layoutY="267.0" prefHeight="98.0" prefWidth="576.0" text="..." textFill="WHITE" />
|
|
||||||
<ProgressBar fx:id="progress" disable="false" layoutX="-1.0" layoutY="376.0" opacity="1.0" prefHeight="24.0" prefWidth="600.0" progress="1.0" style="" />
|
|
||||||
<!-- Update controls -->
|
|
||||||
<Label fx:id="utitle" alignment="TOP_LEFT" layoutX="15.0" layoutY="236.0" prefHeight="30.0" prefWidth="470.0" text="Обновление..." textFill="WHITE">
|
|
||||||
<font>
|
|
||||||
<Font name="System Bold" size="20.0" />
|
|
||||||
</font>
|
|
||||||
</Label>
|
|
||||||
<ImageView fitHeight="160.0" fitWidth="160.0" layoutX="219.0" layoutY="70.0" y="-6.0">
|
|
||||||
<image>
|
|
||||||
<Image url="@../../images/icons/loading.gif" />
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
|
||||||
</children>
|
</children>
|
||||||
<stylesheets>
|
<stylesheets>
|
||||||
<URL value="@update.css" />
|
<URL value="@update.css" />
|
||||||
|
<URL value="@../../styles.css" />
|
||||||
</stylesheets>
|
</stylesheets>
|
||||||
</Pane>
|
</Pane>
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
var update = {
|
var update = {
|
||||||
overlay: null, title: null, description: null, progress: null,
|
overlay: null, title: null, description: null, progress: null,
|
||||||
|
|
||||||
/* State and overlay functions */
|
|
||||||
initOverlay: function() {
|
initOverlay: function() {
|
||||||
update.overlay = loadFXML("dialog/overlay/update/update.fxml");
|
update.overlay = loadFXML("dialog/overlay/update/update.fxml");
|
||||||
|
|
||||||
// Lookup nodes
|
|
||||||
update.title = update.overlay.lookup("#utitle");
|
update.title = update.overlay.lookup("#utitle");
|
||||||
update.description = update.overlay.lookup("#description");
|
update.description = update.overlay.lookup("#description");
|
||||||
update.progress = update.overlay.lookup("#progress");
|
update.progress = update.overlay.lookup("#progress");
|
||||||
|
@ -21,7 +19,6 @@ var update = {
|
||||||
setError: function(e) {
|
setError: function(e) {
|
||||||
LogHelper.error(e);
|
LogHelper.error(e);
|
||||||
|
|
||||||
// Set error description
|
|
||||||
update.description.getStyleClass().add("error");
|
update.description.getStyleClass().add("error");
|
||||||
update.description.setText(e.toString());
|
update.description.setText(e.toString());
|
||||||
},
|
},
|
||||||
|
@ -34,17 +31,16 @@ var update = {
|
||||||
var estimatedMM = ((estimatedSeconds % 3600) / 60) | 0;
|
var estimatedMM = ((estimatedSeconds % 3600) / 60) | 0;
|
||||||
var estimatedSS = (estimatedSeconds % 60) | 0;
|
var estimatedSS = (estimatedSeconds % 60) | 0;
|
||||||
task.updateMessage(java.lang.String.format(
|
task.updateMessage(java.lang.String.format(
|
||||||
"Файл: %s%n" + // File line
|
"Файл: %s%n" +
|
||||||
"Загружено (Всего): %.2f / %.2f MiB.%n" + // Total downloaded line
|
"Загружено (Всего): %.2f / %.2f MiB.%n" +
|
||||||
"%n" +
|
"%n" +
|
||||||
"Средняя скорость: %.1f Kbps%n" + // Speed line
|
"Средняя скорость: %.1f Kbps%n" +
|
||||||
"Примерно осталось: %d:%02d:%02d%n", // Estimated line
|
"Примерно осталось: %d:%02d:%02d%n",
|
||||||
|
|
||||||
// Formatting
|
state.filePath,
|
||||||
state.filePath, // File path
|
state.getTotalDownloadedMiB() + 0.0, state.getTotalSizeMiB() + 0.0,
|
||||||
state.getTotalDownloadedMiB() + /* Fuck nashorn */ 0.0, state.getTotalSizeMiB() + 0.0, // Total downloaded
|
bps <= 0.0 ? 0.0 : bps / 1024.0,
|
||||||
bps <= 0.0 ? 0.0 : bps / 1024.0, // Speed
|
estimatedHH, estimatedMM, estimatedSS
|
||||||
estimatedHH, estimatedMM, estimatedSS // Estimated (hh:mm:ss)
|
|
||||||
));
|
));
|
||||||
task.updateProgress(state.totalDownloaded, state.totalSize);
|
task.updateProgress(state.totalDownloaded, state.totalSize);
|
||||||
},
|
},
|
||||||
|
@ -77,19 +73,17 @@ function offlineUpdateRequest(dirName, dir, matcher, digest) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Verify dir with matcher using FunctionalBridge`s API
|
|
||||||
return FunctionalBridge.offlineUpdateRequest(dir, hdir, matcher, digest).run();
|
return FunctionalBridge.offlineUpdateRequest(dir, hdir, matcher, digest).run();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Export functions */
|
/* Export functions */
|
||||||
function makeUpdateRequest(dirName, dir, matcher, digest, callback) {
|
function makeUpdateRequest(dirName, dir, matcher, digest, callback) {
|
||||||
var request = settings.offline ? { setStateCallback: function(stateCallback) { /* Ignored */ } } :
|
var request = settings.offline ? { setStateCallback: function(stateCallback) { } } :
|
||||||
new UpdateRequest(dirName, dir, matcher, digest);
|
new UpdateRequest(dirName, dir, matcher, digest);
|
||||||
var task = settings.offline ? newTask(offlineUpdateRequest(dirName, dir, matcher, digest)) :
|
var task = settings.offline ? newTask(offlineUpdateRequest(dirName, dir, matcher, digest)) :
|
||||||
newRequestTask(request);
|
newRequestTask(request);
|
||||||
|
|
||||||
// Set task properties and start
|
|
||||||
update.setTaskProperties(task, request, callback);
|
update.setTaskProperties(task, request, callback);
|
||||||
task.updateMessage("Состояние: Хеширование");
|
task.updateMessage("Состояние: Хеширование");
|
||||||
task.updateProgress(-1, -1);
|
task.updateProgress(-1, -1);
|
||||||
|
|
|
@ -61,7 +61,7 @@ #back {
|
||||||
-fx-background-position: center;
|
-fx-background-position: center;
|
||||||
-jfx-button-type: FLAT;
|
-jfx-button-type: FLAT;
|
||||||
-fx-background-repeat: no-repeat;
|
-fx-background-repeat: no-repeat;
|
||||||
-fx-background-color: #CE5757;
|
-fx-background-color: #323232;
|
||||||
-fx-background-radius: 0;
|
-fx-background-radius: 0;
|
||||||
-fx-background-image: url('images/icons/back.png');
|
-fx-background-image: url('images/icons/back.png');
|
||||||
-fx-pref-width: 45px;
|
-fx-pref-width: 45px;
|
||||||
|
@ -71,7 +71,7 @@ #goConsole {
|
||||||
-fx-background-position: center;
|
-fx-background-position: center;
|
||||||
-jfx-button-type: FLAT;
|
-jfx-button-type: FLAT;
|
||||||
-fx-background-repeat: no-repeat;
|
-fx-background-repeat: no-repeat;
|
||||||
-fx-background-color: #CE5757;
|
-fx-background-color: #323232;
|
||||||
-fx-background-radius: 0;
|
-fx-background-radius: 0;
|
||||||
-fx-background-image: url('images/icons/console.png');
|
-fx-background-image: url('images/icons/console.png');
|
||||||
-fx-pref-width: 45px;
|
-fx-pref-width: 45px;
|
||||||
|
@ -302,7 +302,7 @@ #serverLabel{
|
||||||
|
|
||||||
#serverStatus{
|
#serverStatus{
|
||||||
-fx-text-fill: #323232;
|
-fx-text-fill: #323232;
|
||||||
-fx-pref-width: 60px;
|
-fx-pref-width: 120px;
|
||||||
-fx-pref-height: 25px;
|
-fx-pref-height: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|