production-taskbar-client / src / renderer / features / tools / ToolsComponent.jsx
ToolsComponent.jsx
Raw
import React from "react";
import { ipcRenderer } from "electron";
import { Typography } from "antd";
import { LinkOutlined, ToolOutlined } from "@ant-design/icons";

import "../../app/locale/i18n";
import "./ToolsComponent.less";

import Sites from "./sites/Sites";

const { Text } = Typography;
const kToolWindow = "openToolsMenu";

export default function Tools() {
  return (
    <div className="tools">
      <div className="tools__web-div">
        <Text className="tools__label">WEB</Text>
        <Sites />
        <LinkOutlined
          style={{ order: 1000 }}
          onClick={({ screenX }) => {
            ipcRenderer.invoke(kToolWindow, {
              route: "links",
              posX: screenX,
            });
          }}
        />
      </div>
      <div className="tools__util-div">
        <Text className="tools__label">UTIL</Text>
        <ToolOutlined
          style={{ order: 1000 }}
          onClick={({ screenX }) => {
            ipcRenderer.invoke(kToolWindow, {
              route: "utilities",
              posX: screenX,
            });
          }}
        />
      </div>
    </div>
  );
}