diff --git a/README.md b/README.md index cf386bb112230d024d7b08d84a077a07b107181d..953f9941a23ac9959bf3ab837f33167a201b7949 100644 --- a/README.md +++ b/README.md @@ -39,3 +39,5 @@ - label 只能在fx主线程进行更新 - text 可以在fx异步线程中更新 + +- gridPane.setStyle("-fx-background-color: green; -fx-grid-lines-visible: true"); GridPane添加背景色和边框 \ No newline at end of file diff --git a/src/main/java/com/light/component/EditorPane.java b/src/main/java/com/light/component/EditorPane.java new file mode 100644 index 0000000000000000000000000000000000000000..98472eac66aaf5e4a2162794272d74fadf749890 --- /dev/null +++ b/src/main/java/com/light/component/EditorPane.java @@ -0,0 +1,122 @@ +package com.light.component; + +import atlantafx.base.controls.Card; +import atlantafx.base.controls.ModalPane; +import atlantafx.base.controls.Spacer; +import atlantafx.base.layout.ModalBox; +import atlantafx.base.theme.Tweaks; +import com.light.model.GitProject; +import com.light.thread.FxAsyncTask; +import com.light.util.H2PoolUtils; +import javafx.geometry.Pos; +import javafx.scene.control.Button; +import javafx.scene.control.Label; +import javafx.scene.control.TextArea; +import javafx.scene.layout.AnchorPane; +import javafx.scene.layout.HBox; +import javafx.scene.layout.Priority; +import javafx.scene.layout.VBox; +import javafx.scene.text.Text; + +public class EditorPane extends ModalBox { + + private final ModalPane modalPane; + protected final Card content = new Card(); + private final Label header = new Label(); + private final TextArea editor = new TextArea(); + + private final Text describeLabel; + private final Text remarkLabel; + private final Text updateTimeText; + + private GitProject gitProject; + + private boolean remark; + + public EditorPane(ModalPane modalPane, Text describeLabel, Text remarkLabel, Text updateTimeText) { + super(modalPane); + this.modalPane = modalPane; + this.modalPane.setPersistent(true); + this.describeLabel = describeLabel; + this.remarkLabel = remarkLabel; + this.updateTimeText = updateTimeText; + createView(); + } + + private void createView() { + content.setHeader(header); + content.getStyleClass().add(Tweaks.EDGE_TO_EDGE); + content.setMaxSize(700, 550); + editor.setWrapText(true); + content.setBody(editor); + content.setFooter(createDefaultFooter()); + + // IMPORTANT: this guarantees client will use correct width and height + setMinWidth(USE_PREF_SIZE); + setMaxWidth(USE_PREF_SIZE); + setMinHeight(USE_PREF_SIZE); + setMaxHeight(USE_PREF_SIZE); + + AnchorPane.setTopAnchor(content, 0d); + AnchorPane.setRightAnchor(content, 0d); + AnchorPane.setBottomAnchor(content, 0d); + AnchorPane.setLeftAnchor(content, 0d); + + addContent(content); + } + + private HBox createDefaultFooter() { + var okBtn = new Button("确定"); + okBtn.getStyleClass().add("form-action"); + okBtn.setOnAction(event -> { + String htmlText = editor.getText(); + if (remark) { + if (htmlText.equals(gitProject.remark().get())) { + close(); + return; + } + gitProject.remark().set(htmlText); + remarkLabel.setText(htmlText); + } else { + if (htmlText.equals(gitProject.description().get())) { + close(); + return; + } + gitProject.description().set(htmlText); + describeLabel.setText(htmlText); + } + + // 更新入库 + FxAsyncTask.runOnce(System.currentTimeMillis(), "更新项目 " + gitProject.name().get(), + () -> H2PoolUtils.updateGitProject(gitProject), + () -> updateTimeText.setText(gitProject.updateTime().get())); + close(); + }); + + var closeBtn = new Button("取消"); + closeBtn.getStyleClass().add("form-action"); + closeBtn.setCancelButton(true); + closeBtn.setOnAction(e -> close()); + + var footer = new HBox(10, new Spacer(), okBtn, closeBtn); + footer.getStyleClass().add("footer"); + footer.setAlignment(Pos.CENTER_RIGHT); + VBox.setVgrow(footer, Priority.NEVER); + + return footer; + } + + public void show(GitProject gitProject, boolean remark) { + if (remark) { + header.setText("备 注"); + editor.setText(gitProject.remark().get()); + } else { + header.setText("描 述"); + editor.setText(gitProject.description().get()); + } + this.remark = remark; + this.gitProject = gitProject; + + modalPane.show(this); + } +} diff --git a/src/main/java/com/light/component/OperationTableCell.java b/src/main/java/com/light/component/OperationTableCell.java index 8bb1900dfce72ae8934d3e74fe27a2e164b9acd4..9f54af489ed32b5b92b8e6cd2606cfa98b4c4f92 100644 --- a/src/main/java/com/light/component/OperationTableCell.java +++ b/src/main/java/com/light/component/OperationTableCell.java @@ -4,6 +4,7 @@ import atlantafx.base.theme.Styles; import com.light.exception.AuthException; import com.light.exception.JGitException; import com.light.exception.TimeOutException; +import com.light.layout.NavItem; import com.light.model.GitAuthInfo; import com.light.model.GitProject; import com.light.thread.FxAsyncTask; @@ -18,6 +19,7 @@ import javafx.concurrent.Task; import javafx.geometry.Pos; import javafx.scene.Scene; import javafx.scene.control.Button; +import javafx.scene.control.ListView; import javafx.scene.control.TableCell; import javafx.scene.control.TableColumn; import javafx.scene.layout.HBox; @@ -69,6 +71,12 @@ public class OperationTableCell extends TableCell { } private void initEvent() { + detailButton.setOnAction(event -> { + GitProject project = getTableRow().getItem(); + ListView dynamicMenu = (ListView) FxApplicationContextUtils.GLOBAL_CONTEXT_MAP.get("menu"); + dynamicMenu.setUserData(project); + dynamicMenu.getSelectionModel().selectLast(); + }); updateButton.setOnMouseClicked(event -> { JGitUtils.GITHUB_FAIL_NUMBER.set(0); JGitUtils.GITEE_FAIL_NUMBER.set(0); diff --git a/src/main/java/com/light/component/TooltipTableRow.java b/src/main/java/com/light/component/TooltipTableRow.java index c7e4a9939ee7a6505b982d12e0777d20bf96bbaf..6f333d6f87d4e1e27fbf6dd8e0551aa3bd1bbebf 100644 --- a/src/main/java/com/light/component/TooltipTableRow.java +++ b/src/main/java/com/light/component/TooltipTableRow.java @@ -3,6 +3,7 @@ package com.light.component; import atlantafx.base.controls.Card; import atlantafx.base.theme.Styles; import com.light.model.GitProject; +import javafx.beans.binding.Bindings; import javafx.geometry.Orientation; import javafx.scene.control.*; import javafx.scene.layout.HBox; @@ -27,7 +28,7 @@ public class TooltipTableRow extends TableRow { private final Label remoteAddr = new Label(); private final Label localAddr = new Label(); private final Label level = new Label(); - private final Label remark = new Label(); + private final Text remark = new Text(); private final HBox levelBox = new HBox(); public static Callback, TableRow> forTableRow() { @@ -42,6 +43,8 @@ public class TooltipTableRow extends TableRow { toolTipCard.setMinWidth(300); toolTipCard.setMaxWidth(700); name.getStyleClass().add(Styles.TITLE_3); + description.wrappingWidthProperty().bind(toolTipCard.widthProperty().subtract(50)); + remark.wrappingWidthProperty().bind(Bindings.subtract(toolTipCard.widthProperty(), 50)); VBox header = new VBox(5, name, description); toolTipCard.setHeader(header); diff --git a/src/main/java/com/light/layout/MenuPane.java b/src/main/java/com/light/layout/MenuPane.java index c0c2224653a16991b870dc64231a19c74ba8d289..0f109371bf4a79cf7557b35e72125cd6516b95d1 100644 --- a/src/main/java/com/light/layout/MenuPane.java +++ b/src/main/java/com/light/layout/MenuPane.java @@ -4,15 +4,15 @@ import atlantafx.base.theme.Styles; import com.light.component.DownAndUpdatePane; import com.light.component.NoticePane; import com.light.component.PaymentQRCodePane; +import com.light.model.GitProject; import com.light.theme.ThemeDialog; import com.light.util.FxApplicationContextUtils; import com.light.util.FxUtil; import com.light.util.Lazy; +import com.light.view.DetailView; import com.light.view.HomeView; import com.light.view.ManagerView; import com.light.view.NotificationView; -import javafx.collections.ListChangeListener; -import javafx.event.Event; import javafx.geometry.Orientation; import javafx.geometry.Pos; import javafx.scene.control.Button; @@ -25,7 +25,6 @@ import javafx.scene.layout.HBox; import javafx.scene.layout.Priority; import javafx.scene.layout.StackPane; import javafx.scene.layout.VBox; -import javafx.scene.text.Font; import javafx.scene.text.Text; import org.kordamp.ikonli.antdesignicons.AntDesignIconsFilled; import org.kordamp.ikonli.antdesignicons.AntDesignIconsOutlined; @@ -47,10 +46,10 @@ public class MenuPane extends StackPane { private final ListView dynamicMenu = new ListView<>(); // 底部导航栏 - private final Label downloadLabel = new Label("下载中", new FontIcon(BootstrapIcons.ARROW_DOWN)); + private final Label downloadLabel = new Label("下载", new FontIcon(BootstrapIcons.ARROW_DOWN)); private final Text downloadLabelText = new Text(FxApplicationContextUtils.DOWNLOAD_PROPERTY.getValue()); private final HBox downloadBox = new HBox(10, downloadLabel, downloadLabelText); - private final Label updateLabel = new Label("更新中", new FontIcon(BootstrapIcons.ARROW_DOWN)); + private final Label updateLabel = new Label("更新", new FontIcon(BootstrapIcons.ARROW_DOWN)); private final Text updateLabelText = new Text(FxApplicationContextUtils.UPDATE_PROPERTY.getValue()); private final HBox updateBox = new HBox(10, updateLabel, updateLabelText); private final VBox bottomMenu = new VBox(downloadBox, updateBox); @@ -68,11 +67,13 @@ public class MenuPane extends StackPane { this.contentPane = contentPane; initialize(); + FxApplicationContextUtils.GLOBAL_CONTEXT_MAP.put("menu", dynamicMenu); + // 菜单栏标题 dynamicMenu.getItems().addAll( new NavItem(new FontIcon(AntDesignIconsOutlined.DOWNLOAD), "下载", new Lazy<>(HomeView::new)), new NavItem(new FontIcon(AntDesignIconsOutlined.PARTITION), "管理", new Lazy<>(ManagerView::new)), - new NavItem(new FontIcon(AntDesignIconsOutlined.EDIT), "笔记", null) + new NavItem(new FontIcon(AntDesignIconsOutlined.EDIT), "笔记", new Lazy<>(DetailView::new)) ); dynamicMenu.getSelectionModel().selectFirst(); } @@ -112,7 +113,14 @@ public class MenuPane extends StackPane { dynamicMenu.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> { Optional.ofNullable(newValue).ifPresent(menuItem -> { // 设置内容 - Optional.ofNullable(menuItem.getContent()).ifPresentOrElse(content -> contentPane.setContent(content.get()), () -> contentPane.setContent(null)); + Optional.ofNullable(menuItem.getContent()).ifPresentOrElse(content -> { + contentPane.setContent(content.get()); + // 详情按钮调整界面 + Object userData = dynamicMenu.getUserData(); + if ("笔记".equals(newValue.getTitle()) && userData != null) { + ((DetailView) content.get()).refresh((GitProject) userData); + } + }, () -> contentPane.setContent(null)); }); }); diff --git a/src/main/java/com/light/layout/NavItem.java b/src/main/java/com/light/layout/NavItem.java index a75bd9a4f18feb512dee6d6269ded6129fdf5f24..2f6cc6d7934382b89a8392d1a30a126d4d06c74f 100644 --- a/src/main/java/com/light/layout/NavItem.java +++ b/src/main/java/com/light/layout/NavItem.java @@ -64,4 +64,8 @@ public class NavItem extends HBox { public Lazy getContent() { return content; } + + public String getTitle() { + return titleLabel.getText(); + } } diff --git a/src/main/java/com/light/model/GitProject.java b/src/main/java/com/light/model/GitProject.java index 169a15d3b2668613435545a4ffa91caed458c000..8c8e7cf38209fb33fb215d29d751e227fcac0fb6 100644 --- a/src/main/java/com/light/model/GitProject.java +++ b/src/main/java/com/light/model/GitProject.java @@ -1,6 +1,5 @@ package com.light.model; -import com.light.util.FxApplicationContextUtils; import javafx.beans.property.SimpleBooleanProperty; import javafx.beans.property.SimpleDoubleProperty; import javafx.beans.property.SimpleIntegerProperty; @@ -19,4 +18,9 @@ public record GitProject(SimpleIntegerProperty id, SimpleIntegerProperty level, SimpleDoubleProperty downloadRate, SimpleBooleanProperty selected) { + + @Override + public String toString() { + return name.get(); + } } diff --git a/src/main/java/com/light/util/H2PoolUtils.java b/src/main/java/com/light/util/H2PoolUtils.java index 2325b58bf4fe30e4b5101efde627579798ae003c..9914cb4103a53bae9c23307429d83de467dfbbf0 100644 --- a/src/main/java/com/light/util/H2PoolUtils.java +++ b/src/main/java/com/light/util/H2PoolUtils.java @@ -429,6 +429,7 @@ public class H2PoolUtils { } public static void updateGitProject(GitProject project) { + project.updateTime().set(DateUtils.formatDateTime(new Date())); try (Connection conn = getConnection()) { String sql = "update git_project_info set branch = ? ,updatetime = ?, local = ?, description = ?, remark = ?, level = ? where id = ?"; PreparedStatement statement = conn.prepareStatement(sql); diff --git a/src/main/java/com/light/util/JGitUtils.java b/src/main/java/com/light/util/JGitUtils.java index a30b5e4f9a1367d3afbfb3bfe35aa6f1d3d060cb..aa3a791b72492e5fa95dd39021415779996c0c21 100644 --- a/src/main/java/com/light/util/JGitUtils.java +++ b/src/main/java/com/light/util/JGitUtils.java @@ -12,8 +12,10 @@ import javafx.beans.property.SimpleIntegerProperty; import javafx.beans.property.SimpleStringProperty; import org.apache.commons.collections4.CollectionUtils; import org.eclipse.jgit.api.Git; +import org.eclipse.jgit.api.ListBranchCommand; import org.eclipse.jgit.api.PullCommand; import org.eclipse.jgit.api.PullResult; +import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.transport.CredentialsProvider; import org.eclipse.jgit.transport.RemoteConfig; import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider; @@ -252,4 +254,23 @@ public class JGitUtils { throw new JGitException(); } } + + public static List branchs(File localRepoFile) throws JGitException { + List result = new ArrayList<>(); + try (Git git = Git.open(localRepoFile)) { + ListBranchCommand listBranchCommand = git.branchList(); + List callList = listBranchCommand.call(); + for (Ref ref : callList) { + result.add(ref.getName().replace("refs/heads/", "")); + } + } catch (Exception e) { + LOGGER.error("获取项目 {} 所有分支异常:{}", localRepoFile.getAbsolutePath(), e.getMessage()); + throw new JGitException(e); + } + return result; + } + + public static void main(String[] args) { + branchs(new File("D:\\workspace\\workspace-dev\\git-manager-client-fx")).forEach(System.out::println); + } } diff --git a/src/main/java/com/light/view/DetailView.java b/src/main/java/com/light/view/DetailView.java new file mode 100644 index 0000000000000000000000000000000000000000..33e8b9ddc623486c262e134c4bf88e10368729cb --- /dev/null +++ b/src/main/java/com/light/view/DetailView.java @@ -0,0 +1,210 @@ +package com.light.view; + +import atlantafx.base.controls.ModalPane; +import atlantafx.base.theme.Styles; +import com.light.component.EditorPane; +import com.light.enums.Level; +import com.light.model.GitProject; +import com.light.thread.FxAsyncTask; +import com.light.util.FxApplicationContextUtils; +import com.light.util.H2PoolUtils; +import com.light.util.JGitUtils; +import com.light.util.NoticeUtils; +import javafx.collections.FXCollections; +import javafx.geometry.Insets; +import javafx.geometry.Pos; +import javafx.scene.control.*; +import javafx.scene.layout.*; +import javafx.scene.text.Text; + +import java.io.File; + +public class DetailView extends StackPane { + + private final ComboBox choiceBox; + private final Text describeLabel; + private final Text remarkLabel; + private final Text updateTimeText; + private final Text createTimeText; + private final Text authorText; + private final Text remoteText; + private final Text localText; + private final ChoiceBox branchChoice; + private final ChoiceBox levelChoice; + + public DetailView() { + super(); + + choiceBox = new ComboBox<>(FxApplicationContextUtils.GIT_PROJECT_OBSERVABLE_LIST); + choiceBox.setMaxWidth(300); + // 顶部 + var describeTitle = new Label("描 述: "); + describeTitle.getStyleClass().add(Styles.TITLE_4); + Tooltip tooltip = new Tooltip("双击编辑"); + describeTitle.setTooltip(tooltip); + describeLabel = new Text(); + HBox describeBox = new HBox(10, describeTitle, describeLabel); + + describeLabel.setWrappingWidth(700); + describeBox.setAlignment(Pos.TOP_LEFT); + VBox topBox = new VBox(10, choiceBox, describeBox); + + // 中间 + // 布局GridPane + GridPane gridPane = new GridPane(); + // 居中、组件水平距离和垂直距离 + gridPane.setAlignment(Pos.CENTER); + gridPane.setHgap(5); + gridPane.setVgap(10); + + // 给列设置样式 + ColumnConstraints columnConstraints = new ColumnConstraints(); + columnConstraints.setFillWidth(true); + columnConstraints.setHgrow(Priority.ALWAYS); + for (int i = 0; i < 4; i++) { + gridPane.getColumnConstraints().add(columnConstraints); + } + + // 给每行设置样式 + RowConstraints rowConstraints = new RowConstraints(); + rowConstraints.setFillHeight(true); +// rowConstraints.setVgrow(Priority.ALWAYS); + rowConstraints.setMinHeight(50d); + for (int i = 0; i < 6; i++) { + gridPane.getRowConstraints().add(rowConstraints); + } + + Label authorTitle = new Label("仓库作者: "); + authorTitle.getStyleClass().add(Styles.TITLE_4); + authorText = new Text(); + gridPane.add(authorTitle, 0, 0); + gridPane.add(authorText, 1, 0, 3, 1); + + Label remoteTitle = new Label("仓库地址: "); + remoteTitle.getStyleClass().add(Styles.TITLE_4); + remoteText = new Text(); + gridPane.add(remoteTitle, 0, 1); + gridPane.add(remoteText, 1, 1, 3, 1); + + Label localTitle = new Label("本地地址: "); + localTitle.getStyleClass().add(Styles.TITLE_4); + localText = new Text(); + gridPane.add(localTitle, 0, 2); + gridPane.add(localText, 1, 2, 3, 1); + + Label branchTitle = new Label("当前分支: "); + branchTitle.getStyleClass().add(Styles.TITLE_4); + branchChoice = new ChoiceBox<>(); + branchChoice.setMaxWidth(180d); + gridPane.add(branchTitle, 0, 3); + gridPane.add(branchChoice, 1, 3); + + Label levelTitle = new Label("学习等级: "); + levelTitle.getStyleClass().add(Styles.TITLE_4); + levelChoice = new ChoiceBox<>(); + levelChoice.getItems().addAll(0, 1, 2, 3, 4, 5); + levelChoice.setMaxWidth(180d); + gridPane.add(levelTitle, 2, 3); + gridPane.add(levelChoice, 3, 3); + + Label createTimeTitle = new Label("创建时间: "); + createTimeTitle.getStyleClass().add(Styles.TITLE_4); + createTimeText = new Text(); + gridPane.add(createTimeTitle, 0, 4); + gridPane.add(createTimeText, 1, 4); + + Label updateTimeTitle = new Label("最近更新: "); + updateTimeTitle.getStyleClass().add(Styles.TITLE_4); + updateTimeText = new Text(); + gridPane.add(updateTimeTitle, 2, 4); + gridPane.add(updateTimeText, 3, 4); + + Label remarkTitle = new Label("备注: "); + remarkTitle.setTooltip(tooltip); + remarkTitle.getStyleClass().add(Styles.TITLE_4); + remarkLabel = new Text(); + remarkLabel.setWrappingWidth(700); + gridPane.add(remarkTitle, 0, 5); + gridPane.add(remarkLabel, 1, 5, 3, 1); + + Pane centerPane = new Pane(gridPane); + + // 整体 + VBox vBox = new VBox(10, topBox, new Separator(), centerPane); + vBox.setPadding(new Insets(5, 2, 5, 2)); + VBox.setVgrow(centerPane, Priority.ALWAYS); + + // 遮罩层 + ModalPane modalPane = new ModalPane(); + EditorPane editorPane = new EditorPane(modalPane, describeLabel, remarkLabel, updateTimeText); + this.getChildren().addAll(modalPane, vBox); + + describeTitle.setOnMouseClicked(event -> { + GitProject project = choiceBox.getValue(); + if (project == null) { + NoticeUtils.show(null, "请选择项目", Level.WARN); + return; + } + if (event.getClickCount() == 2) { + editorPane.show(project, false); + } + }); + remarkTitle.setOnMouseClicked(event -> { + GitProject project = choiceBox.getValue(); + if (project == null) { + NoticeUtils.show(null, "请选择项目", Level.WARN); + return; + } + if (event.getClickCount() == 2) { + editorPane.show(project, true); + } + }); + + choiceBox.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> { + if (null == newValue || oldValue == newValue) { + return; + } + refresh(newValue); + }); + + levelChoice.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> { + GitProject gitProject = choiceBox.getValue(); + if (null == newValue || null == gitProject || newValue == gitProject.level().get()) { + return; + } + // 更新入库 + gitProject.level().set(newValue); + FxAsyncTask.runOnce(System.currentTimeMillis(), "更新项目学习等级 " + gitProject.name().get(), + () -> H2PoolUtils.updateGitProject(gitProject), + () -> updateTimeText.setText(gitProject.updateTime().get())); + }); + } + + public void refresh(GitProject project) { + choiceBox.getSelectionModel().select(project); + + describeLabel.setText(project.description().get()); + remarkLabel.setText(project.remark().get()); + updateTimeText.setText(project.updateTime().get()); + createTimeText.setText(project.createTime()); + authorText.setText(project.author().get()); + remoteText.setText(project.remote()); + localText.setText(project.local().get()); + + // 异步获取所有分支 + branchChoice.getSelectionModel().clearSelection(); + FxAsyncTask.runOnceBack(System.currentTimeMillis(), "获取项目所有分支 " + project.name().get(), + () -> JGitUtils.branchs(new File(project.local().get())), + success -> { + if (success.isEmpty()) { + return; + } + branchChoice.setItems(FXCollections.observableList(success)); + branchChoice.getSelectionModel().select(project.branch().get()); + }, + fail -> branchChoice.setItems(null)); + + + levelChoice.getSelectionModel().select(project.level().get()); + } +} diff --git a/src/main/java/com/light/view/ManagerView.java b/src/main/java/com/light/view/ManagerView.java index 56efdb5c6ecd4a832ab0a8ebe65e46d317794fc0..bcbcae7c8238dd9b71f9a4146353932c9e24d8f6 100644 --- a/src/main/java/com/light/view/ManagerView.java +++ b/src/main/java/com/light/view/ManagerView.java @@ -203,9 +203,12 @@ public class ManagerView extends StackPane { SimpleDoubleProperty rate = project.downloadRate(); File localRepoFile = new File(project.local().get()); String remoteUrl = project.remote(); - if ("Gitee".equals(JGitUtils.getType(remoteUrl)) && JGitUtils.GITEE_FAIL_NUMBER.get() < 10) { + String type = JGitUtils.getType(remoteUrl); + if ("Gitee".equals(type) && JGitUtils.GITEE_FAIL_NUMBER.get() < 10) { pull(project, localRepoFile, remoteUrl, rate); - } else if ("Github".equals(JGitUtils.getType(remoteUrl)) && JGitUtils.GITHUB_FAIL_NUMBER.get() < 5) { + } else if ("Github".equals(type) && JGitUtils.GITHUB_FAIL_NUMBER.get() < 5) { + pull(project, localRepoFile, remoteUrl, rate); + } else if ("other".equals(type)) { pull(project, localRepoFile, remoteUrl, rate); } }, diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index 3bf9a6fd8420b101c668946796b7e79de1e73f5b..e4428a93beeff21b38e6c3afc8a00333815a59b8 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -13,4 +13,5 @@ open module com.leo { requires org.kordamp.ikonli.bootstrapicons; requires org.kordamp.ikonli.core; requires org.eclipse.jgit; + requires javafx.web; }