tachybase_todo/packages/plugins/@nocobase/plugin-api-keys/src/client/index.tsx
jack zhang 35b06cbfa0
refactor: plugin settings manager (#2712)
* feat: add settingsCenter

* fix: style bug

* chore: optimized code

* refactor: settingCenter Auth

* feat: add aclSnippet option

* refactor: all plugin's setting center api

* feat: add plugin with name

* docs: add settings-center doc

* fix: settings center menu sort by name

* fix: change setting center layout

* fix: change hello sort

* test: add SettingsCenter.ts test case

* fix: bug

* fix: acl bug

* fix: bug

* fix: bug and 404 page

* fix: test bug

* fix: test bug

* fix: bug

* fix: locale

* fix: styling

* fix: rename settingsCenter to pluginSettingsManager

* fix: styling

* fix: e2e bug

* fix: e2e bug

* fix: locale

* feat: update docs

* fix: update

---------

Co-authored-by: chenos <chenlinxh@gmail.com>
2023-11-13 11:01:18 +08:00

17 lines
446 B
TypeScript

import { Plugin } from '@nocobase/client';
import { NAMESPACE } from '../constants';
import { Configuration } from './Configuration';
class APIKeysPlugin extends Plugin {
async load() {
this.app.pluginSettingsManager.add(NAMESPACE, {
icon: 'KeyOutlined',
title: '{{t("API keys", {"ns": "api-keys"})}}',
Component: Configuration,
aclSnippet: 'pm.api-keys.configuration',
});
}
}
export default APIKeysPlugin;