mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 04:27:39 +00:00
[improvement][semantic-fe] Add permission control to the action buttons for the main domain; apply high sensitivity filtering to the authorization of metrics/dimensions. [improvement][semantic-fe] Optimize the editing mode in the dimension/metric/datasource components to use the modelId stored in the database for data, instead of relying on the data from the state manager.
34 lines
767 B
TypeScript
34 lines
767 B
TypeScript
import { Space } from 'antd';
|
|
import React from 'react';
|
|
import { useModel } from 'umi';
|
|
import Avatar from './AvatarDropdown';
|
|
|
|
import styles from './index.less';
|
|
import cx from 'classnames';
|
|
|
|
export type SiderTheme = 'light' | 'dark';
|
|
|
|
const GlobalHeaderRight: React.FC = () => {
|
|
const { initialState } = useModel('@@initialState');
|
|
|
|
if (!initialState || !initialState.settings) {
|
|
return null;
|
|
}
|
|
|
|
const { navTheme, layout } = initialState.settings;
|
|
let className = styles.right;
|
|
|
|
if (layout === 'top' || layout === 'mix') {
|
|
className = cx(styles.right, styles.dark);
|
|
}
|
|
|
|
function handleLogin() {}
|
|
|
|
return (
|
|
<Space className={className}>
|
|
<Avatar onClickLogin={handleLogin} />
|
|
</Space>
|
|
);
|
|
};
|
|
export default GlobalHeaderRight;
|