feat: support widget items config in org (#3674)

This commit is contained in:
WindSpiritSR
2025-03-21 23:00:07 +08:00
committed by GitHub
parent af55d0547f
commit a11fe59704
30 changed files with 259 additions and 101 deletions

View File

@ -0,0 +1,29 @@
import i18next from "i18next";
import {Tree} from "antd";
import React from "react";
export const WidgetItemTree = ({disabled, checkedKeys, defaultExpandedKeys, onCheck}) => {
const WidgetItemNodes = [
{
title: i18next.t("organization:All"),
key: "all",
children: [
{title: i18next.t("general:Tour"), key: "tour"},
{title: i18next.t("general:AI Assistant"), key: "ai-assistant"},
{title: i18next.t("user:Language"), key: "language"},
{title: i18next.t("theme:Theme"), key: "theme"},
],
},
];
return (
<Tree
disabled={disabled}
checkable
checkedKeys={checkedKeys}
defaultExpandedKeys={defaultExpandedKeys}
onCheck={onCheck}
treeData={WidgetItemNodes}
/>
);
};