refactor: plugin manager keywords (#3490)
This commit is contained in:
parent
ed35a35837
commit
a059b27d13
@ -844,10 +844,11 @@
|
||||
"Permission denied": "没有权限",
|
||||
"Allow add new": "允许新增",
|
||||
"Allow selection of existing records": "允许选择已有数据",
|
||||
"Data model": "数据模型",
|
||||
"Security": "认证与安全",
|
||||
"Action": "操作",
|
||||
"System": "系统管理",
|
||||
"Other": "其他",
|
||||
"Workflow":"工作流"
|
||||
"Data Model": "数据模型",
|
||||
"Blocks":"区块",
|
||||
"Users & permissions": "用户和权限",
|
||||
"System management": "系统管理",
|
||||
"System & security":"系统和安全",
|
||||
"Workflow":"工作流",
|
||||
"Third party services":"第三方服务"
|
||||
}
|
||||
|
@ -74,24 +74,22 @@ const LocalPlugins = () => {
|
||||
const [keyword, setKeyword] = useState(null);
|
||||
const debouncedSearchValue = useDebounce(searchValue, { wait: 100 });
|
||||
|
||||
const keywordList = useMemo(() => {
|
||||
let keyWordlists = [];
|
||||
data?.data.forEach((v) => {
|
||||
if (v.keywords) {
|
||||
keyWordlists = keyWordlists.concat(v.keywords);
|
||||
}
|
||||
});
|
||||
keyWordlists.sort((a, b) => {
|
||||
if (a === 'data model') return -1;
|
||||
if (b === 'data model') return 1;
|
||||
return 0;
|
||||
});
|
||||
return _.uniq(keyWordlists).concat('other');
|
||||
}, [data?.data]);
|
||||
const keyWordlists = [
|
||||
'Data Model',
|
||||
'Fields',
|
||||
'Blocks',
|
||||
'Actions',
|
||||
'Users & permissions',
|
||||
'Workflow',
|
||||
'System management',
|
||||
'System & security',
|
||||
'Third party services',
|
||||
'Others',
|
||||
];
|
||||
|
||||
const keyWordsfilterList = useMemo(() => {
|
||||
const list = keywordList.map((i) => {
|
||||
if (i === 'other') {
|
||||
const list = keyWordlists.map((i) => {
|
||||
if (i === 'Others') {
|
||||
const result = data?.data.filter((v) => !v.keywords);
|
||||
return {
|
||||
key: i,
|
||||
@ -105,7 +103,7 @@ const LocalPlugins = () => {
|
||||
};
|
||||
});
|
||||
return list;
|
||||
}, [keywordList]);
|
||||
}, [keyWordlists]);
|
||||
|
||||
const pluginList = useMemo(() => {
|
||||
let list = filterList[filterIndex]?.list || [];
|
||||
@ -198,9 +196,7 @@ const LocalPlugins = () => {
|
||||
style={{ padding: '3px 0' }}
|
||||
onClick={() => (item.key !== keyword ? setKeyword(item.key) : setKeyword(null))}
|
||||
>
|
||||
<a style={{ fontWeight: keyword === item.key ? 'bold' : 'normal' }}>
|
||||
{t(item.key?.charAt?.(0).toUpperCase() + item.key?.slice?.(1))}
|
||||
</a>
|
||||
<a style={{ fontWeight: keyword === item.key ? 'bold' : 'normal' }}>{t(item.key)}</a>
|
||||
</List.Item>
|
||||
);
|
||||
}}
|
||||
|
@ -9,7 +9,7 @@
|
||||
"main": "./dist/server/index.js",
|
||||
"homepage": "https://docs.nocobase.com/plugins/acl",
|
||||
"homepage.zh-CN": "https://docs-cn.nocobase.com/plugins/acl",
|
||||
"keywords":["security","users"],
|
||||
"keywords":["Users & permissions"],
|
||||
"devDependencies": {
|
||||
"@types/jsonwebtoken": "^8.5.8",
|
||||
"async-mutex": "^0.3.2",
|
||||
|
@ -15,5 +15,5 @@
|
||||
"@nocobase/test": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["action"]
|
||||
"keywords":["Actions"]
|
||||
}
|
||||
|
@ -15,5 +15,5 @@
|
||||
"@nocobase/test": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["action"]
|
||||
"keywords":["Actions"]
|
||||
}
|
||||
|
@ -15,5 +15,5 @@
|
||||
"@nocobase/test": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["action"]
|
||||
"keywords":["Actions"]
|
||||
}
|
||||
|
@ -16,6 +16,6 @@
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"action"
|
||||
"actions"
|
||||
]
|
||||
}
|
||||
|
@ -24,5 +24,5 @@
|
||||
"@nocobase/test": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["system"]
|
||||
"keywords":["System & security"]
|
||||
}
|
||||
|
@ -27,5 +27,5 @@
|
||||
"description": "Basic authentication and authenticator management",
|
||||
"description.zh-CN": "提供基础认证功能和扩展认证器管理功能",
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["security","users"]
|
||||
"keywords":["Users & permissions"]
|
||||
}
|
||||
|
@ -38,5 +38,5 @@
|
||||
"@nocobase/test": "0.x",
|
||||
"@nocobase/utils": "0.x"
|
||||
},
|
||||
"keywords":["system"]
|
||||
"keywords":["System management"]
|
||||
}
|
||||
|
@ -38,6 +38,6 @@
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"block"
|
||||
"Blocks"
|
||||
]
|
||||
}
|
||||
|
@ -24,5 +24,5 @@
|
||||
"react-router-dom": "6.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["security","users"]
|
||||
"keywords":["Users & permissions"]
|
||||
}
|
||||
|
@ -23,5 +23,5 @@
|
||||
"@nocobase/test": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["field"]
|
||||
"keywords":["Fields"]
|
||||
}
|
||||
|
@ -23,5 +23,5 @@
|
||||
"@nocobase/utils": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["data model"]
|
||||
"keywords":["Data Model"]
|
||||
}
|
||||
|
@ -23,5 +23,5 @@
|
||||
"@nocobase/test": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["action"]
|
||||
"keywords":["Actions"]
|
||||
}
|
||||
|
@ -34,5 +34,5 @@
|
||||
"@nocobase/utils": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["block"]
|
||||
"keywords":["Blocks"]
|
||||
}
|
||||
|
@ -8,5 +8,5 @@
|
||||
"@nocobase/test": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["pm"]
|
||||
"keywords":["system"]
|
||||
}
|
||||
|
@ -17,5 +17,5 @@
|
||||
"@nocobase/test": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["field"]
|
||||
"keywords":["Fields"]
|
||||
}
|
||||
|
@ -28,5 +28,5 @@
|
||||
"@nocobase/utils": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["action"]
|
||||
"keywords":["Actions"]
|
||||
}
|
||||
|
@ -26,5 +26,5 @@
|
||||
"@nocobase/utils": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["field"]
|
||||
"keywords":["Fields"]
|
||||
}
|
||||
|
@ -18,5 +18,5 @@
|
||||
"@nocobase/test": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["block"]
|
||||
"keywords":["Blocks"]
|
||||
}
|
||||
|
@ -36,5 +36,5 @@
|
||||
"@nocobase/utils": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["data model"]
|
||||
"keywords":["Data Model"]
|
||||
}
|
||||
|
@ -26,5 +26,5 @@
|
||||
"@nocobase/test": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["block"]
|
||||
"keywords":["Blocks"]
|
||||
}
|
||||
|
@ -35,5 +35,5 @@
|
||||
"@nocobase/utils": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["action"]
|
||||
"keywords":["Actions"]
|
||||
}
|
||||
|
@ -15,5 +15,5 @@
|
||||
"@nocobase/test": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["block"]
|
||||
"keywords":["Blocks"]
|
||||
}
|
||||
|
@ -21,6 +21,5 @@
|
||||
"displayName.zh-CN": "多语言管理",
|
||||
"description": "Allows to manage localization resources of the application.",
|
||||
"description.zh-CN": "支持管理应用程序的多语言资源。",
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["system"]
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde"
|
||||
}
|
||||
|
@ -20,5 +20,5 @@
|
||||
"@nocobase/test": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["system"]
|
||||
"keywords":["System & security"]
|
||||
}
|
||||
|
@ -37,5 +37,5 @@
|
||||
"@nocobase/utils": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["block"]
|
||||
"keywords":["Blocks"]
|
||||
}
|
||||
|
@ -20,5 +20,5 @@
|
||||
"@nocobase/test": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["field"]
|
||||
"keywords":["Fields"]
|
||||
}
|
||||
|
@ -24,5 +24,5 @@
|
||||
"@nocobase/utils": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["system"]
|
||||
"keywords":["System management"]
|
||||
}
|
||||
|
@ -16,6 +16,5 @@
|
||||
"@nocobase/test": "0.x",
|
||||
"@nocobase/utils": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["system"]
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde"
|
||||
}
|
||||
|
@ -30,5 +30,5 @@
|
||||
"@nocobase/test": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["security","users"]
|
||||
"keywords":["Users & permissions"]
|
||||
}
|
||||
|
@ -28,5 +28,5 @@
|
||||
"@nocobase/test": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords":["security","users"]
|
||||
"keywords":["Users & permissions"]
|
||||
}
|
||||
|
@ -31,6 +31,6 @@
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"field"
|
||||
"Fields"
|
||||
]
|
||||
}
|
||||
|
@ -26,8 +26,5 @@
|
||||
"@nocobase/test": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"security",
|
||||
"users"
|
||||
]
|
||||
"keywords":["Users & permissions"]
|
||||
}
|
||||
|
@ -28,6 +28,6 @@
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"field"
|
||||
"Fields"
|
||||
]
|
||||
}
|
||||
|
@ -16,7 +16,5 @@
|
||||
"@nocobase/test": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"system"
|
||||
]
|
||||
"keywords":["System management"]
|
||||
}
|
||||
|
@ -33,7 +33,5 @@
|
||||
"@nocobase/utils": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"system"
|
||||
]
|
||||
"keywords":["System management"]
|
||||
}
|
||||
|
@ -19,6 +19,6 @@
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"system"
|
||||
"System & security"
|
||||
]
|
||||
}
|
||||
|
@ -26,6 +26,6 @@
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"system"
|
||||
"System & security"
|
||||
]
|
||||
}
|
||||
|
@ -25,7 +25,5 @@
|
||||
"@nocobase/utils": "0.x"
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"users"
|
||||
]
|
||||
"keywords":["Users & permissions"]
|
||||
}
|
||||
|
@ -33,6 +33,6 @@
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"system"
|
||||
"Third party services"
|
||||
]
|
||||
}
|
||||
|
@ -23,6 +23,6 @@
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"workflow"
|
||||
"Workflow"
|
||||
]
|
||||
}
|
||||
|
@ -23,6 +23,6 @@
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"workflow"
|
||||
"Workflow"
|
||||
]
|
||||
}
|
||||
|
@ -32,6 +32,6 @@
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"workflow"
|
||||
"Workflow"
|
||||
]
|
||||
}
|
||||
|
@ -23,6 +23,6 @@
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"workflow"
|
||||
"Workflow"
|
||||
]
|
||||
}
|
||||
|
@ -23,6 +23,6 @@
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"workflow"
|
||||
"Workflow"
|
||||
]
|
||||
}
|
||||
|
@ -32,6 +32,6 @@
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"workflow"
|
||||
"Workflow"
|
||||
]
|
||||
}
|
||||
|
@ -24,6 +24,6 @@
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"workflow"
|
||||
"Workflow"
|
||||
]
|
||||
}
|
||||
|
@ -23,6 +23,6 @@
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"workflow"
|
||||
"Workflow"
|
||||
]
|
||||
}
|
||||
|
@ -23,6 +23,6 @@
|
||||
},
|
||||
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
|
||||
"keywords": [
|
||||
"workflow"
|
||||
"Workflow"
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user