mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-01-04 16:28:00 +08:00
first commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { PREFIX_CLS } from '../../../common/constants';
|
||||
|
||||
type Props = {
|
||||
domain: string;
|
||||
onApplyAuth?: (domain: string) => void;
|
||||
};
|
||||
|
||||
const ApplyAuth: React.FC<Props> = ({ domain, onApplyAuth }) => {
|
||||
const prefixCls = `${PREFIX_CLS}-apply-auth`;
|
||||
|
||||
return (
|
||||
<div className={prefixCls}>
|
||||
暂无权限,
|
||||
{onApplyAuth ? (
|
||||
<span
|
||||
className={`${prefixCls}-apply`}
|
||||
onClick={() => {
|
||||
onApplyAuth(domain);
|
||||
}}
|
||||
>
|
||||
点击申请
|
||||
</span>
|
||||
) : (
|
||||
'请联系管理员申请权限'
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ApplyAuth;
|
||||
@@ -0,0 +1,13 @@
|
||||
@import '../../../styles/index.less';
|
||||
|
||||
@apply-auth-cls: ~'@{supersonic-chat-prefix}-apply-auth';
|
||||
|
||||
.@{apply-auth-cls} {
|
||||
font-size: 14px;
|
||||
color: var(--text-color);
|
||||
|
||||
&-apply {
|
||||
color: var(--chat-blue);
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user