From 207d0ff7f791d8fee6c0d7c645406c27fd5dfabb Mon Sep 17 00:00:00 2001
From: smallbun <2689170096@qq.com>
Date: Fri, 8 Sep 2023 12:41:07 +0800
Subject: [PATCH] =?UTF-8?q?:zap:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/IconFont/lib/iconfont.js | 67 +++++++++++-
.../components/CreateUser/CreateUser.tsx | 2 +-
.../src/pages/app/AppConfig/data.d.ts | 102 ++++++++++++++++++
.../src/pages/security/Setting/data.d.ts | 11 ++
.../components/MailTemplate/MailTemplate.tsx | 5 +-
.../portal-fe/src/pages/Account/data.d.ts | 6 +-
.../portal-fe/src/pages/Application/data.d.ts | 10 +-
.../main/portal-fe/src/pages/Login/data.d.ts | 8 +-
8 files changed, 195 insertions(+), 16 deletions(-)
diff --git a/eiam-console/src/main/console-fe/src/components/IconFont/lib/iconfont.js b/eiam-console/src/main/console-fe/src/components/IconFont/lib/iconfont.js
index 90ee4748..43cd3bd7 100644
--- a/eiam-console/src/main/console-fe/src/components/IconFont/lib/iconfont.js
+++ b/eiam-console/src/main/console-fe/src/components/IconFont/lib/iconfont.js
@@ -15,4 +15,69 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
-window._iconfont_svg_string_3203993='',function(c){var l=(l=document.getElementsByTagName("script"))[l.length-1],a=l.getAttribute("data-injectcss"),l=l.getAttribute("data-disable-injectsvg");if(!l){var h,t,i,p,m,d=function(l,a){a.parentNode.insertBefore(l,a)};if(a&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(l){console&&console.log(l)}}h=function(){let l,a=document.createElement("div");a.innerHTML=c._iconfont_svg_string_3203993,(a=a.getElementsByTagName("svg")[0])&&(a.setAttribute("aria-hidden","true"),a.style.position="absolute",a.style.width=0,a.style.height=0,a.style.overflow="hidden",a=a,(l=document.body).firstChild?d(a,l.firstChild):l.appendChild(a))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(t=function(){document.removeEventListener("DOMContentLoaded",t,!1),h()},document.addEventListener("DOMContentLoaded",t,!1)):document.attachEvent&&(i=h,p=c.document,m=!1,o(),p.onreadystatechange=function(){"complete"==p.readyState&&(p.onreadystatechange=null,z())})}function z(){m||(m=!0,i())}function o(){try{p.documentElement.doScroll("left")}catch(l){return void setTimeout(o,50)}z()}}(window);
+(window._iconfont_svg_string_3203993 =
+ ''),
+ (function (c) {
+ var l = (l = document.getElementsByTagName('script'))[l.length - 1],
+ a = l.getAttribute('data-injectcss'),
+ l = l.getAttribute('data-disable-injectsvg');
+ if (!l) {
+ var h,
+ t,
+ i,
+ p,
+ m,
+ d = function (l, a) {
+ a.parentNode.insertBefore(l, a);
+ };
+ if (a && !c.__iconfont__svg__cssinject__) {
+ c.__iconfont__svg__cssinject__ = !0;
+ try {
+ document.write(
+ '',
+ );
+ } catch (l) {
+ console && console.log(l);
+ }
+ }
+ (h = function () {
+ let l,
+ a = document.createElement('div');
+ (a.innerHTML = c._iconfont_svg_string_3203993),
+ (a = a.getElementsByTagName('svg')[0]) &&
+ (a.setAttribute('aria-hidden', 'true'),
+ (a.style.position = 'absolute'),
+ (a.style.width = 0),
+ (a.style.height = 0),
+ (a.style.overflow = 'hidden'),
+ (a = a),
+ (l = document.body).firstChild ? d(a, l.firstChild) : l.appendChild(a));
+ }),
+ document.addEventListener
+ ? ~['complete', 'loaded', 'interactive'].indexOf(document.readyState)
+ ? setTimeout(h, 0)
+ : ((t = function () {
+ document.removeEventListener('DOMContentLoaded', t, !1), h();
+ }),
+ document.addEventListener('DOMContentLoaded', t, !1))
+ : document.attachEvent &&
+ ((i = h),
+ (p = c.document),
+ (m = !1),
+ o(),
+ (p.onreadystatechange = function () {
+ 'complete' == p.readyState && ((p.onreadystatechange = null), z());
+ }));
+ }
+ function z() {
+ m || ((m = !0), i());
+ }
+ function o() {
+ try {
+ p.documentElement.doScroll('left');
+ } catch (l) {
+ return void setTimeout(o, 50);
+ }
+ z();
+ }
+ })(window);
diff --git a/eiam-console/src/main/console-fe/src/pages/account/UserList/components/CreateUser/CreateUser.tsx b/eiam-console/src/main/console-fe/src/pages/account/UserList/components/CreateUser/CreateUser.tsx
index ceee1ee9..f7c8ebfa 100644
--- a/eiam-console/src/main/console-fe/src/pages/account/UserList/components/CreateUser/CreateUser.tsx
+++ b/eiam-console/src/main/console-fe/src/pages/account/UserList/components/CreateUser/CreateUser.tsx
@@ -136,7 +136,7 @@ const CreateUser = (props: CreateUserProps) => {
*/
const cancel = async () => {
if (onCancel) {
- await onCancel();
+ onCancel();
}
setSubmitLoading(false);
form.resetFields();
diff --git a/eiam-console/src/main/console-fe/src/pages/app/AppConfig/data.d.ts b/eiam-console/src/main/console-fe/src/pages/app/AppConfig/data.d.ts
index e708a4be..6e31e932 100644
--- a/eiam-console/src/main/console-fe/src/pages/app/AppConfig/data.d.ts
+++ b/eiam-console/src/main/console-fe/src/pages/app/AppConfig/data.d.ts
@@ -38,3 +38,105 @@ export type GetApp = {
enabled: boolean;
remark: string;
};
+
+/**
+ * 应用权限列表
+ */
+export type AppAccessPolicyList = {
+ id: string;
+ //主体ID
+ subjectId: string;
+ //主体名称
+ subjectName: string;
+ //主体类型
+ subjectType: string;
+ //应用类型
+ appType: string;
+ appProtocol: string;
+ //Effect
+ effect: string;
+};
+
+/**
+ * 角色列表
+ */
+type AppPermissionRoleList = {
+ id: string;
+ name: string;
+ code: string;
+ enabled: boolean;
+ appId: string;
+ remark: string;
+};
+
+/**
+ * 角色列表
+ */
+type GetAppPermissionRole = {
+ id: string;
+ name: string;
+ code: string;
+ enabled: boolean;
+ appId: string;
+ remark: string;
+};
+
+/**
+ * 资源列表
+ */
+type AppPermissionResourceList = {
+ id: string;
+ name: string;
+ code: string;
+ enabled: boolean;
+ desc: string;
+ appId: string;
+};
+
+/**
+ * 权限资源点
+ */
+type AppPermissionResourceActionList = {
+ id: string;
+ name: string;
+ code: string;
+ desc: string;
+ appId: string;
+ menus: {
+ access: string;
+ id: string;
+ name: string;
+ }[];
+ datas: {
+ access: string;
+ id: string;
+ name: string;
+ }[];
+ buttons: {
+ access: string;
+ id: string;
+ name: string;
+ }[];
+ apis: {
+ access: string;
+ id: string;
+ name: string;
+ }[];
+ others: {
+ access: string;
+ id: string;
+ name: string;
+ }[];
+};
+
+/**
+ * 权限授权列表
+ */
+type AppPermissionPolicyList = {
+ id: string;
+ name: string;
+ code: string;
+ enabled: boolean;
+ desc: string;
+ appId: string;
+};
diff --git a/eiam-console/src/main/console-fe/src/pages/security/Setting/data.d.ts b/eiam-console/src/main/console-fe/src/pages/security/Setting/data.d.ts
index 096e3414..d18cfe6f 100644
--- a/eiam-console/src/main/console-fe/src/pages/security/Setting/data.d.ts
+++ b/eiam-console/src/main/console-fe/src/pages/security/Setting/data.d.ts
@@ -18,3 +18,14 @@
export type SecurityDefensePolicyConfig = {
contentSecurityPolicy: string;
};
+
+/**
+ * 安全基础配置
+ */
+export type BasicSettingConfig = {
+ frequentRegisterCheck: boolean;
+ emailVerifiedDefault: boolean;
+ sendWelcomeEmail: boolean;
+ verifyOldEmail: boolean;
+ verifyOldPhone: boolean;
+};
diff --git a/eiam-console/src/main/console-fe/src/pages/setting/Message/components/MailTemplate/MailTemplate.tsx b/eiam-console/src/main/console-fe/src/pages/setting/Message/components/MailTemplate/MailTemplate.tsx
index 21670230..01e81683 100644
--- a/eiam-console/src/main/console-fe/src/pages/setting/Message/components/MailTemplate/MailTemplate.tsx
+++ b/eiam-console/src/main/console-fe/src/pages/setting/Message/components/MailTemplate/MailTemplate.tsx
@@ -26,6 +26,7 @@ import MailTemplateConfig from './MailTemplateConfig';
import useStyle from './style';
import classnames from 'classnames';
import { useIntl } from '@umijs/max';
+import { EmailTemplateList } from '../../data.d';
const prefixCls = 'setting-mail-template';
@@ -36,7 +37,7 @@ export default (props: { visible: boolean }) => {
const [content, setContent] = useState('');
const [configType, setConfigType] = useState('');
const [loading, setLoading] = useState(false);
- const [dataSource, setDataSource] = useState([]);
+ const [dataSource, setDataSource] = useState([]);
const [browseVisible, setBrowseVisible] = useState(false);
const { styles } = useStyle(prefixCls);
const intl = useIntl();
@@ -85,7 +86,7 @@ export default (props: { visible: boolean }) => {
-
+
rowKey="type"
split
cardProps={{ bodyStyle: { padding: 0 } }}
diff --git a/eiam-portal/src/main/portal-fe/src/pages/Account/data.d.ts b/eiam-portal/src/main/portal-fe/src/pages/Account/data.d.ts
index 3e3a1893..7215cf53 100644
--- a/eiam-portal/src/main/portal-fe/src/pages/Account/data.d.ts
+++ b/eiam-portal/src/main/portal-fe/src/pages/Account/data.d.ts
@@ -40,7 +40,7 @@ export interface GetBoundIdpList {
* 账户菜单类型
*/
export enum AccountSettingsStateKey {
- BASE = 'base',
- SECURITY = 'security',
- BIND = 'bind',
+ base = 'base',
+ security = 'security',
+ bind = 'bind',
}
diff --git a/eiam-portal/src/main/portal-fe/src/pages/Application/data.d.ts b/eiam-portal/src/main/portal-fe/src/pages/Application/data.d.ts
index 88d8e7f0..ad21d5f4 100644
--- a/eiam-portal/src/main/portal-fe/src/pages/Application/data.d.ts
+++ b/eiam-portal/src/main/portal-fe/src/pages/Application/data.d.ts
@@ -31,9 +31,15 @@ export enum InitLoginType {
/**
* 仅允许应用发起 SSO
*/
- ONLY_APP_INIT_SSO = 'only_app_init_sso',
+ only_app_init_sso = 'only_app_init_sso',
/**
* 门户或应用发起 SSO
*/
- PORTAL_OR_APP_INIT_SSO = 'portal_or_app_init_sso',
+ portal_or_app_init_sso = 'portal_or_app_init_sso',
}
+
+export type AppGroupList = {
+ id: string;
+ name: string;
+ appCount: number;
+};
diff --git a/eiam-portal/src/main/portal-fe/src/pages/Login/data.d.ts b/eiam-portal/src/main/portal-fe/src/pages/Login/data.d.ts
index 66a37a2b..c95ea070 100644
--- a/eiam-portal/src/main/portal-fe/src/pages/Login/data.d.ts
+++ b/eiam-portal/src/main/portal-fe/src/pages/Login/data.d.ts
@@ -15,7 +15,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
-import type { IDP_TYPE, MFA_FACTOR } from '@/constants';
+import type { IDP_TYPE } from '@/constants';
/**
* 登录参数类型
@@ -44,9 +44,3 @@ export type IdpList = {
export type LoginConfig = {
idps: IdpList[];
};
-
-export type MfaFactor = {
- factor: MFA_FACTOR;
- target?: string;
- usable: boolean;
-};