Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion owlplug-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>

<properties>
<springboot.version>4.0.1</springboot.version>
<springboot.version>4.1.0</springboot.version>
<mockito.version>5.20.0</mockito.version>
<ikonli.version>12.4.0</ikonli.version>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@
package com.owlplug.plugin.controllers;

import com.owlplug.core.controllers.BaseController;
import com.owlplug.core.ui.SideBar;
import com.owlplug.plugin.model.Plugin;
import com.owlplug.plugin.model.PluginComponent;
import com.owlplug.plugin.model.PluginDirectory;
import com.owlplug.plugin.model.Symlink;
import javafx.fxml.FXML;
import javafx.scene.Node;
import javafx.scene.control.Button;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.HBox;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

Expand All @@ -40,6 +44,12 @@ public class NodeInfoController extends BaseController {
@Autowired
private ComponentInfoController componentInfoController;

@FXML
private HBox nodeInfoContainer;
@FXML
private AnchorPane nodeInfoContent;
@FXML
private Button closeButton;
@FXML
private Node pluginInfoView;
@FXML
Expand All @@ -49,17 +59,40 @@ public class NodeInfoController extends BaseController {
@FXML
private Node componentInfoView;

private SideBar sidebar;

/**
* FXML initialize.
*/
public void initialize() {

nodeInfoContainer.getChildren().remove(nodeInfoContent);
sidebar = new SideBar(500, nodeInfoContent);
nodeInfoContainer.getChildren().add(sidebar);

closeButton.setOnAction(e -> sidebar.collapse());
closeButton.visibleProperty().bind(pluginInfoView.visibleProperty());

pluginInfoView.setVisible(false);
directoryInfoView.setVisible(false);
symlinkInfoView.setVisible(false);
componentInfoView.setVisible(false);
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}

public void show() {
if (sidebar.isCollapsed()) {
sidebar.expand();
}
}

public void hide() {
sidebar.collapse();
}

public void toggleVisibility() {
sidebar.toggle();
}

public void setNode(Object node) {

switch (node) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ public class PluginsController extends BaseController {
@FXML
private Button filterToggleButton;
@FXML
private VBox pluginInfoPane;
@FXML
private VBox pluginsContainer;
@FXML
private HBox filterContainer;
Expand Down Expand Up @@ -256,13 +254,15 @@ public void setSearch(String query) {
}

public void setInfoPaneDisplay(boolean display) {
pluginInfoPane.setManaged(display);
pluginInfoPane.setVisible(display);
if (display) {
nodeInfoController.show();
} else {
nodeInfoController.hide();
}
}

public void toggleInfoPaneDisplay() {
pluginInfoPane.setManaged(!pluginInfoPane.isManaged());
pluginInfoPane.setVisible(!pluginInfoPane.isVisible());
nodeInfoController.toggleVisibility();
}

@EventListener
Expand Down
42 changes: 26 additions & 16 deletions owlplug-client/src/main/resources/fxml/plugins/NodeInfoView.fxml
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>


<?import javafx.scene.control.Button?>
<?import javafx.scene.layout.AnchorPane?>
<AnchorPane xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.owlplug.plugin.controllers.NodeInfoController">
<fx:include fx:id="pluginInfoView" source="PluginInfoView.fxml" AnchorPane.topAnchor="0.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.bottomAnchor="0.0"/>
<fx:include fx:id="directoryInfoView" source="DirectoryInfoView.fxml" AnchorPane.topAnchor="0.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.bottomAnchor="0.0"/>
<fx:include fx:id="symlinkInfoView" source="SymlinkInfoView.fxml" AnchorPane.topAnchor="0.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.bottomAnchor="0.0"/>
<fx:include fx:id="componentInfoView" source="ComponentInfoView.fxml" AnchorPane.topAnchor="0.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.bottomAnchor="0.0"/>
</AnchorPane>
<?import javafx.scene.layout.HBox?>
<?import org.kordamp.ikonli.javafx.FontIcon?>
<HBox fx:id="nodeInfoContainer" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.owlplug.plugin.controllers.NodeInfoController">
<AnchorPane fx:id="nodeInfoContent" HBox.hgrow="ALWAYS">
<fx:include fx:id="pluginInfoView" source="PluginInfoView.fxml" AnchorPane.topAnchor="0.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.bottomAnchor="0.0"/>
<fx:include fx:id="directoryInfoView" source="DirectoryInfoView.fxml" AnchorPane.topAnchor="0.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.bottomAnchor="0.0"/>
<fx:include fx:id="symlinkInfoView" source="SymlinkInfoView.fxml" AnchorPane.topAnchor="0.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.bottomAnchor="0.0"/>
<fx:include fx:id="componentInfoView" source="ComponentInfoView.fxml" AnchorPane.topAnchor="0.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.bottomAnchor="0.0"/>
<Button fx:id="closeButton" styleClass="package-bloc-title"
AnchorPane.topAnchor="1.0" AnchorPane.leftAnchor="0.0">
<graphic>
<FontIcon iconLiteral="mdi2a-arrow-left" iconSize="20"/>
</graphic>
</Button>
</AnchorPane>
</HBox>
10 changes: 4 additions & 6 deletions owlplug-client/src/main/resources/fxml/plugins/PluginsView.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,10 @@
</BorderPane>
</center>
<right>
<VBox fx:id="pluginInfoPane" prefHeight="200.0" prefWidth="100.0" BorderPane.alignment="CENTER">
<AnchorPane VBox.vgrow="ALWAYS">
<fx:include source="NodeInfoView.fxml" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"/>
</AnchorPane>
</VBox>
<AnchorPane BorderPane.alignment="CENTER">
<fx:include source="NodeInfoView.fxml" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"/>
</AnchorPane>
</right>
<padding>
<Insets bottom="10.0" left="5.0" right="5.0" top="2.0" />
Expand Down
Loading