mirror of
https://github.com/octopusYan/alist-gui.git
synced 2025-12-13 11:21:57 +08:00
pref: 优化GUI更新功能;项目分为gui和upgrade两个模块
This commit is contained in:
34
gui/src/main/resources/fxml/about-view.fxml
Normal file
34
gui/src/main/resources/fxml/about-view.fxml
Normal 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 fx:id="aListVersionLabel" styleClass="shield-name" text="%about.alist.version"/>
|
||||
<Label fx:id="aListVersion" styleClass="shield-version"/>
|
||||
</HBox>
|
||||
<HBox alignment="CENTER" styleClass="shield">
|
||||
<Label fx:id="appVersionLabel" styleClass="shield-name" text="%about.app.version"/>
|
||||
<Label styleClass="shield-version" text="v${project.version}"/>
|
||||
</HBox>
|
||||
<Button fx:id="checkAppVersion" onAction="#checkGuiUpdate" styleClass="flat" text="%about.app.update"/>
|
||||
<Button fx:id="checkAListVersion" onAction="#checkAListUpdate" styleClass="flat" text="%about.alist.update"/>
|
||||
</VBox>
|
||||
65
gui/src/main/resources/fxml/admin-panel.fxml
Normal file
65
gui/src/main/resources/fxml/admin-panel.fxml
Normal file
@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import atlantafx.base.layout.InputGroup?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import org.kordamp.ikonli.javafx.*?>
|
||||
<AnchorPane id="admin-panel" fx:id="adminPanel" maxHeight="250" maxWidth="520" prefHeight="250.0" prefWidth="520.0"
|
||||
stylesheets="@../css/admin-panel.css" xmlns="http://javafx.com/javafx/11.0.14-internal"
|
||||
xmlns:fx="http://javafx.com/fxml/1" fx:controller="cn.octopusyan.alistgui.controller.PasswordController">
|
||||
|
||||
<AnchorPane styleClass="header" prefWidth="520" AnchorPane.leftAnchor="0" AnchorPane.rightAnchor="0"
|
||||
AnchorPane.topAnchor="0">
|
||||
<Label text="%admin.pwd.title" AnchorPane.leftAnchor="10" AnchorPane.topAnchor="10"/>
|
||||
<Button onAction="#close" styleClass="flat" AnchorPane.rightAnchor="0" AnchorPane.topAnchor="0">
|
||||
<graphic>
|
||||
<FontIcon iconLiteral="fa-remove"/>
|
||||
</graphic>
|
||||
</Button>
|
||||
</AnchorPane>
|
||||
|
||||
<VBox alignment="CENTER" spacing="20"
|
||||
AnchorPane.bottomAnchor="30" AnchorPane.leftAnchor="0" AnchorPane.rightAnchor="0">
|
||||
|
||||
<Label fx:id="toptip" style="-fx-background-radius: 10;-fx-background-color: -color-button-bg-hover;"
|
||||
styleClass="admin-toptip, button, flat, danger" text="%admin.pwd.toptip"/>
|
||||
|
||||
<Pane style="-fx-background-color: transparent"/>
|
||||
|
||||
<HBox alignment="CENTER" styleClass="admin-field">
|
||||
<Label fx:id="usernameLabel" text="%admin.pwd.user-field"/>
|
||||
<InputGroup fx:id="userField" styleClass="admin-field-value">
|
||||
<TextField fx:id="usernameField" text="admin" editable="false"/>
|
||||
<Button fx:id="copyUsername" onAction="#copyUsername">
|
||||
<graphic>
|
||||
<FontIcon iconLiteral="fa-copy"/>
|
||||
</graphic>
|
||||
</Button>
|
||||
</InputGroup>
|
||||
</HBox>
|
||||
|
||||
<HBox alignment="CENTER" styleClass="admin-field">
|
||||
<Label fx:id="passwordLabel" text="%admin.pwd.pwd-field"/>
|
||||
<InputGroup styleClass="admin-field-value">
|
||||
<PasswordField fx:id="passwordField" editable="false"/>
|
||||
<Button fx:id="refreshPassword" onAction="#savePassword" visible="false" managed="false">
|
||||
<graphic>
|
||||
<FontIcon iconLiteral="fa-refresh"/>
|
||||
</graphic>
|
||||
</Button>
|
||||
<Button fx:id="savePassword" onAction="#savePassword" visible="false" managed="false">
|
||||
<graphic>
|
||||
<FontIcon iconLiteral="fa-save"/>
|
||||
</graphic>
|
||||
</Button>
|
||||
<Button fx:id="copyPassword" onAction="#copyPassword">
|
||||
<graphic>
|
||||
<FontIcon iconLiteral="fa-copy"/>
|
||||
</graphic>
|
||||
</Button>
|
||||
</InputGroup>
|
||||
</HBox>
|
||||
|
||||
</VBox>
|
||||
|
||||
</AnchorPane>
|
||||
51
gui/src/main/resources/fxml/main-view.fxml
Normal file
51
gui/src/main/resources/fxml/main-view.fxml
Normal file
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<VBox fx:id="mainView" prefHeight="700" prefWidth="720" stylesheets="@../css/main-view.css"
|
||||
xmlns="http://javafx.com/javafx/11.0.14-internal" xmlns:fx="http://javafx.com/fxml/1"
|
||||
alignment="TOP_CENTER"
|
||||
fx:controller="cn.octopusyan.alistgui.controller.MainController">
|
||||
<padding>
|
||||
<Insets left="10.0" right="10.0" top="10.0"/>
|
||||
</padding>
|
||||
<HBox alignment="TOP_CENTER" prefWidth="Infinity">
|
||||
<Label fx:id="homeLabel" alignment="CENTER" text="AList GUI"/>
|
||||
<Button fx:id="statusLabel" styleClass="danger" alignment="TOP_CENTER" text="%main.status.label-stop">
|
||||
<HBox.margin>
|
||||
<Insets left="-10.0" top="-5"/>
|
||||
</HBox.margin>
|
||||
</Button>
|
||||
</HBox>
|
||||
<HBox alignment="TOP_CENTER" prefWidth="Infinity" spacing="25.0">
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
|
||||
</padding>
|
||||
<VBox.margin>
|
||||
<Insets bottom="10.0" top="10.0"/>
|
||||
</VBox.margin>
|
||||
<Button fx:id="startButton" onAction="#start" styleClass="control-menu, success"
|
||||
text="%main.control.start"/>
|
||||
<Button fx:id="passwordButton" onAction="#adminPassword" styleClass="control-menu, success"
|
||||
text="%main.control.password"/>
|
||||
<Button fx:id="restartButton" onAction="#restart" styleClass="control-menu, success"
|
||||
text="%main.control.restart"/>
|
||||
<MenuButton fx:id="moreButton" styleClass="button-outlined, no-arrow" text="%main.control.more">
|
||||
<items>
|
||||
<MenuItem fx:id="browserButton" onAction="#openInBrowser" disable="true" text="%main.more.browser"/>
|
||||
<MenuItem fx:id="configButton" onAction="#openConfig" text="%main.more.open-config"/>
|
||||
<MenuItem fx:id="logButton" onAction="#openLogFolder" text="%main.more.open-log"/>
|
||||
</items>
|
||||
</MenuButton>
|
||||
</HBox>
|
||||
<ScrollPane fx:id="logAreaSp" fitToWidth="true" prefHeight="499.0" prefWidth="Infinity"
|
||||
styleClass="logArea" VBox.vgrow="ALWAYS">
|
||||
|
||||
<VBox fx:id="logArea" spacing="10">
|
||||
<VBox.margin>
|
||||
<Insets bottom="10.0" top="10.0"/>
|
||||
</VBox.margin>
|
||||
</VBox>
|
||||
</ScrollPane>
|
||||
</VBox>
|
||||
61
gui/src/main/resources/fxml/root-view.fxml
Normal file
61
gui/src/main/resources/fxml/root-view.fxml
Normal file
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import org.kordamp.ikonli.javafx.*?>
|
||||
<StackPane fx:id="rootPane" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml"
|
||||
prefHeight="720.0" prefWidth="770.0"
|
||||
styleClass="root-pane" stylesheets="@../css/root-view.css"
|
||||
fx:controller="cn.octopusyan.alistgui.controller.RootController">
|
||||
|
||||
<VBox prefHeight="720.0" prefWidth="770.0" spacing="10.0">
|
||||
|
||||
<HBox fx:id="windowHeader" alignment="CENTER_RIGHT" prefWidth="Infinity" spacing="10.0">
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
|
||||
</padding>
|
||||
<FontIcon fx:id="alwaysOnTopIcon" styleClass="icon-button"/>
|
||||
<FontIcon fx:id="minimizeIcon" styleClass="icon-button"/>
|
||||
<FontIcon fx:id="closeIcon" styleClass="icon-button"/>
|
||||
</HBox>
|
||||
|
||||
<TabPane fx:id="tabPane" prefWidth="Infinity" tabClosingPolicy="UNAVAILABLE" VBox.vgrow="ALWAYS">
|
||||
<padding>
|
||||
<Insets left="20.0" right="20.0"/>
|
||||
</padding>
|
||||
<Tab fx:id="mainTab" text="%root.tab.main">
|
||||
<graphic>
|
||||
<FontIcon iconColor="white" iconLiteral="fa-th-large"/>
|
||||
</graphic>
|
||||
<!-- 引入主页 -->
|
||||
<fx:include fx:id="mainController" source="main-view.fxml" prefWidth="Infinity" prefHeight="-Infinity"/>
|
||||
</Tab>
|
||||
<Tab fx:id="setupTab" text="%root.tab.setup">
|
||||
<graphic>
|
||||
<FontIcon iconColor="white" iconLiteral="fa-cog"/>
|
||||
</graphic>
|
||||
<!-- 引入设置页 -->
|
||||
<fx:include fx:id="setupController" source="setup-view.fxml" prefWidth="Infinity"
|
||||
prefHeight="-Infinity"/>
|
||||
</Tab>
|
||||
<Tab fx:id="aboutTab" 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>
|
||||
<Insets bottom="30.0"/>
|
||||
</padding>
|
||||
<Button fx:id="document" onAction="#openDocument" styleClass="success, flat" text="%root.foot.doc"/>
|
||||
<Button fx:id="github" onAction="#openGithub" styleClass="accent, flat" text="%root.foot.github"/>
|
||||
<Button fx:id="sponsor" styleClass="danger, flat" text="%root.foot.sponsor"
|
||||
visible="false" managed="false"/>
|
||||
</HBox>
|
||||
</VBox>
|
||||
</StackPane>
|
||||
46
gui/src/main/resources/fxml/setup-view.fxml
Normal file
46
gui/src/main/resources/fxml/setup-view.fxml
Normal file
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<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>
|
||||
<CheckBox fx:id="autoStartCheckBox" text="%setup.auto-start.label"/>
|
||||
<CheckBox fx:id="silentStartupCheckBox" text="%setup.silent-startup.label"/>
|
||||
<CheckBox fx:id="closeToTrayCheckBox" text="%setup.close-to-tray.label"/>
|
||||
<HBox alignment="CENTER_LEFT" spacing="10">
|
||||
<Label fx:id="themeLabel" text="%setup.theme"/>
|
||||
<ComboBox fx:id="themeComboBox"/>
|
||||
</HBox>
|
||||
<HBox alignment="CENTER_LEFT" spacing="10">
|
||||
<Label fx:id="languageLabel" text="%setup.language"/>
|
||||
<ComboBox fx:id="languageComboBox"/>
|
||||
</HBox>
|
||||
<HBox alignment="CENTER_LEFT" spacing="20">
|
||||
<Label fx:id="proxySetupLabel" 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 fx:id="hostLabel" text="%setup.proxy.host"/>
|
||||
<TextField fx:id="proxyHost" promptText="127.0.0.1" GridPane.columnIndex="1"/>
|
||||
<Label fx:id="portLabel" text="%setup.proxy.port" GridPane.rowIndex="1"/>
|
||||
<TextField fx:id="proxyPort" promptText="8080" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
|
||||
</GridPane>
|
||||
</VBox>
|
||||
Reference in New Issue
Block a user