@@ -31,6 +31,7 @@ import javafx.scene.layout.StackPane;
|
|||||||
|
|
||||||
import org.jackhuang.hmcl.auth.Account;
|
import org.jackhuang.hmcl.auth.Account;
|
||||||
import org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorAccount;
|
import org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorAccount;
|
||||||
|
import org.jackhuang.hmcl.auth.authlibinjector.AuthlibInjectorServer;
|
||||||
import org.jackhuang.hmcl.auth.offline.OfflineAccount;
|
import org.jackhuang.hmcl.auth.offline.OfflineAccount;
|
||||||
import org.jackhuang.hmcl.auth.yggdrasil.YggdrasilAccount;
|
import org.jackhuang.hmcl.auth.yggdrasil.YggdrasilAccount;
|
||||||
import org.jackhuang.hmcl.game.AccountHelper;
|
import org.jackhuang.hmcl.game.AccountHelper;
|
||||||
@@ -39,6 +40,8 @@ import org.jackhuang.hmcl.setting.Theme;
|
|||||||
import org.jackhuang.hmcl.task.Schedulers;
|
import org.jackhuang.hmcl.task.Schedulers;
|
||||||
import org.jackhuang.hmcl.ui.construct.ComponentList;
|
import org.jackhuang.hmcl.ui.construct.ComponentList;
|
||||||
import org.jackhuang.hmcl.ui.wizard.DecoratorPage;
|
import org.jackhuang.hmcl.ui.wizard.DecoratorPage;
|
||||||
|
|
||||||
|
import static org.jackhuang.hmcl.ui.FXUtils.installTooltip;
|
||||||
import static org.jackhuang.hmcl.util.i18n.I18n.i18n;
|
import static org.jackhuang.hmcl.util.i18n.I18n.i18n;
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
@@ -78,18 +81,16 @@ public class AccountPage extends StackPane implements DecoratorPage {
|
|||||||
|
|
||||||
FXUtils.loadFXML(this, "/assets/fxml/account.fxml");
|
FXUtils.loadFXML(this, "/assets/fxml/account.fxml");
|
||||||
|
|
||||||
FXUtils.setLimitWidth(this, 300);
|
|
||||||
if (account instanceof AuthlibInjectorAccount) {
|
if (account instanceof AuthlibInjectorAccount) {
|
||||||
lblServer.setText(((AuthlibInjectorAccount) account).getServer().getName());
|
AuthlibInjectorServer server = ((AuthlibInjectorAccount) account).getServer();
|
||||||
FXUtils.setLimitHeight(this, 182);
|
lblServer.setText(server.getName());
|
||||||
|
installTooltip(lblServer, server.getUrl());
|
||||||
} else {
|
} else {
|
||||||
componentList.removeChildren(paneServer);
|
componentList.removeChildren(paneServer);
|
||||||
|
|
||||||
if (account instanceof OfflineAccount) {
|
if (account instanceof OfflineAccount) {
|
||||||
componentList.removeChildren(paneEmail);
|
componentList.removeChildren(paneEmail);
|
||||||
FXUtils.setLimitHeight(this, 110);
|
}
|
||||||
} else
|
|
||||||
FXUtils.setLimitHeight(this, 145);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
btnDelete.setGraphic(SVG.delete(Theme.blackFillBinding(), 15, 15));
|
btnDelete.setGraphic(SVG.delete(Theme.blackFillBinding(), 15, 15));
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<?import com.jfoenix.controls.JFXButton?>
|
<?import com.jfoenix.controls.JFXButton?>
|
||||||
<?import javafx.scene.control.*?>
|
<?import javafx.scene.control.*?>
|
||||||
|
<?import javafx.geometry.*?>
|
||||||
<?import javafx.scene.layout.*?>
|
<?import javafx.scene.layout.*?>
|
||||||
<?import org.jackhuang.hmcl.ui.construct.ComponentList?>
|
<?import org.jackhuang.hmcl.ui.construct.ComponentList?>
|
||||||
<?import com.jfoenix.controls.JFXProgressBar?>
|
<?import com.jfoenix.controls.JFXProgressBar?>
|
||||||
@@ -20,6 +21,9 @@
|
|||||||
</left>
|
</left>
|
||||||
<right>
|
<right>
|
||||||
<VBox>
|
<VBox>
|
||||||
|
<BorderPane.margin>
|
||||||
|
<Insets left="15.0" />
|
||||||
|
</BorderPane.margin>
|
||||||
<Label fx:id="lblType" BorderPane.alignment="CENTER_LEFT"/>
|
<Label fx:id="lblType" BorderPane.alignment="CENTER_LEFT"/>
|
||||||
</VBox>
|
</VBox>
|
||||||
</right>
|
</right>
|
||||||
@@ -33,6 +37,9 @@
|
|||||||
</left>
|
</left>
|
||||||
<right>
|
<right>
|
||||||
<VBox>
|
<VBox>
|
||||||
|
<BorderPane.margin>
|
||||||
|
<Insets left="15.0" />
|
||||||
|
</BorderPane.margin>
|
||||||
<Label fx:id="lblCharacter" BorderPane.alignment="CENTER_LEFT"/>
|
<Label fx:id="lblCharacter" BorderPane.alignment="CENTER_LEFT"/>
|
||||||
</VBox>
|
</VBox>
|
||||||
</right>
|
</right>
|
||||||
@@ -46,6 +53,9 @@
|
|||||||
</left>
|
</left>
|
||||||
<right>
|
<right>
|
||||||
<VBox>
|
<VBox>
|
||||||
|
<BorderPane.margin>
|
||||||
|
<Insets left="15.0" />
|
||||||
|
</BorderPane.margin>
|
||||||
<Label fx:id="lblEmail" BorderPane.alignment="CENTER_LEFT"/>
|
<Label fx:id="lblEmail" BorderPane.alignment="CENTER_LEFT"/>
|
||||||
</VBox>
|
</VBox>
|
||||||
</right>
|
</right>
|
||||||
@@ -59,13 +69,14 @@
|
|||||||
</left>
|
</left>
|
||||||
<right>
|
<right>
|
||||||
<VBox>
|
<VBox>
|
||||||
|
<BorderPane.margin>
|
||||||
|
<Insets left="15.0" />
|
||||||
|
</BorderPane.margin>
|
||||||
<Label fx:id="lblServer" BorderPane.alignment="CENTER_LEFT"/>
|
<Label fx:id="lblServer" BorderPane.alignment="CENTER_LEFT"/>
|
||||||
</VBox>
|
</VBox>
|
||||||
</right>
|
</right>
|
||||||
</BorderPane>
|
</BorderPane>
|
||||||
</ComponentList>
|
</ComponentList>
|
||||||
|
|
||||||
</VBox>
|
|
||||||
<BorderPane pickOnBounds="false" style="-fx-padding: 4;">
|
<BorderPane pickOnBounds="false" style="-fx-padding: 4;">
|
||||||
<left>
|
<left>
|
||||||
<JFXButton BorderPane.alignment="BOTTOM_LEFT" fx:id="btnDelete" onMouseClicked="#onDelete"
|
<JFXButton BorderPane.alignment="BOTTOM_LEFT" fx:id="btnDelete" onMouseClicked="#onDelete"
|
||||||
@@ -78,5 +89,6 @@
|
|||||||
prefWidth="30" prefHeight="30"/>
|
prefWidth="30" prefHeight="30"/>
|
||||||
</right>
|
</right>
|
||||||
</BorderPane>
|
</BorderPane>
|
||||||
|
</VBox>
|
||||||
<JFXProgressBar fx:id="progressBar" StackPane.alignment="TOP_CENTER" visible="false" />
|
<JFXProgressBar fx:id="progressBar" StackPane.alignment="TOP_CENTER" visible="false" />
|
||||||
</fx:root>
|
</fx:root>
|
||||||
|
|||||||
Reference in New Issue
Block a user