mirror of https://github.com/msgbyte/tailchat
feat: 应用凭证
parent
20537788d6
commit
5c53f0a289
@ -0,0 +1,3 @@
|
|||||||
|
.plugin-openapi-app-info_profile {
|
||||||
|
// keep
|
||||||
|
}
|
||||||
@ -1,3 +1,8 @@
|
|||||||
.plugin-openapi-app-info {
|
.plugin-openapi-app-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.plugin-openapi-app-info_body {
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
.plugin-openapi-main-panel {
|
.plugin-openapi-main-panel {
|
||||||
// keep
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,9 @@
|
|||||||
|
.plugin-openapi-secret-value {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.iconify {
|
||||||
|
cursor: pointer;
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
import { Icon } from '@capital/component';
|
||||||
|
import React, { useState } from 'react';
|
||||||
|
import './SecretValue.less';
|
||||||
|
|
||||||
|
export const SecretValue: React.FC = React.memo((props) => {
|
||||||
|
const [show, setShow] = useState(false);
|
||||||
|
return (
|
||||||
|
<span className="plugin-openapi-secret-value">
|
||||||
|
{show ? (
|
||||||
|
<>
|
||||||
|
<span>{props.children}</span>
|
||||||
|
<Icon icon="mdi:eye-off-outline" onClick={() => setShow(false)} />
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<span>********</span>
|
||||||
|
<Icon icon="mdi:eye-outline" onClick={() => setShow(true)} />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
SecretValue.displayName = 'SecretValue';
|
||||||
@ -1,10 +1,18 @@
|
|||||||
import { Loadable, regCustomPanel } from '@capital/common';
|
import { Loadable, regCustomPanel, regRootRouter } from '@capital/common';
|
||||||
import { Translate } from './translate';
|
import { Translate } from './translate';
|
||||||
|
|
||||||
|
const MainPanel = Loadable(() => import('./MainPanel'));
|
||||||
|
|
||||||
regCustomPanel({
|
regCustomPanel({
|
||||||
position: 'setting',
|
position: 'setting',
|
||||||
icon: '',
|
icon: '',
|
||||||
name: 'com.msgbyte.openapi/mainPanel',
|
name: 'com.msgbyte.openapi/mainPanel',
|
||||||
label: Translate.openapi,
|
label: Translate.openapi,
|
||||||
render: Loadable(() => import('./MainPanel')),
|
render: MainPanel,
|
||||||
|
});
|
||||||
|
|
||||||
|
regRootRouter({
|
||||||
|
name: 'com.msgbyte.openapi/route',
|
||||||
|
path: '/openapi',
|
||||||
|
component: MainPanel,
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue