feat: 语言切换支持、布局重写、配置读取切换为jackson-yaml

This commit is contained in:
2024-09-05 01:46:48 +08:00
parent 7599524df1
commit fecdee3664
44 changed files with 1843 additions and 887 deletions

View File

@ -1,3 +1,3 @@
app.name=${project.name}
app.title=alist gui
app.title=AList GUI
app.version=${project.version}

View File

@ -0,0 +1,87 @@
/**************************************************
* Main View
**************************************************/
#homeLabel {
-fx-font-size: 35;
-fx-font-weight: bold;
}
#statusLabel {
-fx-padding: 2 5 2 5;
-fx-text-fill: white;
-fx-font-size: 15;
-fx-background-color: #1bc964;
-fx-background-radius: 10;
-fx-text-alignment: CENTER;
-fx-border-radius: 10;
}
.control-menu {
-fx-font-size: 15;
-fx-background-radius: 15;
-fx-padding: 10 40 10 40;
-fx-border-radius: 15;
-fx-border-width: 2;
-fx-opacity: 0.9;
}
.control-menu:hover {
-fx-opacity: 1;
}
#startButton {
-fx-background-color: #fa6057;
-fx-border-color: #fa6057;
-fx-text-fill: white;
}
#passwordButton {
-fx-background-color: #1bc964;
-fx-border-color: #1bc964;
}
#restartButton {
-fx-background-color: linear-gradient(#57b4f2, #9198e5);
-fx-border-color: linear-gradient(#57b4f2, #9198e5);
-fx-text-fill: white;
}
#moreButton {
-fx-background-color: transparent;
-fx-text-fill: #9254d1;
-fx-border-color: #9254d1;
-fx-border-width: 2;
}
#logArea {
-fx-font-family: "Lucida Console";
-fx-font-size: 20;
-fx-background-radius: 15;
-fx-border-radius: 15;
-fx-border-color: transparent;
-fx-background-insets: 0;
-fx-background-color: #e9e9e9;
}
#logArea:focused {
-fx-background-radius: 15;
-fx-border-radius: 15;
-fx-border-color: transparent;
-fx-background-color: #e9e9e9;
}
#logArea .content {
-fx-padding: 0 15 0 15;
-fx-background-radius: 15;
-fx-background-color: #e9e9e9;
-fx-border-radius: 15;
-fx-border-color: transparent;
}
#logArea .content:focused {
-fx-background-color: #e9e9e9;
}
#logArea .scroll-pane {
-fx-background-color: transparent;
}
#logArea .scroll-pane .viewport {
-fx-background-color: transparent;
}
/*# sourceMappingURL=main-view.css.map */

View File

@ -0,0 +1 @@
{"version":3,"sourceRoot":"","sources":["main-view.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;AAGA;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAIJ;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAIJ;EACE;;AAEA;EACE","file":"main-view.css"}

View File

@ -0,0 +1,91 @@
/**************************************************
* Main View
**************************************************/
#homeLabel {
-fx-font-size: 35;
-fx-font-weight: bold;
}
#statusLabel {
-fx-padding: 2 5 2 5;
-fx-text-fill: white;
-fx-font-size: 15;
-fx-background-color: #1bc964;
-fx-background-radius: 10;
-fx-text-alignment: CENTER;
-fx-border-radius: 10;
}
.control-menu {
-fx-font-size: 15;
-fx-background-radius: 15;
-fx-padding: 10 40 10 40;
-fx-border-radius: 15;
-fx-border-width: 2;
-fx-opacity: 0.9;
&:hover {
-fx-opacity: 1.0;
}
}
#startButton {
-fx-background-color: #fa6057;
-fx-border-color: #fa6057;
-fx-text-fill: white;
}
#passwordButton {
-fx-background-color: #1bc964;
-fx-border-color: #1bc964;
}
#restartButton {
-fx-background-color: linear-gradient(#57b4f2, #9198e5);
-fx-border-color: linear-gradient(#57b4f2, #9198e5);
-fx-text-fill: white;
}
#moreButton {
-fx-background-color: transparent;
-fx-text-fill: #9254d1;
-fx-border-color: #9254d1;
-fx-border-width: 2;
}
#logArea {
-fx-font-family: "Lucida Console";
-fx-font-size: 20;
-fx-background-radius: 15;
-fx-border-radius: 15;
-fx-border-color: transparent;
-fx-background-insets: 0;
-fx-background-color: #e9e9e9;
&:focused {
-fx-background-radius: 15;
-fx-border-radius: 15;
-fx-border-color: transparent;
-fx-background-color: #e9e9e9;
}
.content {
-fx-padding: 0 15 0 15;
-fx-background-radius: 15;
-fx-background-color: #e9e9e9;
-fx-border-radius: 15;
-fx-border-color: transparent;
&:focused {
-fx-background-color: #e9e9e9;
}
}
.scroll-pane {
-fx-background-color: transparent;
.viewport {
-fx-background-color: transparent;
}
}
}

View File

@ -1,176 +1,99 @@
@import "root.css";
/**************************************************
* Window Header
**************************************************/
#windowHeader .iconButton {
/*-fx-max-height: 5px;*/
/*-fx-max-width: 5px;*/
-fx-border-radius: 15;
#windowHeader .icon-button {
-fx-icon-code: fa-circle;
-fx-opacity: 0.5;
}
#rootPane #closeIcon {
-fx-color: #fa6057;
-fx-opacity: 0.5;
#windowHeader .icon-button:hover {
-fx-opacity: 1;
}
#rootPane #closeIcon:hover {
-fx-opacity: 1.0;
#windowHeader #closeIcon {
-fx-color: #fa6057;
-fx-background-color: #fa6057;
-fx-icon-color: #fa6057;
}
#rootPane #minimizeIcon {
-fx-color: #fbbc2e;
-fx-opacity: 0.5;
#windowHeader #minimizeIcon {
-fx-color: #fbbc2e;
-fx-background-color: #fbbc2e;
-fx-icon-color: #fbbc2e;
}
#rootPane #minimizeIcon:hover {
-fx-opacity: 1.0;
#windowHeader #alwaysOnTopIcon {
-fx-color: #27c940;
-fx-background-color: #27c940;
-fx-icon-color: #27c940;
}
#rootPane #alwaysOnTopIcon {
-fx-color: #27c940;
-fx-opacity: 0.5;
}
#rootPane #alwaysOnTopIcon:hover {
-fx-opacity: 1.0;
}
#rootPane #alwaysOnTopIcon:always-on-top {
-fx-opacity: 1.0;
#windowHeader #alwaysOnTopIcon:always-on-top {
-fx-opacity: 1;
}
/**************************************************
* Tab label
**************************************************/
#tabPane .tab-header-area {
-fx-background-radius: 10;
-fx-background-color: #0000;
-fx-background-radius: 0 0 0 0;
-fx-background-color: transparent;
}
#tabPane .headers-region {
-fx-alignment: TOP_CENTER;
-fx-background-color: #18181a;
-fx-background-radius: 10;
-fx-padding: 5 0 5 0;
-fx-alignment: TOP_CENTER;
-fx-background-color: #e9e9e9;
-fx-background-radius: 15;
-fx-padding: 5 0 5 0;
}
#tabPane .tab-header-background {
-fx-background-color: #0000;
-fx-background-color: transparent;
}
#tabPane .tab {
-fx-text-fill: white;
-fx-padding: 10 20 10 20;
-fx-background-radius: 10;
-fx-background-color: #0000;
-fx-border-width: 0;
-fx-padding: 10 20 10 20;
-fx-background-radius: 15;
-fx-background-color: transparent;
-fx-border-width: 0;
}
#tabPane .tab-label {
-fx-font-size: 15px;
-fx-text-fill: #707079;
#tabPane .tab .ikonli-font-icon {
-fx-icon-color: black;
}
#tabPane .tab .tab-label {
-fx-text-alignment: CENTER;
-fx-alignment: CENTER;
}
#tabPane .tab:selected {
-fx-background-color: #2c69e0;
-fx-background-color: #2c69e0;
}
#tabPane .tab:selected .ikonli-font-icon {
-fx-icon-color: white;
}
#tabPane .tab:selected .tab-label {
-fx-text-fill: white;
-fx-text-fill: white;
}
#tabPane .tab:selected .focus-indicator {
-fx-border-width: 0;
-fx-border-color: transparent;
-fx-border-insets: 0;
}
#tabPane .tab-label {
-fx-font-size: 15px;
}
/**************************************************
* Main View
* Window Footer
**************************************************/
#homeLabel {
-fx-font-size: 35px;
-fx-font-weight: bold;
-fx-text-fill: white;
-fx-font-family: 'JetBrains Mono';
#windowFooter .button {
-fx-font-size: 15;
-fx-background-color: transparent;
-fx-text-alignment: CENTER;
}
#windowFooter #document {
-fx-text-fill: #1bc964;
}
#windowFooter #github {
-fx-text-fill: #1f4ca6;
}
#windowFooter #sponsor {
-fx-text-fill: #f22760;
}
#windowFooter .ikonli-font-icon {
-fx-font-size: 15;
}
#statusLabel {
-fx-padding: 2 5 2 5;
-fx-text-fill: black;
-fx-background-color: #1bc964;
-fx-background-radius: 10;
-fx-text-alignment: CENTER;
-fx-border-radius: 10;
-fx-border-color: black;
}
.controlMenu {
-fx-font-size: 15;
-fx-background-radius: 10px;
-fx-padding: 10 40 10 40;
-fx-border-radius: 10;
}
.controlMenu:focused {
-fx-opacity: 0.5;
}
#startButton {
-fx-background-color: #fa6057;
-fx-text-fill: white;
-fx-opacity: 1.0;
}
#passwordButton {
-fx-background-color: #1bc964;
-fx-opacity: 1.0;
}
#restartButton {
-fx-background-color: linear-gradient(#57b4f2, #9198e5);
-fx-text-fill: white;
-fx-opacity: 1.0;
}
#moreButton {
-fx-background-color: #0000;
-fx-text-fill: #9254d1;
-fx-border-color: #9254d1;
-fx-border-width: 2px;
-fx-opacity: 1.0;
}
#tabPane .tab:selected .focus-indicator {
-fx-border-width: 0;
-fx-border-color: #0000;
}
#logArea {
-fx-text-fill: #e3e4e4;
-fx-font-family: 'JetBrains Mono';
-fx-font-size: 20;
-fx-background-radius: 15;
-fx-border-radius: 15;
-fx-border-color: transparent;
-fx-background-insets: 0;
-fx-background-color: #18181c;
}
#logArea .content {
-fx-padding: 15;
-fx-background-radius: 15;
-fx-background-color: #18181c;
-fx-border-radius: 15;
-fx-border-color: transparent;
}
#logArea .scroll-pane {
-fx-background-color: transparent;
}
#logArea .scroll-pane .viewport{
-fx-background-color: transparent;
}
#logArea:focused {
-fx-background-radius: 15;
-fx-border-radius: 15;
-fx-border-color: transparent;
-fx-background-color: #18181c;
}
/*# sourceMappingURL=root-view.css.map */

View File

@ -0,0 +1 @@
{"version":3,"sourceRoot":"","sources":["root-view.scss"],"names":[],"mappings":"AAAQ;AACR;AAAA;AAAA;AAIE;EACE;EACA;;AAEA;EACE;;AAIJ;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAEA;EACE;;;AAMN;AAAA;AAAA;AAME;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;EACA;;AAGF;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAKN;EACE;;;AAIJ;AAAA;AAAA;AAKE;EACE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE","file":"root-view.css"}

View File

@ -0,0 +1,126 @@
@import "root.css";
/**************************************************
* Window Header
**************************************************/
#windowHeader {
.icon-button {
-fx-icon-code: fa-circle;
-fx-opacity: 0.5;
&:hover {
-fx-opacity: 1.0;
}
}
#closeIcon {
-fx-color: #fa6057;
-fx-background-color: #fa6057;
-fx-icon-color: #fa6057;
}
#minimizeIcon {
-fx-color: #fbbc2e;
-fx-background-color: #fbbc2e;
-fx-icon-color: #fbbc2e;
}
#alwaysOnTopIcon {
-fx-color: #27c940;
-fx-background-color: #27c940;
-fx-icon-color: #27c940;
&:always-on-top {
-fx-opacity: 1.0;
}
}
}
/**************************************************
* Tab label
**************************************************/
#tabPane {
.tab-header-area {
-fx-background-radius: 0 0 0 0;
-fx-background-color: transparent;
}
.headers-region {
-fx-alignment: TOP_CENTER;
-fx-background-color: #e9e9e9;
-fx-background-radius: 15;
-fx-padding: 5 0 5 0;
}
.tab-header-background {
-fx-background-color: transparent;
}
.tab {
-fx-padding: 10 20 10 20;
-fx-background-radius: 15;
-fx-background-color: transparent;
-fx-border-width: 0;
.ikonli-font-icon {
-fx-icon-color: black;
}
.tab-label {
-fx-text-alignment: CENTER;
-fx-alignment: CENTER;
}
&:selected {
-fx-background-color: #2c69e0;
.ikonli-font-icon {
-fx-icon-color: white;
}
.tab-label {
-fx-text-fill: white;
}
.focus-indicator {
-fx-border-width: 0;
-fx-border-color: transparent;
-fx-border-insets: 0;
}
}
}
.tab-label {
-fx-font-size: 15px;
}
}
/**************************************************
* Window Footer
**************************************************/
#windowFooter {
.button {
-fx-font-size: 15;
-fx-background-color: transparent;
-fx-text-alignment: CENTER;
}
#document {
-fx-text-fill: #1bc964;
}
#github {
-fx-text-fill: #1f4ca6;
}
#sponsor {
-fx-text-fill: #f22760;
}
.ikonli-font-icon {
-fx-font-size: 15;
}
}

View File

@ -1,15 +1,14 @@
/**************************************************
* Root
**************************************************/
.rootPane {
-fx-background-color: black;
-fx-background-radius: 10;
-fx-border-radius: 10;
}
.root {
-fx-font-family: "Comic Sans MS";
-fx-font-size: 15;
-fx-font-weight: normal;
}
.root-pane {
-fx-background-radius: 15;
-fx-border-radius: 15;
}
/*# sourceMappingURL=root.css.map */

View File

@ -0,0 +1 @@
{"version":3,"sourceRoot":"","sources":["root.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;AAIA;EACE;EACA;;;AAGF;EACE;EACA","file":"root.css"}

View File

@ -0,0 +1,14 @@
/**************************************************
* Root
**************************************************/
.root {
-fx-font-size: 15;
-fx-font-weight: normal;
}
.root-pane {
-fx-background-radius: 15;
-fx-border-radius: 15;
}

View File

@ -0,0 +1,34 @@
/**************************************************
* Setup View
**************************************************/
#setupView .check-box {
-fx-font-size: 15;
}
#setupView .proxy-panel {
-fx-background-color: #e9e9e9;
-fx-background-radius: 15;
-fx-border-radius: 15;
-fx-border-width: 5;
}
#setupView .proxy-panel .radio-button {
-fx-background-color: transparent;
}
#setupView .proxy-label {
-fx-font-size: 15;
-fx-text-fill: #2c69e0;
-fx-text-alignment: CENTER;
}
#setupView .shield .label {
-fx-text-fill: white;
-fx-label-padding: 3 5 3 5;
}
#setupView .shield .shield-name {
-fx-background-color: #555555;
-fx-background-radius: 5 0 0 5;
}
#setupView .shield .shield-version {
-fx-background-color: #6969AA;
-fx-background-radius: 0 5 5 0;
}
/*# sourceMappingURL=setup-view.css.map */

View File

@ -0,0 +1 @@
{"version":3,"sourceRoot":"","sources":["setup-view.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;AAKE;EACE;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAIJ;EACE;EACA;EACA;;AAKA;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA","file":"setup-view.css"}

View File

@ -0,0 +1,45 @@
/**************************************************
* Setup View
**************************************************/
#setupView {
.check-box {
-fx-font-size: 15;
}
.proxy-panel {
-fx-background-color: #e9e9e9;
-fx-background-radius: 15;
-fx-border-radius: 15;
-fx-border-width: 5;
.radio-button {
-fx-background-color: transparent;
}
}
.proxy-label {
-fx-font-size: 15;
-fx-text-fill: #2c69e0;
-fx-text-alignment: CENTER;
}
.shield {
.label {
-fx-text-fill: white;
-fx-label-padding: 3 5 3 5;
}
.shield-name {
-fx-background-color: #555555;
-fx-background-radius: 5 0 0 5;
}
.shield-version {
-fx-background-color: #6969AA;
-fx-background-radius: 0 5 5 0;
}
}
}

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<VBox fx:id="mainView" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml"
stylesheets="@../css/main-view.css" prefWidth="720" prefHeight="700"
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"/>
<Label fx:id="statusLabel" alignment="TOP_CENTER" text="%main.status.label-running">
<HBox.margin>
<Insets left="-10.0" top="-5"/>
</HBox.margin>
</Label>
</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" styleClass="control-menu" text="%main.control.start"/>
<Button fx:id="passwordButton" styleClass="control-menu" text="%main.control.password"/>
<Button fx:id="restartButton" styleClass="control-menu" text="%main.control.restart"/>
<Button fx:id="moreButton" styleClass="control-menu" text="%main.control.more"/>
</HBox>
<TextArea fx:id="logArea" editable="false" prefWidth="Infinity"
text="123d1a32s1d3as21d3a2s1d3a2s1d3a2s1d3a2s1d3a2s1d3a2s1d32aasda3s21da32s1d32a1sd"
wrapText="true" VBox.vgrow="ALWAYS">
<VBox.margin>
<Insets bottom="10.0" top="10.0"/>
</VBox.margin>
</TextArea>
</VBox>

View File

@ -1,90 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import org.kordamp.ikonli.javafx.*?>
<VBox fx:id="rootPane" styleClass="rootPane" alignment="TOP_CENTER" prefHeight="620.0" prefWidth="700.0" spacing="10.0"
stylesheets="@../css/root-view.css" xmlns="http://javafx.com/javafx/11.0.14-internal"
xmlns:fx="http://javafx.com/fxml/1" fx:controller="cn.octopusyan.alistgui.controller.MainController">
<VBox fx:id="rootPane" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml"
alignment="TOP_CENTER" prefHeight="720.0" prefWidth="770.0" spacing="10.0"
styleClass="root-pane" stylesheets="@../css/root-view.css"
fx:controller="cn.octopusyan.alistgui.controller.RootController">
<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>
<Button fx:id="alwaysOnTopIcon" styleClass="iconButton"/>
<Button fx:id="minimizeIcon" styleClass="iconButton"/>
<Button fx:id="closeIcon" styleClass="iconButton"/>
<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" VBox.vgrow="ALWAYS" tabClosingPolicy="UNAVAILABLE">
<TabPane fx:id="tabPane" prefWidth="Infinity" tabClosingPolicy="UNAVAILABLE" VBox.vgrow="ALWAYS">
<padding>
<Insets bottom="10.0" left="20.0" right="20.0" top="10.0"/>
<Insets left="20.0" right="20.0"/>
</padding>
<Tab text="主页">
<Tab text="%root.tab.main">
<graphic>
<FontIcon iconLiteral="cil-library" iconColor="white"/>
<FontIcon iconColor="white" iconLiteral="fa-th-large"/>
</graphic>
<VBox>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
</padding>
<HBox styleClass="mainViewHeader" prefWidth="Infinity" alignment="TOP_CENTER">
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
</padding>
<Label fx:id="homeLabel" text="AList GUI" alignment="CENTER"/>
<Label fx:id="statusLabel" text="运行中" alignment="TOP_CENTER">
<HBox.margin>
<Insets left="-10.0" top="-5"/>
</HBox.margin>
</Label>
</HBox>
<HBox prefWidth="Infinity" alignment="TOP_CENTER" 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" styleClass="controlMenu" text="开始"/>
<Button fx:id="passwordButton" styleClass="controlMenu" text="密码"/>
<Button fx:id="restartButton" styleClass="controlMenu" text="重启"/>
<Button fx:id="moreButton" styleClass="controlMenu" text="更多"/>
</HBox>
<TextArea fx:id="logArea" editable="false" wrapText="true" prefWidth="Infinity" VBox.vgrow="ALWAYS"
text="123d1a32s1d3as21d3a2s1d3a2s1d3a2s1d3a2s1d3a2s1d3a2s1d32aasda3s21da32s1d32a1sd">
<VBox.margin>
<Insets bottom="10.0" top="10.0"/>
</VBox.margin>
</TextArea>
<HBox prefWidth="Infinity" alignment="CENTER" spacing="25.0">
<padding>
<Insets bottom="10.0" top="30.0"/>
</padding>
<Button fx:id="docmentLabel" text="文档" textAlignment="CENTER">
<graphic>
<FontIcon iconLiteral="cib-readme"/>
</graphic>
</Button>
<Button fx:id="gethubLabel" text="Github" textAlignment="CENTER">
<graphic>
<FontIcon iconLiteral="cib-github"/>
</graphic>
</Button>
<Button fx:id="otherLabel" text="赞助" textAlignment="CENTER">
<graphic>
<FontIcon iconLiteral="cib-buy-me-a-coffee"/>
</graphic>
</Button>
</HBox>
</VBox>
<!-- 引入主页 -->
<fx:include fx:id="mainController" source="main-view.fxml" prefWidth="Infinity" prefHeight="-Infinity"/>
</Tab>
<Tab fx:id="setupTab" text="设置">
<Tab text="%root.tab.setup">
<graphic>
<FontIcon iconLiteral="cil-settings" iconColor="white"/>
<FontIcon iconColor="white" iconLiteral="fa-cog"/>
</graphic>
<!-- 引入设置页 -->
<fx:include fx:id="setupController" source="setup-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" text="%root.foot.doc"/>
<Button fx:id="github" text="%root.foot.github"/>
<Button fx:id="sponsor" text="%root.foot.sponsor"/>
</HBox>
</VBox>

View File

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<GridPane fx:id="setupView" prefHeight="700" prefWidth="720" stylesheets="@../css/setup-view.css"
xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml"
fx:controller="cn.octopusyan.alistgui.controller.SetupController">
<padding>
<Insets left="10.0" right="10.0" top="20.0"/>
</padding>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" percentWidth="100"/>
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="SOMETIMES"/>
<RowConstraints vgrow="SOMETIMES"/>
</rowConstraints>
<VBox spacing="20">
<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 text="%setup.proxyInfo" styleClass="proxyInfo-label"/>
<ComboBox fx:id="proxySetupComboBox"/>
</HBox>
<!-- <HBox spacing="10" visible="false">-->
<!-- <RadioButton fx:id="noProxy" text="%proxyInfo.setup.label.no_proxy"/>-->
<!-- <RadioButton fx:id="systemProxy" text="%proxyInfo.setup.label.system"/>-->
<!-- <RadioButton fx:id="manualProxy" text="%proxyInfo.setup.label.manual"/>-->
<!-- </HBox>-->
<VBox fx:id="proxySetupPane" spacing="10">
<HBox spacing="20" alignment="CENTER_LEFT">
<Label text="%setup.proxyInfo.host"/>
<TextField fx:id="proxyHost" promptText="127.0.0.1"/>
</HBox>
<HBox spacing="20" alignment="CENTER_LEFT">
<Label text="%setup.proxyInfo.port"/>
<TextField fx:id="proxyPort" promptText="8080"/>
</HBox>
</VBox>
</VBox>
<AnchorPane GridPane.rowIndex="1">
<VBox alignment="CENTER" spacing="10"
AnchorPane.bottomAnchor="50" AnchorPane.rightAnchor="0" AnchorPane.topAnchor="0">
<HBox alignment="CENTER" styleClass="shield">
<Label text="%alist.version" styleClass="shield-name"/>
<Label fx:id="alistVersion" styleClass="shield-version"/>
</HBox>
<HBox alignment="CENTER" styleClass="shield">
<Label text="%app.version" styleClass="shield-name"/>
<Label text="${project.version}" styleClass="shield-version"/>
</HBox>
<Button text="%app.update"/>
<Button text="%alist.update"/>
</VBox>
</AnchorPane>
</GridPane>

View File

@ -0,0 +1,27 @@
root.tab.main=\u4E3B\u9875
root.tab.setup=\u8BBE\u7F6E
root.foot.doc=\u6587\u6863
root.foot.github=GitHub
root.foot.sponsor=\u8D5E\u52A9
main.control.start=\u5F00\u59CB
main.control.password=\u5BC6\u7801
main.control.restart=\u91CD\u542F
main.control.more=\u66F4\u591A
main.status.label-running=\u8FD0\u884C\u4E2D
main.status.label-stop=\u5DF2\u505C\u6B62
main.more.browser=\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00
main.more.open-log=\u6253\u5F00\u65E5\u5FD7\u6587\u4EF6\u5939
setup.proxyInfo=HTTP\u4EE3\u7406
setup.auto-start.label=\u5F00\u673A\u81EA\u542F
setup.silent-startup.label=\u9759\u9ED8\u542F\u52A8
setup.language=\u8BED\u8A00
alist.version=AList \u7248\u672C
app.version=GUI \u7248\u672C
alist.update=\u68C0\u67E5 AList \u7248\u672C
app.update=\u68C0\u67E5 GUI \u7248\u672C
setup.proxyInfo.host=\u4E3B\u673A
setup.proxyInfo.port=\u7AEF\u53E3
proxy.setup.label.no_proxy=\u4E0D\u4EE3\u7406
proxy.setup.label.system=\u7CFB\u7EDF\u4EE3\u7406
proxy.setup.label.manual=\u624B\u52A8\u8BBE\u7F6E

View File

@ -0,0 +1,27 @@
root.tab.main=Home
root.tab.setup=Setup
root.foot.doc=Document
root.foot.github=GitHub
root.foot.sponsor=Sponsor
main.control.start=Start
main.control.password=Password
main.control.restart=Restart
main.control.more=More
main.status.label-running=Running
main.status.label-stop=Stoped
main.more.browser=Open in browser
main.more.open-log=Open the log folder
setup.proxyInfo=HTTP PROXY
setup.auto-start.label=Auto start with PC
setup.silent-startup.label=Silent startup
setup.language=language
alist.version=AList Version
app.version=GUI Version
alist.update=Check AList Version
app.update=Check GUI Version
setup.proxyInfo.host=Host
setup.proxyInfo.port=Port
proxy.setup.label.no_proxy=No Proxy
proxy.setup.label.system=System Proxy
proxy.setup.label.manual=Manual Config

View File

@ -0,0 +1,27 @@
root.tab.main=\u4E3B\u9875
root.tab.setup=\u8BBE\u7F6E
root.foot.doc=\u6587\u6863
root.foot.github=GitHub
root.foot.sponsor=\u8D5E\u52A9
main.control.start=\u5F00\u59CB
main.control.password=\u5BC6\u7801
main.control.restart=\u91CD\u542F
main.control.more=\u66F4\u591A
main.status.label-running=\u8FD0\u884C\u4E2D
main.status.label-stop=\u5DF2\u505C\u6B62
main.more.browser=\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00
main.more.open-log=\u6253\u5F00\u65E5\u5FD7\u6587\u4EF6\u5939
setup.proxyInfo=HTTP\u4EE3\u7406
setup.auto-start.label=\u5F00\u673A\u81EA\u542F
setup.silent-startup.label=\u9759\u9ED8\u542F\u52A8
setup.language=\u8BED\u8A00
alist.version=AList \u7248\u672C
app.version=GUI \u7248\u672C
alist.update=\u68C0\u67E5 AList \u7248\u672C
app.update=\u68C0\u67E5 GUI \u7248\u672C
setup.proxyInfo.host=\u4E3B\u673A
setup.proxyInfo.port=\u7AEF\u53E3
proxy.setup.label.no_proxy=\u4E0D\u4EE3\u7406
proxy.setup.label.system=\u7CFB\u7EDF\u4EE3\u7406
proxy.setup.label.manual=\u624B\u52A8\u8BBE\u7F6E

View File

@ -5,7 +5,7 @@
<property name="CHARSET" value="utf-8"/>
<property name="logback.app" value="alist-gui"/>
<!-- 彩色日志格式 -->
<property name="CONSOLE_LOG_PATTERN" value="%highlight(%d{HH:mm:ss.SSS}) ${logback.app} %boldYellow([%thread]) %highlight(%-5level) %cyan(%logger{36}) - %mdc{client} [%X{trace_id}] %msg%n"/>
<property name="CONSOLE_LOG_PATTERN" value="%highlight(%d{YYYY:MM:dd HH:mm:ss.SSS}) ${logback.app} %boldYellow([%thread]) %highlight(%-5level) %cyan(%logger{36}) - %mdc{client} [%X{trace_id}] %msg%n"/>
<!--输出到控制台 ConsoleAppender-->
<appender name="consoleLog" class="ch.qos.logback.core.ConsoleAppender">