mirror of
https://github.com/octopusYan/alist-gui.git
synced 2025-12-09 17:51:55 +08:00
pref: 优化GUI更新功能;项目分为gui和upgrade两个模块
This commit is contained in:
3
gui/src/main/resources/application.properties
Normal file
3
gui/src/main/resources/application.properties
Normal file
@ -0,0 +1,3 @@
|
||||
app.name=${project.name}
|
||||
app.title=AList GUI
|
||||
app.version=v${project.version}
|
||||
BIN
gui/src/main/resources/assets/logo-about.png
Normal file
BIN
gui/src/main/resources/assets/logo-about.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.8 KiB |
BIN
gui/src/main/resources/assets/logo-disabled.png
Normal file
BIN
gui/src/main/resources/assets/logo-disabled.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 960 B |
BIN
gui/src/main/resources/assets/logo.png
Normal file
BIN
gui/src/main/resources/assets/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
14
gui/src/main/resources/assets/logo.svg
Normal file
14
gui/src/main/resources/assets/logo.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<svg width="1252" height="1252" xmlns="http://www.w3.org/2000/svg" version="1.1">
|
||||
<g>
|
||||
<g id="#70c6beff">
|
||||
<path id="svg_2"
|
||||
d="m634.37,138.38c11.88,-1.36 24.25,1.3 34.18,8.09c14.96,9.66 25.55,24.41 34.49,39.51c40.59,68.03 81.45,135.91 122.02,203.96c54.02,90.99 108.06,181.97 161.94,273.06c37.28,63 74.65,125.96 112.18,188.82c24.72,41.99 50.21,83.54 73.84,126.16c10.18,17.84 15.77,38.44 14.93,59.03c-0.59,15.92 -3.48,32.28 -11.84,46.08c-11.73,19.46 -31.39,33.2 -52.71,40.36c-11.37,4.09 -23.3,6.87 -35.43,6.89c-132.32,-0.05 -264.64,0.04 -396.95,0.03c-11.38,-0.29 -22.95,-1.6 -33.63,-5.72c-7.81,-3.33 -15.5,-7.43 -21.61,-13.42c-10.43,-10.32 -17.19,-24.96 -15.38,-39.83c0.94,-10.39 3.48,-20.64 7.76,-30.16c4.15,-9.77 9.99,-18.67 15.06,-27.97c22.13,-39.47 45.31,-78.35 69.42,-116.65c7.72,-12.05 14.44,-25.07 25.12,-34.87c11.35,-10.39 25.6,-18.54 41.21,-19.6c12.55,-0.52 24.89,3.82 35.35,10.55c11.8,6.92 21.09,18.44 24.2,31.88c4.49,17.01 -0.34,34.88 -7.55,50.42c-8.09,17.65 -19.62,33.67 -25.81,52.18c-1.13,4.21 -2.66,9.52 0.48,13.23c3.19,3 7.62,4.18 11.77,5.22c12,2.67 24.38,1.98 36.59,2.06c45,-0.01 90,0 135,0c8.91,-0.15 17.83,0.3 26.74,-0.22c6.43,-0.74 13.44,-1.79 18.44,-6.28c3.3,-2.92 3.71,-7.85 2.46,-11.85c-2.74,-8.86 -7.46,-16.93 -12.12,-24.89c-119.99,-204.91 -239.31,-410.22 -360.56,-614.4c-3.96,-6.56 -7.36,-13.68 -13.03,-18.98c-2.8,-2.69 -6.95,-4.22 -10.77,-3.11c-3.25,1.17 -5.45,4.03 -7.61,6.57c-5.34,6.81 -10.12,14.06 -14.51,21.52c-20.89,33.95 -40.88,68.44 -61.35,102.64c-117.9,198.43 -235.82,396.85 -353.71,595.29c-7.31,13.46 -15.09,26.67 -23.57,39.43c-7.45,10.96 -16.49,21.23 -28.14,27.83c-13.73,7.94 -30.69,11.09 -46.08,6.54c-11.23,-3.47 -22.09,-9.12 -30.13,-17.84c-10.18,-10.08 -14.69,-24.83 -14.17,-38.94c0.52,-14.86 5.49,-29.34 12.98,-42.1c71.58,-121.59 143.62,-242.92 215.93,-364.09c37.2,-62.8 74.23,-125.69 111.64,-188.36c37.84,-63.5 75.77,-126.94 113.44,-190.54c21.02,-35.82 42.19,-71.56 64.28,-106.74c6.79,-11.15 15.58,-21.15 26.16,-28.85c8.68,-5.92 18.42,-11 29.05,-11.94z"
|
||||
fill="#70c6be"/>
|
||||
</g>
|
||||
<g id="#1ba0d8ff">
|
||||
<path id="svg_3"
|
||||
d="m628.35,608.38c17.83,-2.87 36.72,1.39 51.5,11.78c11.22,8.66 19.01,21.64 21.26,35.65c1.53,10.68 0.49,21.75 -3.44,31.84c-3.02,8.73 -7.35,16.94 -12.17,24.81c-68.76,115.58 -137.5,231.17 -206.27,346.75c-8.8,14.47 -16.82,29.47 -26.96,43.07c-7.37,9.11 -16.58,16.85 -27.21,21.89c-22.47,11.97 -51.79,4.67 -68.88,-13.33c-8.66,-8.69 -13.74,-20.63 -14.4,-32.84c-0.98,-12.64 1.81,-25.42 7.53,-36.69c5.03,-10.96 10.98,-21.45 17.19,-31.77c30.22,-50.84 60.17,-101.84 90.3,-152.73c41.24,-69.98 83.16,-139.55 124.66,-209.37c4.41,-7.94 9.91,-15.26 16.09,-21.9c8.33,-8.46 18.9,-15.3 30.8,-17.16z"
|
||||
fill="#1ba0d8"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.7 KiB |
BIN
gui/src/main/resources/assets/windows/alist-gui.ico
Normal file
BIN
gui/src/main/resources/assets/windows/alist-gui.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
22
gui/src/main/resources/css/about-view.scss
Normal file
22
gui/src/main/resources/css/about-view.scss
Normal file
@ -0,0 +1,22 @@
|
||||
/**************************************************
|
||||
* About View
|
||||
**************************************************/
|
||||
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
31
gui/src/main/resources/css/admin-panel.scss
Normal file
31
gui/src/main/resources/css/admin-panel.scss
Normal file
@ -0,0 +1,31 @@
|
||||
/**************************************************
|
||||
* Admin Password Panel
|
||||
**************************************************/
|
||||
|
||||
#admin-panel {
|
||||
-fx-background-color: -color-bg-default;
|
||||
-fx-background-radius: 15;
|
||||
-fx-border-radius: 15;
|
||||
|
||||
.header {
|
||||
.label {
|
||||
-fx-font-size: 20;
|
||||
}
|
||||
|
||||
.button, .button.ikonli-font-icon {
|
||||
-fx-background-radius: 15;
|
||||
}
|
||||
}
|
||||
|
||||
.admin-field {
|
||||
-fx-spacing: 10;
|
||||
|
||||
.text-field {
|
||||
-fx-pref-width: 100;
|
||||
}
|
||||
|
||||
&-value {
|
||||
//-fx-padding: 5 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
71
gui/src/main/resources/css/main-view.scss
Normal file
71
gui/src/main/resources/css/main-view.scss
Normal file
@ -0,0 +1,71 @@
|
||||
/**************************************************
|
||||
* Main View
|
||||
**************************************************/
|
||||
#homeLabel {
|
||||
-fx-font-size: 35;
|
||||
-fx-font-weight: bold;
|
||||
}
|
||||
|
||||
#statusLabel {
|
||||
-fx-padding: 2 5 2 5;
|
||||
-fx-font-size: 15;
|
||||
-fx-background-radius: 10;
|
||||
-fx-text-alignment: CENTER;
|
||||
-fx-border-radius: 10;
|
||||
}
|
||||
|
||||
.control-menu, #moreButton {
|
||||
-fx-font-size: 15;
|
||||
-fx-background-radius: 15;
|
||||
-fx-padding: 10 40;
|
||||
-fx-border-radius: 15;
|
||||
-fx-border-width: 2;
|
||||
}
|
||||
|
||||
#startButton {
|
||||
-color-button-bg-focused: -color-button-bg;
|
||||
-fx-border-color: -color-button-bg;
|
||||
}
|
||||
|
||||
#passwordButton {
|
||||
-color-button-bg: -color-success-3;
|
||||
-color-button-bg-hover: -color-button-bg;
|
||||
-color-button-bg-focused: -color-button-bg;
|
||||
-color-button-bg-pressed: -color-button-bg;
|
||||
-fx-border-color: -color-button-bg;
|
||||
}
|
||||
|
||||
#restartButton {
|
||||
-color-button-bg: linear-gradient(to bottom right, -color-accent-3, -color-chart-6);
|
||||
-color-button-bg-hover: -color-button-bg;
|
||||
-color-button-bg-focused: -color-button-bg;
|
||||
-color-button-bg-pressed: -color-button-bg;
|
||||
-fx-border-color: -color-button-bg;
|
||||
}
|
||||
|
||||
#moreButton {
|
||||
-fx-padding: 3 30;
|
||||
|
||||
-fx-background-color: transparent;
|
||||
-fx-border-color: -color-chart-6-alpha70;
|
||||
-color-button-fg: -color-chart-6-alpha70;
|
||||
|
||||
&:hover {
|
||||
-fx-background-color: -color-chart-6-alpha20;
|
||||
-fx-border-color: -color-chart-6-alpha70;
|
||||
}
|
||||
|
||||
.context-menu, .menu-item {
|
||||
-fx-background-radius: 15;
|
||||
-fx-border-radius: 15;
|
||||
}
|
||||
}
|
||||
|
||||
.logArea {
|
||||
-fx-font-family: "Lucida Console";
|
||||
-fx-font-size: 15;
|
||||
-fx-background-radius: 15;
|
||||
-fx-border-radius: 15;
|
||||
-fx-padding: 5 15 5 15;
|
||||
-fx-background-color: -color-neutral-muted;
|
||||
}
|
||||
112
gui/src/main/resources/css/root-view.scss
Normal file
112
gui/src/main/resources/css/root-view.scss
Normal file
@ -0,0 +1,112 @@
|
||||
@import "root.css";
|
||||
|
||||
/**************************************************
|
||||
* Window Header
|
||||
**************************************************/
|
||||
#windowHeader {
|
||||
.icon-button {
|
||||
-fx-icon-code: fa-circle;
|
||||
-fx-opacity: 0.5;
|
||||
|
||||
&:hover {
|
||||
-fx-opacity: 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
#closeIcon {
|
||||
-fx-icon-color: -color-chart-1;
|
||||
}
|
||||
|
||||
#minimizeIcon {
|
||||
-fx-icon-color: -color-chart-2;
|
||||
}
|
||||
|
||||
#alwaysOnTopIcon {
|
||||
-fx-icon-color: -color-chart-3;
|
||||
|
||||
&:always-on-top {
|
||||
-fx-opacity: 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**************************************************
|
||||
* Tab label
|
||||
**************************************************/
|
||||
#tabPane {
|
||||
-fx-background-color: transparent;
|
||||
|
||||
.tab-header-area {
|
||||
-fx-background-color: transparent;
|
||||
|
||||
.tab-header-background {
|
||||
-fx-background-color: transparent;
|
||||
}
|
||||
|
||||
.headers-region {
|
||||
//-fx-background-color: #f9f9fb;
|
||||
-fx-background-color: -color-neutral-muted;
|
||||
-fx-background-radius: 10;
|
||||
|
||||
.tab {
|
||||
-fx-padding: 5;
|
||||
-fx-background-color: transparent;
|
||||
|
||||
.tab-container {
|
||||
-fx-background-color: transparent;
|
||||
-fx-border-width: 0;
|
||||
|
||||
.tab-label {
|
||||
-fx-pref-width: 80;
|
||||
-fx-padding: 10 0;
|
||||
-fx-background-radius: 10;
|
||||
-fx-text-alignment: CENTER;
|
||||
-fx-alignment: CENTER;
|
||||
-fx-font-size: 15px;
|
||||
-fx-border-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:selected {
|
||||
|
||||
.tab-label {
|
||||
-fx-background-color: -color-accent-5;
|
||||
-fx-text-fill: white;
|
||||
}
|
||||
|
||||
.ikonli-font-icon {
|
||||
-fx-icon-color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* Window Footer
|
||||
**************************************************/
|
||||
|
||||
#windowFooter {
|
||||
.button {
|
||||
-fx-font-size: 15;
|
||||
-fx-text-alignment: CENTER;
|
||||
}
|
||||
|
||||
.ikonli-font-icon {
|
||||
-fx-font-size: 15;
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* Modal Pane
|
||||
**************************************************/
|
||||
|
||||
.modal-pane {
|
||||
-fx-background-radius: 15;
|
||||
|
||||
.scrollable-content {
|
||||
-fx-background-radius: 15;
|
||||
}
|
||||
}
|
||||
20
gui/src/main/resources/css/root.scss
Normal file
20
gui/src/main/resources/css/root.scss
Normal file
@ -0,0 +1,20 @@
|
||||
/**************************************************
|
||||
* Root
|
||||
**************************************************/
|
||||
.root {
|
||||
-fx-font-size: 15;
|
||||
-fx-font-weight: bolder;
|
||||
}
|
||||
|
||||
.root-pane {
|
||||
|
||||
-fx-background-radius: 15;
|
||||
-fx-border-radius: 15;
|
||||
|
||||
// 窗口阴影
|
||||
//-fx-background-color: rgba(255, 255, 255, 1);
|
||||
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.3), 15, 0, 0, 0);
|
||||
-fx-background-insets: 20;
|
||||
-fx-padding: 20;
|
||||
}
|
||||
|
||||
27
gui/src/main/resources/css/setup-view.scss
Normal file
27
gui/src/main/resources/css/setup-view.scss
Normal file
@ -0,0 +1,27 @@
|
||||
/**************************************************
|
||||
* Setup View
|
||||
**************************************************/
|
||||
|
||||
#setupView {
|
||||
.check-box {
|
||||
-fx-font-size: 15;
|
||||
}
|
||||
|
||||
.proxy-panel {
|
||||
-fx-background-color: -color-neutral-muted;
|
||||
-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: -color-accent-5;
|
||||
-fx-text-alignment: CENTER;
|
||||
}
|
||||
}
|
||||
|
||||
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>
|
||||
54
gui/src/main/resources/language/language.properties
Normal file
54
gui/src/main/resources/language/language.properties
Normal file
@ -0,0 +1,54 @@
|
||||
label.cancel=\u53D6\u6D88
|
||||
root.tab.main=\u4E3B\u9875
|
||||
root.tab.setup=\u8BBE\u7F6E
|
||||
root.tab.about=\u5173\u4E8E
|
||||
root.foot.doc=\u6587\u6863
|
||||
root.foot.github=GitHub
|
||||
root.foot.sponsor=\u8D5E\u52A9 AList
|
||||
main.control.start=\u5F00\u59CB
|
||||
main.control.stop=\u505C\u6B62
|
||||
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-config=\u6253\u5F00\u914D\u7F6E\u6587\u4EF6
|
||||
main.more.open-log=\u6253\u5F00\u65E5\u5FD7\u6587\u4EF6\u5939
|
||||
alist.status.start.running=AList \u6B63\u5728\u8FD0\u884C\u3002\u3002\u3002
|
||||
alist.status.start=\u6B63\u5728\u542F\u52A8 AList
|
||||
alist.status.stop=\u6B63\u5728\u505C\u6B62AList
|
||||
alist.status.stop.stopped=AList \u5DF2\u505C\u6B62
|
||||
setup.proxy=HTTP\u4EE3\u7406
|
||||
setup.auto-start.label=\u5F00\u673A\u81EA\u542F
|
||||
setup.silent-startup.label=\u9759\u9ED8\u542F\u52A8
|
||||
setup.language=\u8BED\u8A00
|
||||
proxy.setup.label.no_proxy=\u4E0D\u4EE3\u7406
|
||||
proxy.setup.label.system=\u7CFB\u7EDF\u4EE3\u7406
|
||||
proxy.setup.label.manual=\u624B\u52A8\u8BBE\u7F6E
|
||||
setup.proxy.host=\u4E3B\u673A
|
||||
setup.proxy.port=\u7AEF\u53E3
|
||||
setup.proxy.test=\u6D4B\u8BD5
|
||||
proxy.test.header=\u8BF7\u8F93\u5165\u60A8\u8981\u68C0\u67E5\u7684\u4EFB\u4F55URL\uFF1A
|
||||
proxy.test.title=\u68C0\u67E5\u4EE3\u7406\u8BBE\u7F6E
|
||||
proxy.test.result.success=\u8FDE\u63A5\u6210\u529F
|
||||
proxy.test.result.failed=\u8FDE\u63A5\u95EE\u9898:
|
||||
about.alist.version=AList \u7248\u672C
|
||||
about.app.version=GUI \u7248\u672C
|
||||
about.alist.update=\u68C0\u67E5 AList \u7248\u672C
|
||||
about.app.update=\u68C0\u67E5 GUI \u7248\u672C
|
||||
setup.theme=\u4E3B\u9898
|
||||
update.current=\u5F53\u524D\u7248\u672C
|
||||
update.remote=\u6700\u65B0\u7248\u672C
|
||||
update.upgrade.not=\u5DF2\u662F\u6700\u65B0\u7248\u672C
|
||||
update.upgrade.new=\u68C0\u67E5\u5230\u65B0\u7248\u672C
|
||||
msg.alist.download.notfile=\u6CA1\u68C0\u6D4B\u5230AList\u6587\u4EF6\uFF0C\u662F\u5426\u73B0\u5728\u4E0B\u8F7D\uFF1F
|
||||
msg.alist.pwd.copy=\u590D\u5236\u6210\u529F
|
||||
admin.pwd.title=\u7BA1\u7406\u5458\u5BC6\u7801
|
||||
admin.pwd.toptip=\u65B0\u5BC6\u7801\u53EA\u4F1A\u663E\u793A\u4E00\u6B21
|
||||
admin.pwd.user-field=\u7528\u6237\uFF1A
|
||||
admin.pwd.pwd-field=\u5BC6\u7801\uFF1A
|
||||
setup.close-to-tray.label=\u5173\u95ED\u65F6\u6700\u5C0F\u5316\u5230\u6258\u76D8
|
||||
|
||||
|
||||
|
||||
53
gui/src/main/resources/language/language_en.properties
Normal file
53
gui/src/main/resources/language/language_en.properties
Normal file
@ -0,0 +1,53 @@
|
||||
label.cancel=Cancel
|
||||
root.tab.main=Home
|
||||
root.tab.setup=Setup
|
||||
root.tab.about=About
|
||||
root.foot.doc=Document
|
||||
root.foot.github=GitHub
|
||||
root.foot.sponsor=Sponsor AList
|
||||
main.control.start=Start
|
||||
main.control.stop=Stop
|
||||
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-config=Open configuration file
|
||||
main.more.open-log=Open the log folder
|
||||
alist.status.start=Starting AList
|
||||
alist.status.start.running=AList is running...
|
||||
alist.status.stop=Stopping AList
|
||||
alist.status.stop.stopped=AList has stopped
|
||||
setup.proxy=HTTP PROXY
|
||||
setup.auto-start.label=Auto start with PC
|
||||
setup.silent-startup.label=Silent startup
|
||||
setup.language=language
|
||||
proxy.setup.label.no_proxy=No Proxy
|
||||
proxy.setup.label.system=System Proxy
|
||||
proxy.setup.label.manual=Manual Config
|
||||
setup.proxy.host=Host
|
||||
setup.proxy.port=Port
|
||||
setup.proxy.test=Check connection
|
||||
proxy.test.header=Enter any URL to check connection to:
|
||||
proxy.test.title=Check Proxy Settings
|
||||
proxy.test.result.success=Connection successful
|
||||
proxy.test.result.failed=Problem with connection:
|
||||
about.alist.version=AList Version
|
||||
about.app.version=GUI Version
|
||||
about.alist.update=Check AList Version
|
||||
about.app.update=Check GUI Version
|
||||
setup.theme=Theme
|
||||
update.current=Current Version
|
||||
update.remote=Latest Version
|
||||
update.upgrade.not=It is already the latest version
|
||||
update.upgrade.new=Detected a new version
|
||||
msg.alist.download.notfile=AList file not detected, download now?
|
||||
msg.alist.pwd.copy=Copy successful
|
||||
admin.pwd.title=Admin Password
|
||||
admin.pwd.toptip=The new password will only be displayed once
|
||||
admin.pwd.user-field=User:
|
||||
admin.pwd.pwd-field=Password :
|
||||
setup.close-to-tray.label=Minimize to tray when closed
|
||||
|
||||
|
||||
53
gui/src/main/resources/language/language_zh_CN.properties
Normal file
53
gui/src/main/resources/language/language_zh_CN.properties
Normal file
@ -0,0 +1,53 @@
|
||||
label.cancel=\u53D6\u6D88
|
||||
root.tab.main=\u4E3B\u9875
|
||||
root.tab.setup=\u8BBE\u7F6E
|
||||
root.tab.about=\u5173\u4E8E
|
||||
root.foot.doc=\u6587\u6863
|
||||
root.foot.github=GitHub
|
||||
root.foot.sponsor=\u8D5E\u52A9 AList
|
||||
main.control.start=\u5F00\u59CB
|
||||
main.control.stop=\u505C\u6B62
|
||||
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-config=\u6253\u5F00\u914D\u7F6E\u6587\u4EF6
|
||||
main.more.open-log=\u6253\u5F00\u65E5\u5FD7\u6587\u4EF6\u5939
|
||||
alist.status.stop.stopped=AList \u5DF2\u505C\u6B62
|
||||
alist.status.start=\u6B63\u5728\u542F\u52A8 AList
|
||||
alist.status.stop=\u6B63\u5728\u505C\u6B62AList
|
||||
alist.status.start.running=AList \u6B63\u5728\u8FD0\u884C\u3002\u3002\u3002
|
||||
setup.proxy=HTTP\u4EE3\u7406
|
||||
setup.auto-start.label=\u5F00\u673A\u81EA\u542F
|
||||
setup.silent-startup.label=\u9759\u9ED8\u542F\u52A8
|
||||
setup.language=\u8BED\u8A00
|
||||
proxy.setup.label.no_proxy=\u4E0D\u4EE3\u7406
|
||||
proxy.setup.label.system=\u7CFB\u7EDF\u4EE3\u7406
|
||||
proxy.setup.label.manual=\u624B\u52A8\u8BBE\u7F6E
|
||||
setup.proxy.host=\u4E3B\u673A
|
||||
setup.proxy.port=\u7AEF\u53E3
|
||||
setup.proxy.test=\u6D4B\u8BD5
|
||||
proxy.test.header=\u8BF7\u8F93\u5165\u60A8\u8981\u68C0\u67E5\u7684\u4EFB\u4F55URL\uFF1A
|
||||
proxy.test.title=\u68C0\u67E5\u4EE3\u7406\u8BBE\u7F6E
|
||||
proxy.test.result.success=\u8FDE\u63A5\u6210\u529F
|
||||
proxy.test.result.failed=\u8FDE\u63A5\u95EE\u9898:
|
||||
about.alist.version=AList \u7248\u672C
|
||||
about.app.version=GUI \u7248\u672C
|
||||
about.alist.update=\u68C0\u67E5 AList \u7248\u672C
|
||||
about.app.update=\u68C0\u67E5 GUI \u7248\u672C
|
||||
setup.theme=\u4E3B\u9898
|
||||
update.current=\u5F53\u524D\u7248\u672C
|
||||
update.remote=\u6700\u65B0\u7248\u672C
|
||||
update.upgrade.not=\u5DF2\u662F\u6700\u65B0\u7248\u672C
|
||||
update.upgrade.new=\u68C0\u67E5\u5230\u65B0\u7248\u672C
|
||||
msg.alist.download.notfile=\u6CA1\u68C0\u6D4B\u5230AList\u6587\u4EF6\uFF0C\u662F\u5426\u73B0\u5728\u4E0B\u8F7D\uFF1F
|
||||
msg.alist.pwd.copy=\u590D\u5236\u6210\u529F
|
||||
admin.pwd.title=\u7BA1\u7406\u5458\u5BC6\u7801
|
||||
admin.pwd.toptip=\u65B0\u5BC6\u7801\u53EA\u4F1A\u663E\u793A\u4E00\u6B21
|
||||
admin.pwd.user-field=\u7528\u6237\uFF1A
|
||||
admin.pwd.pwd-field=\u5BC6\u7801\uFF1A
|
||||
setup.close-to-tray.label=\u5173\u95ED\u65F6\u6700\u5C0F\u5316\u5230\u6258\u76D8
|
||||
|
||||
|
||||
99
gui/src/main/resources/logback.xml
Normal file
99
gui/src/main/resources/logback.xml
Normal file
@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
|
||||
<property name="logback.logdir" value="log"/>
|
||||
<property name="CHARSET" value="utf-8"/>
|
||||
<property name="logback.app" value="alist-gui"/>
|
||||
<!-- 彩色日志格式 -->
|
||||
<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">
|
||||
<encoder>
|
||||
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
|
||||
<charset>${CHARSET}</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!--输出到文件 fileLog-->
|
||||
<appender name="fileLog" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<!--如果只是想要 Error 级别的日志,那么需要过滤一下,默认是 info 级别的,ThresholdFilter-->
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"/>
|
||||
<File>${logback.logdir}/${logback.app}.info.log</File>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!--文件路径,定义了日志的切分方式——把每一天的日志归档到一个文件中,以防止日志填满整个磁盘空间-->
|
||||
<FileNamePattern>${logback.logdir}/${logback.app}_%d{yyyy-MM-dd}.info.log</FileNamePattern>
|
||||
<!--只保留最近30天的日志-->
|
||||
<maxHistory>30</maxHistory>
|
||||
<!--用来指定日志文件的上限大小,那么到了这个值,就会删除旧的日志-->
|
||||
<totalSizeCap>1GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
<!--日志输出编码格式化-->
|
||||
<encoder>
|
||||
<charset>${CHARSET}</charset>
|
||||
<pattern>%d [%thread] %-5level %logger{36} %line - %mdc{client} [%X{trace_id}] %msg%n</pattern>
|
||||
</encoder>
|
||||
<!--只打印错误日志-->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>INFO</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="fileLog-debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<!--如果只是想要 Error 级别的日志,那么需要过滤一下,默认是 info 级别的,ThresholdFilter-->
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"/>
|
||||
<File>${logback.logdir}/${logback.app}.debug.log</File>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!--文件路径,定义了日志的切分方式——把每一天的日志归档到一个文件中,以防止日志填满整个磁盘空间-->
|
||||
<FileNamePattern>${logback.logdir}/${logback.app}_%d{yyyy-MM-dd}.debug.log</FileNamePattern>
|
||||
<!--只保留最近30天的日志-->
|
||||
<maxHistory>30</maxHistory>
|
||||
<!--用来指定日志文件的上限大小,那么到了这个值,就会删除旧的日志-->
|
||||
<totalSizeCap>1GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
<!--日志输出编码格式化-->
|
||||
<encoder>
|
||||
<charset>UTF-8</charset>
|
||||
<pattern>%d [%thread] %-5level %logger{36} %line - %mdc{client} [%X{trace_id}] %msg%n</pattern>
|
||||
</encoder>
|
||||
<!--只打印错误日志-->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>DEBUG</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 错误日志 -->
|
||||
<appender name="fileLog-err" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<File>${logback.logdir}/${logback.app}.err.log</File>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<FileNamePattern>${logback.logdir}/${logback.app}_%d{yyyy-MM-dd}.err.log</FileNamePattern>
|
||||
<maxHistory>7</maxHistory>
|
||||
<totalSizeCap>1GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<charset>UTF-8</charset>
|
||||
<pattern>%d [%thread] %-5level %logger{36} %line - %mdc{client} [%X{trace_id}] %msg%n</pattern>
|
||||
</encoder>
|
||||
<!--只打印错误日志-->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>ERROR</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!--指定最基础的日志输出级别-->
|
||||
<root level="INFO">
|
||||
<!--appender将会添加到这个logger-->
|
||||
<appender-ref ref="consoleLog"/>
|
||||
<appender-ref ref="fileLog"/>
|
||||
<appender-ref ref="fileLog-debug"/>
|
||||
<appender-ref ref="fileLog-err"/>
|
||||
</root>
|
||||
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user