refactor: plugin manager keywords (#3490)

This commit is contained in:
katherinehhh 2024-02-05 14:37:07 +08:00 committed by GitHub
parent ed35a35837
commit a059b27d13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
51 changed files with 72 additions and 86 deletions

View File

@ -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":"第三方服务"
}

View File

@ -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>
);
}}

View File

@ -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",

View File

@ -15,5 +15,5 @@
"@nocobase/test": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["action"]
"keywords":["Actions"]
}

View File

@ -15,5 +15,5 @@
"@nocobase/test": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["action"]
"keywords":["Actions"]
}

View File

@ -15,5 +15,5 @@
"@nocobase/test": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["action"]
"keywords":["Actions"]
}

View File

@ -16,6 +16,6 @@
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"action"
"actions"
]
}

View File

@ -24,5 +24,5 @@
"@nocobase/test": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["system"]
"keywords":["System & security"]
}

View File

@ -27,5 +27,5 @@
"description": "Basic authentication and authenticator management",
"description.zh-CN": "提供基础认证功能和扩展认证器管理功能",
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["security","users"]
"keywords":["Users & permissions"]
}

View File

@ -38,5 +38,5 @@
"@nocobase/test": "0.x",
"@nocobase/utils": "0.x"
},
"keywords":["system"]
"keywords":["System management"]
}

View File

@ -38,6 +38,6 @@
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"block"
"Blocks"
]
}

View File

@ -24,5 +24,5 @@
"react-router-dom": "6.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["security","users"]
"keywords":["Users & permissions"]
}

View File

@ -23,5 +23,5 @@
"@nocobase/test": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["field"]
"keywords":["Fields"]
}

View File

@ -23,5 +23,5 @@
"@nocobase/utils": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["data model"]
"keywords":["Data Model"]
}

View File

@ -23,5 +23,5 @@
"@nocobase/test": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["action"]
"keywords":["Actions"]
}

View File

@ -34,5 +34,5 @@
"@nocobase/utils": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["block"]
"keywords":["Blocks"]
}

View File

@ -8,5 +8,5 @@
"@nocobase/test": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["pm"]
"keywords":["system"]
}

View File

@ -17,5 +17,5 @@
"@nocobase/test": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["field"]
"keywords":["Fields"]
}

View File

@ -28,5 +28,5 @@
"@nocobase/utils": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["action"]
"keywords":["Actions"]
}

View File

@ -26,5 +26,5 @@
"@nocobase/utils": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["field"]
"keywords":["Fields"]
}

View File

@ -18,5 +18,5 @@
"@nocobase/test": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["block"]
"keywords":["Blocks"]
}

View File

@ -36,5 +36,5 @@
"@nocobase/utils": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["data model"]
"keywords":["Data Model"]
}

View File

@ -26,5 +26,5 @@
"@nocobase/test": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["block"]
"keywords":["Blocks"]
}

View File

@ -35,5 +35,5 @@
"@nocobase/utils": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["action"]
"keywords":["Actions"]
}

View File

@ -15,5 +15,5 @@
"@nocobase/test": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["block"]
"keywords":["Blocks"]
}

View File

@ -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"
}

View File

@ -20,5 +20,5 @@
"@nocobase/test": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["system"]
"keywords":["System & security"]
}

View File

@ -37,5 +37,5 @@
"@nocobase/utils": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["block"]
"keywords":["Blocks"]
}

View File

@ -20,5 +20,5 @@
"@nocobase/test": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["field"]
"keywords":["Fields"]
}

View File

@ -24,5 +24,5 @@
"@nocobase/utils": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["system"]
"keywords":["System management"]
}

View File

@ -16,6 +16,5 @@
"@nocobase/test": "0.x",
"@nocobase/utils": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["system"]
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde"
}

View File

@ -30,5 +30,5 @@
"@nocobase/test": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["security","users"]
"keywords":["Users & permissions"]
}

View File

@ -28,5 +28,5 @@
"@nocobase/test": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords":["security","users"]
"keywords":["Users & permissions"]
}

View File

@ -31,6 +31,6 @@
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"field"
"Fields"
]
}

View File

@ -26,8 +26,5 @@
"@nocobase/test": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"security",
"users"
]
"keywords":["Users & permissions"]
}

View File

@ -28,6 +28,6 @@
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"field"
"Fields"
]
}

View File

@ -16,7 +16,5 @@
"@nocobase/test": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"system"
]
"keywords":["System management"]
}

View File

@ -33,7 +33,5 @@
"@nocobase/utils": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"system"
]
"keywords":["System management"]
}

View File

@ -19,6 +19,6 @@
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"system"
"System & security"
]
}

View File

@ -26,6 +26,6 @@
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"system"
"System & security"
]
}

View File

@ -25,7 +25,5 @@
"@nocobase/utils": "0.x"
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"users"
]
"keywords":["Users & permissions"]
}

View File

@ -33,6 +33,6 @@
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"system"
"Third party services"
]
}

View File

@ -23,6 +23,6 @@
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"workflow"
"Workflow"
]
}

View File

@ -23,6 +23,6 @@
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"workflow"
"Workflow"
]
}

View File

@ -32,6 +32,6 @@
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"workflow"
"Workflow"
]
}

View File

@ -23,6 +23,6 @@
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"workflow"
"Workflow"
]
}

View File

@ -23,6 +23,6 @@
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"workflow"
"Workflow"
]
}

View File

@ -32,6 +32,6 @@
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"workflow"
"Workflow"
]
}

View File

@ -24,6 +24,6 @@
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"workflow"
"Workflow"
]
}

View File

@ -23,6 +23,6 @@
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"workflow"
"Workflow"
]
}

View File

@ -23,6 +23,6 @@
},
"gitHead": "979a9c59a98c61a2287dd847580746a9b597cbde",
"keywords": [
"workflow"
"Workflow"
]
}