feat: 代理测试

todo: 关于页
This commit is contained in:
2024-09-09 20:15:49 +08:00
parent 88a2f705ba
commit a9dd63b251
23 changed files with 432 additions and 148 deletions

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<VBox fx:id="aboutView" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml"
prefHeight="700" prefWidth="720" spacing="30" alignment="CENTER"
stylesheets="@../css/about-view.css"
fx:controller="cn.octopusyan.alistgui.controller.AboutController">
<StackPane>
<padding>
<Insets bottom="10"/>
</padding>
<ImageView pickOnBounds="true" preserveRatio="true">
<Image url="@../assets/logo-about.png" backgroundLoading="true"/>
</ImageView>
</StackPane>
<HBox alignment="CENTER" styleClass="shield">
<Label styleClass="shield-name" text="%about.alist.version"/>
<Label fx:id="aListVersion" styleClass="shield-version"/>
</HBox>
<HBox alignment="CENTER" styleClass="shield">
<Label styleClass="shield-name" text="%about.app.version"/>
<Label styleClass="shield-version" text="v${project.version}"/>
</HBox>
<Button fx:id="checkAppVersion" text="%about.app.update"/>
<Button fx:id="checkAListVersion" onAction="#checkAListUpdate" text="%about.alist.update"/>
</VBox>

View File

@ -37,6 +37,13 @@
<!-- 引入设置页 -->
<fx:include fx:id="setupController" source="setup-view.fxml" prefWidth="Infinity" prefHeight="-Infinity"/>
</Tab>
<Tab text="%root.tab.about">
<graphic>
<FontIcon iconColor="white" iconLiteral="fa-info-circle"/>
</graphic>
<!-- 引入关于页 -->
<fx:include fx:id="aboutController" source="about-view.fxml" prefWidth="Infinity" prefHeight="-Infinity"/>
</Tab>
</TabPane>
<HBox fx:id="windowFooter" alignment="CENTER" prefWidth="Infinity" spacing="25.0">
<padding>

View File

@ -3,48 +3,39 @@
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane fx:id="setupView" prefHeight="700" prefWidth="720" stylesheets="@../css/setup-view.css"
xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="cn.octopusyan.alistgui.controller.SetupController">
<VBox fx:id="setupView" stylesheets="@../css/setup-view.css"
prefHeight="700" prefWidth="720" spacing="20"
xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="cn.octopusyan.alistgui.controller.SetupController">
<padding>
<Insets left="10.0" right="10.0" top="20.0"/>
</padding>
<VBox spacing="20" AnchorPane.topAnchor="0" AnchorPane.leftAnchor="0">
<CheckBox fx:id="autoStartCheckBox" text="%setup.auto-start.label"/>
<CheckBox fx:id="silentStartupCheckBox" text="%setup.silent-startup.label"/>
<HBox alignment="CENTER_LEFT" spacing="10">
<Label text="%setup.language"/>
<ComboBox fx:id="languageComboBox"/>
</HBox>
<HBox alignment="CENTER_LEFT" spacing="20">
<Label styleClass="proxy-label" text="%setup.proxy"/>
<ComboBox fx:id="proxySetupComboBox"/>
<Button fx:id="proxyCheck" text="%setup.proxy.test"/>
</HBox>
<VBox fx:id="proxySetupPane" spacing="10">
<HBox alignment="CENTER_LEFT" spacing="20">
<Label text="%setup.proxy.host"/>
<TextField fx:id="proxyHost" promptText="127.0.0.1"/>
</HBox>
<HBox alignment="CENTER_LEFT" spacing="20">
<Label text="%setup.proxy.port"/>
<TextField fx:id="proxyPort" promptText="8080"/>
</HBox>
</VBox>
</VBox>
<AnchorPane AnchorPane.rightAnchor="0" AnchorPane.bottomAnchor="0">
<VBox alignment="CENTER" spacing="10" AnchorPane.bottomAnchor="50" AnchorPane.rightAnchor="0"
AnchorPane.topAnchor="0">
<HBox alignment="CENTER" styleClass="shield">
<Label styleClass="shield-name" text="%alist.version"/>
<Label fx:id="aListVersion" styleClass="shield-version"/>
</HBox>
<HBox alignment="CENTER" styleClass="shield">
<Label styleClass="shield-name" text="%app.version"/>
<Label styleClass="shield-version" text="v${project.version}"/>
</HBox>
<Button fx:id="checkAppVersion" text="%app.update"/>
<Button fx:id="checkAListVersion" onAction="#checkAListUpdate" text="%alist.update"/>
</VBox>
</AnchorPane>
</AnchorPane>
<CheckBox fx:id="autoStartCheckBox" text="%setup.auto-start.label"/>
<CheckBox fx:id="silentStartupCheckBox" text="%setup.silent-startup.label"/>
<HBox alignment="CENTER_LEFT" spacing="10">
<Label text="%setup.language"/>
<ComboBox fx:id="languageComboBox"/>
</HBox>
<HBox alignment="CENTER_LEFT" spacing="20">
<Label styleClass="proxy-label" text="%setup.proxy"/>
<ComboBox fx:id="proxySetupComboBox"/>
<Button fx:id="proxyCheck" onAction="#proxyTest" text="%setup.proxy.test"/>
</HBox>
<GridPane fx:id="proxySetupPane" vgap="10" hgap="10">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" percentWidth="10"/>
<ColumnConstraints hgrow="SOMETIMES" percentWidth="40"/>
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="SOMETIMES"/>
<RowConstraints vgrow="SOMETIMES"/>
</rowConstraints>
<padding>
<Insets left="30"/>
</padding>
<Label text="%setup.proxy.host"/>
<TextField fx:id="proxyHost" promptText="127.0.0.1" GridPane.columnIndex="1"/>
<Label text="%setup.proxy.port" GridPane.rowIndex="1"/>
<TextField fx:id="proxyPort" promptText="8080" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
</GridPane>
</VBox>