YanFrp/src/main/resources/fxml/main.fxml

427 lines
24 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>
<?import org.kordamp.ikonli.javafx.*?>
<StackPane fx:id="root" prefHeight="700.0" prefWidth="750.0" stylesheets="@../css/main.css"
xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="top.octopusyan.controller.MainController">
<VBox fx:id="MainPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity"
prefHeight="700.0" prefWidth="750.0">
<AnchorPane fx:id="MainTopPane" prefHeight="35.0" prefWidth="750.0">
<Label fx:id="titleLable" alignment="CENTER" disable="true" prefHeight="35.0" prefWidth="90.0"
text="YanFrp"/>
<JFXButton fx:id="minimizeBtn" layoutX="680.0" prefHeight="35.0" prefWidth="35.0" text="—"/>
<JFXButton fx:id="closeBtn" layoutX="715.0" prefHeight="35.0" prefWidth="35.0" text="X"/>
<JFXComboBox fx:id="proxyServerComboBox" layoutX="90.0" prefHeight="35.0" prefWidth="90.0">
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
</JFXComboBox>
</AnchorPane>
<GridPane fx:id="MainBottomPane" hgap="10.0" prefHeight="680.0" prefWidth="750.0" vgap="10.0">
<VBox.margin>
<Insets top="-10.0"/>
</VBox.margin>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="539.0" minWidth="10.0" prefWidth="520.0"/>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="370.0" minWidth="10.0" prefWidth="200.0"/>
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="493.0" minHeight="10.0" prefHeight="445.0" vgrow="SOMETIMES"/>
<RowConstraints maxHeight="337.0" minHeight="10.0" prefHeight="200.0" vgrow="SOMETIMES"/>
</rowConstraints>
<children>
<VBox fx:id="proxySetupPane" prefHeight="200.0" prefWidth="100.0" styleClass="mainPane">
<HBox alignment="CENTER_RIGHT" prefHeight="40.0" prefWidth="520.0">
<padding>
<Insets bottom="5.0" top="5.0"/>
</padding>
<JFXButton fx:id="resetProxyBtn" prefHeight="Infinity" text="重置">
<HBox.margin>
<Insets right="10.0"/>
</HBox.margin>
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
</JFXButton>
</HBox>
<HBox alignment="CENTER_LEFT" styleClass="proxySetupItemBox">
<Label alignment="CENTER_RIGHT" prefHeight="Infinity" prefWidth="100.0"
styleClass="proxySetupLabel" text="隧道名称">
<HBox.margin>
<Insets left="10.0" right="20.0"/>
</HBox.margin>
</Label>
<JFXTextField fx:id="proxyNameTextField" prefHeight="Infinity" prefWidth="310.0"
styleClass="inputText">
<padding>
<Insets left="15.0"/>
</padding>
<font>
<Font size="14.0"/>
</font>
</JFXTextField>
</HBox>
<HBox alignment="CENTER_LEFT" styleClass="proxySetupItemBox">
<Label alignment="CENTER_RIGHT" prefHeight="Infinity" prefWidth="100.0"
styleClass="proxySetupLabel" text="是否启用">
<HBox.margin>
<Insets left="10.0" right="20.0"/>
</HBox.margin>
</Label>
<HBox alignment="CENTER_LEFT" prefHeight="Infinity" prefWidth="310.0">
<JFXRadioButton fx:id="openProxyRBtn" text="启用">
<HBox.margin>
<Insets right="20.0"/>
</HBox.margin>
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
</JFXRadioButton>
<JFXRadioButton fx:id="closeProxyRBtn" text="停用">
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
</JFXRadioButton>
<JFXButton fx:id="proxyStatusTip" text="">
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
<graphic>
<FontIcon iconColor="#a5a3a3" iconLiteral="fa-question-circle-o" iconSize="15"/>
</graphic>
<HBox.margin>
<Insets left="20.0"/>
</HBox.margin>
</JFXButton>
</HBox>
</HBox>
<HBox alignment="CENTER_LEFT" styleClass="proxySetupItemBox">
<Label alignment="CENTER_RIGHT" prefHeight="Infinity" prefWidth="100.0"
styleClass="proxySetupLabel" text="协议类型">
<HBox.margin>
<Insets left="10.0" right="20.0"/>
</HBox.margin>
</Label>
<JFXComboBox fx:id="proxyProtocolComboBox" prefHeight="Infinity" prefWidth="310.0"
styleClass="inputText">
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
</JFXComboBox>
<JFXButton fx:id="proxyTypeTip" text="">
<HBox.margin>
<Insets left="10.0"/>
</HBox.margin>
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
<graphic>
<FontIcon iconColor="#a5a3a3" iconLiteral="fa-question-circle-o" iconSize="15">
</FontIcon>
</graphic>
</JFXButton>
</HBox>
<HBox fx:id="p2pRolePane" alignment="CENTER_LEFT" styleClass="proxySetupItemBox">
<Label alignment="CENTER_RIGHT" prefHeight="Infinity" prefWidth="100.0"
styleClass="proxySetupLabel" text="服务角色">
<HBox.margin>
<Insets left="10.0" right="20.0"/>
</HBox.margin>
</Label>
<HBox fx:id="p2pRoleView" alignment="CENTER_LEFT" prefHeight="Infinity" prefWidth="310.0">
<JFXRadioButton fx:id="serverProviderRBtn" text="提供者">
<HBox.margin>
<Insets right="20.0"/>
</HBox.margin>
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
</JFXRadioButton>
<JFXRadioButton fx:id="serverVisitorRBtn" text="访问者">
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
</JFXRadioButton>
<JFXButton fx:id="copyP2pConfig" text="复制">
<HBox.margin>
<Insets left="20.0"/>
</HBox.margin>
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
</JFXButton>
<JFXButton fx:id="importP2pConfig" text="从剪切板导入">
<HBox.margin>
<Insets left="10.0"/>
</HBox.margin>
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
</JFXButton>
</HBox>
</HBox>
<HBox alignment="CENTER_LEFT" styleClass="proxySetupItemBox">
<Label fx:id="localHostLabel" alignment="CENTER_RIGHT" prefHeight="Infinity" prefWidth="100.0"
styleClass="proxySetupLabel" text="内网服务地址">
<HBox.margin>
<Insets left="10.0" right="20.0"/>
</HBox.margin>
</Label>
<HBox prefHeight="Infinity" prefWidth="310.0">
<JFXTextField fx:id="localHostTextField" alignment="CENTER" prefWidth="220.0"
promptText="内网服务IP (IPv4)" styleClass="inputText-left" text="127.0.0.1">
<font>
<Font size="14.0"/>
</font>
</JFXTextField>
<JFXTextField fx:id="localPortTextField" alignment="CENTER" minWidth="70.0"
prefWidth="100.0" promptText="端口" styleClass="inputText-right" text="80">
<font>
<Font size="14.0"/>
</font>
</JFXTextField>
</HBox>
</HBox>
<HBox fx:id="serverNamePane" alignment="CENTER_LEFT" styleClass="proxySetupItemBox">
<children>
<Label alignment="CENTER_RIGHT" prefHeight="Infinity" prefWidth="100.0"
styleClass="proxySetupLabel" text="服务名称">
<HBox.margin>
<Insets left="10.0" right="20.0"/>
</HBox.margin>
</Label>
<JFXTextField fx:id="serverNameTextField" prefHeight="Infinity" prefWidth="310.0"
styleClass="inputText">
<HBox.margin>
<Insets/>
</HBox.margin>
<padding>
<Insets left="15.0"/>
</padding>
<font>
<Font size="14.0"/>
</font>
</JFXTextField>
<JFXButton fx:id="serverNameTip" text="">
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
<graphic>
<FontIcon iconColor="#a5a3a3" iconLiteral="fa-question-circle-o" iconSize="15"/>
</graphic>
<HBox.margin>
<Insets left="10.0"/>
</HBox.margin>
</JFXButton>
</children>
</HBox>
<HBox fx:id="p2pPwdPane" alignment="CENTER_LEFT" styleClass="proxySetupItemBox">
<Label alignment="CENTER_RIGHT" prefHeight="Infinity" prefWidth="100.0"
styleClass="proxySetupLabel" text="访问密码">
<HBox.margin>
<Insets left="10.0" right="20.0"/>
</HBox.margin>
</Label>
<JFXTextField fx:id="p2pPwdTextField" prefHeight="Infinity" prefWidth="310.0"
styleClass="inputText">
<HBox.margin>
<Insets/>
</HBox.margin>
<padding>
<Insets left="15.0"/>
</padding>
<font>
<Font size="14.0"/>
</font>
</JFXTextField>
<JFXButton fx:id="p2pPwdTip" text="">
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
<graphic>
<FontIcon iconColor="#a5a3a3" iconLiteral="fa-question-circle-o" iconSize="15"/>
</graphic>
<HBox.margin>
<Insets left="10.0"/>
</HBox.margin>
</JFXButton>
</HBox>
<HBox fx:id="domainPane" alignment="CENTER_LEFT" styleClass="proxySetupItemBox">
<Label alignment="CENTER_RIGHT" prefHeight="Infinity" prefWidth="100.0"
styleClass="proxySetupLabel" text="外网访问地址">
<HBox.margin>
<Insets left="10.0" right="20.0"/>
</HBox.margin>
</Label>
<AnchorPane maxHeight="30.0" prefHeight="30" prefWidth="310.0">
<JFXTextField fx:id="domainTextField" prefHeight="31.0" prefWidth="310.0"
promptText="自定义子域名" styleClass="inputText">
<font>
<Font size="14.0"/>
</font>
<padding>
<Insets left="10.0"/>
</padding>
</JFXTextField>
<JFXTextField fx:id="domainSuffixTextField" alignment="CENTER" disable="true"
layoutX="155.0" prefHeight="30.0" prefWidth="155.0"
styleClass="inputText-right" text=".frp.octopusyan.top">
<font>
<Font size="14.0"/>
</font>
</JFXTextField>
</AnchorPane>
<JFXButton fx:id="customizeDomainBtn" prefHeight="Infinity" text="自定义">
<HBox.margin>
<Insets left="5.0"/>
</HBox.margin>
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
</JFXButton>
</HBox>
<HBox fx:id="httpUserPane" alignment="CENTER_LEFT" styleClass="proxySetupItemBox">
<Label alignment="CENTER_RIGHT" prefHeight="Infinity" prefWidth="100.0"
styleClass="proxySetupLabel" text="用户名">
<HBox.margin>
<Insets left="10.0" right="20.0"/>
</HBox.margin>
</Label>
<JFXTextField fx:id="httpUserTextField" prefHeight="Infinity" prefWidth="310.0"
promptText="(可选)外网访问用户名" styleClass="inputText">
<padding>
<Insets left="15.0"/>
</padding>
<font>
<Font size="14.0"/>
</font>
</JFXTextField>
<JFXButton fx:id="httpUserTip" text="">
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
<graphic>
<FontIcon iconColor="#a5a3a3" iconLiteral="fa-question-circle-o" iconSize="15"/>
</graphic>
<HBox.margin>
<Insets left="10.0"/>
</HBox.margin>
</JFXButton>
</HBox>
<HBox fx:id="httpPwdPane" alignment="CENTER_LEFT" styleClass="proxySetupItemBox">
<Label alignment="CENTER_RIGHT" prefHeight="Infinity" prefWidth="100.0"
styleClass="proxySetupLabel" text="密码">
<HBox.margin>
<Insets left="10.0" right="20.0"/>
</HBox.margin>
</Label>
<JFXTextField fx:id="httpPwdTextField" prefHeight="Infinity" prefWidth="310.0"
promptText="(可选)外网访问密码" styleClass="inputText">
<padding>
<Insets left="15.0"/>
</padding>
<font>
<Font size="14.0"/>
</font>
</JFXTextField>
</HBox>
<HBox fx:id="proxyStatusPane" alignment="CENTER" prefHeight="40.0" prefWidth="520.0">
<Label fx:id="runingLabel" alignment="CENTER_RIGHT" prefHeight="30.0"
styleClass="proxySetupLabel" text="启动成功!立即访问 ">
<HBox.margin>
<Insets/>
</HBox.margin>
</Label>
<Hyperlink fx:id="domainLink" prefHeight="30.0"/>
<JFXButton fx:id="copyDomainBtn" prefHeight="30.0" text="复制"/>
</HBox>
</VBox>
<VBox fx:id="proxyListPane" prefHeight="Infinity" prefWidth="Infinity" GridPane.columnIndex="1">
<JFXListView fx:id="proxyListView" prefHeight="400.0" prefWidth="200.0"/>
<JFXButton fx:id="addProxyBtn" prefHeight="45.0" prefWidth="Infinity" text="新增连接">
<graphic>
<FontIcon iconColor="white" iconLiteral="fa-plus"/>
</graphic>
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
</JFXButton>
</VBox>
<AnchorPane prefHeight="Infinity" prefWidth="Infinity" GridPane.rowIndex="1">
<JFXTabPane fx:id="tabPane" prefHeight="200.0" prefWidth="520.0" styleClass="mainPane">
<tabs>
<Tab fx:id="proxyLogPane" text=" 日志 "/>
<Tab text="常见问题">
<VBox minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0"
styleClass="whitePane">
<padding>
<Insets left="20.0" top="20.0"/>
</padding>
<Label prefHeight="30" text="* 修改配置信息后,必须重启才能生效"/>
<Label prefHeight="30" text="* 只有启动或重启内网穿透服务时,配置信息才会被保存"/>
<Label prefHeight="30" text="* 同一个账号在同一时间只能在一台电脑上登录使用"/>
<Label prefHeight="30" text="* 请勿将非法、暴力、色情等信息映射到外网上去,一经发现立即封号"/>
</VBox>
</Tab>
<!-- TODO 使用场景 -->
<!-- <Tab text="使用场景">-->
<!-- <VBox minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0">-->
<!-- </VBox>-->
<!-- </Tab>-->
</tabs>
</JFXTabPane>
<JFXButton fx:id="clearLogBtn" layoutX="480.0" layoutY="-1.0" prefHeight="35.0" prefWidth="26.0"
text="">
<graphic>
<FontIcon iconColor="white" iconLiteral="fa-trash-o" iconSize="18"/>
</graphic>
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
</JFXButton>
</AnchorPane>
<VBox alignment="TOP_CENTER" prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1"
GridPane.rowIndex="1">
<JFXButton fx:id="startProxyBtn" buttonType="RAISED" prefHeight="44.0" prefWidth="202.0"
styleClass="startProxyBtn" text="启动">
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
</JFXButton>
<JFXButton fx:id="logoutBtn" text="退出登录">
<VBox.margin>
<Insets top="20.0"/>
</VBox.margin>
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
<font>
<Font size="14.0"/>
</font>
</JFXButton>
<Label fx:id="appVersionLabel" contentDisplay="CENTER" disable="true">
<VBox.margin>
<Insets top="80.0"/>
</VBox.margin>
<font>
<Font size="11.0"/>
</font>
<opaqueInsets>
<Insets/>
</opaqueInsets>
</Label>
</VBox>
</children>
</GridPane>
</VBox>
</StackPane>