@liujitcn/kratos-admin-core 0.0.66 → 0.0.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package/declarations/src/api/base/v1/login.d.ts +1 -3
- package/dist/package/declarations/src/api/base/v1/secret_crypto.d.ts +9 -0
- package/dist/package/declarations/src/components/Dialog/PasswordVerifyDialog.vue.d.ts +3 -7
- package/dist/package/declarations/src/components/ProForm/components/ProFormItem.vue.d.ts +6 -6
- package/dist/package/declarations/src/components/ProForm/components/SecretInput.vue.d.ts +23 -0
- package/dist/package/declarations/src/components/ProForm/interface/index.d.ts +14 -1
- package/dist/package/declarations/src/locales/generated.d.ts +32 -0
- package/dist/package/declarations/src/rpc/base/v1/login.d.ts +2 -39
- package/dist/package/declarations/src/rpc/base/v1/mfa.d.ts +3 -3
- package/dist/package/declarations/src/rpc/base/v1/oauth.d.ts +2 -2
- package/dist/package/declarations/src/rpc/base/v1/secret_crypto.d.ts +37 -0
- package/dist/package/declarations/src/rpc/common/v1/types.d.ts +4 -4
- package/dist/package/declarations/src/rpc/system/admin/v1/auth.d.ts +3 -3
- package/dist/package/declarations/src/security.d.ts +1 -1
- package/dist/package/declarations/src/utils/secretCrypto.d.ts +19 -0
- package/dist/package/src/api/base/v1/login.ts +0 -12
- package/dist/package/src/api/base/v1/secret_crypto.ts +35 -0
- package/dist/package/src/components/Dialog/PasswordVerifyDialog.vue +4 -8
- package/dist/package/src/components/ProForm/components/ProFormItem.vue +24 -1
- package/dist/package/src/components/ProForm/components/SecretInput.vue +117 -0
- package/dist/package/src/components/ProForm/interface/index.ts +15 -0
- package/dist/package/src/locales/README.md +1 -1
- package/dist/package/src/locales/en-US.json +9 -1
- package/dist/package/src/locales/ja-JP.json +9 -1
- package/dist/package/src/locales/zh-CN.json +9 -1
- package/dist/package/src/locales/zh-TW.json +9 -1
- package/dist/package/src/rpc/base/v1/login.ts +2 -42
- package/dist/package/src/rpc/base/v1/mfa.ts +3 -3
- package/dist/package/src/rpc/base/v1/oauth.ts +2 -2
- package/dist/package/src/rpc/base/v1/secret_crypto.ts +49 -0
- package/dist/package/src/rpc/common/v1/types.ts +4 -4
- package/dist/package/src/rpc/system/admin/v1/auth.ts +3 -3
- package/dist/package/src/security.ts +1 -1
- package/dist/package/src/utils/request.ts +3 -3
- package/dist/package/src/utils/{passwordCrypto.ts → secretCrypto.ts} +112 -50
- package/dist/package/src/views/demo/components/DemoFormDialog.vue +3 -3
- package/dist/package/src/views/demo/table/index.vue +2 -2
- package/dist/package/src/views/demo/tree-grid/index.vue +1 -1
- package/dist/package/src/views/login/components/LoginForm.vue +2 -2
- package/package.json +6 -2
- package/dist/package/declarations/src/utils/passwordCrypto.d.ts +0 -6
|
@@ -123,13 +123,13 @@ const deptTreeOptions: ProFormOption[] = demoDeptTree.map(dept => ({
|
|
|
123
123
|
|
|
124
124
|
/** 租户静态选项:tenant-select 传入 options 后不再请求租户接口,纯静态可渲染。 */
|
|
125
125
|
const tenantOptions: ProFormOption[] = [
|
|
126
|
-
{ label: "
|
|
127
|
-
{ label: "
|
|
126
|
+
{ label: t("core.demo.form.tenant.main"), value: 1 },
|
|
127
|
+
{ label: t("core.demo.form.tenant.sub"), value: 2 }
|
|
128
128
|
];
|
|
129
129
|
|
|
130
130
|
/** 协作成员穿梭框数据源:value 即选中后的 key。 */
|
|
131
131
|
const memberOptions: ProFormOption[] = demoDeptTree[0].children!.map((dept, index) => ({
|
|
132
|
-
label:
|
|
132
|
+
label: t("core.demo.form.leader_title", { name: dept.name }),
|
|
133
133
|
value: index + 1
|
|
134
134
|
}));
|
|
135
135
|
|
|
@@ -68,7 +68,7 @@ const statusTagOptions = [
|
|
|
68
68
|
];
|
|
69
69
|
|
|
70
70
|
/** select-v2 大数据下拉的静态选项(isShow: false,仅出现在搜索区)。 */
|
|
71
|
-
const tagSearchOptions = Array.from({ length: 50 }, (_, index) => ({ label:
|
|
71
|
+
const tagSearchOptions = Array.from({ length: 50 }, (_, index) => ({ label: t("core.demo.table.tag_item", { index: index + 1 }), value: `tag-${index + 1}` }));
|
|
72
72
|
|
|
73
73
|
/** tree-select 搜索项的静态团队树(isShow: false,仅出现在搜索区)。 */
|
|
74
74
|
const ownerGroupOptions = demoRegionTree;
|
|
@@ -121,7 +121,7 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
121
121
|
minWidth: 130,
|
|
122
122
|
align: "right",
|
|
123
123
|
cellType: "money",
|
|
124
|
-
moneyProps: { prefix: "¥", suffix: "
|
|
124
|
+
moneyProps: { prefix: "¥", suffix: t("core.demo.table.money_unit") }
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
127
|
// 多级表头:_children 嵌套的列渲染在“任务情况”分组下
|
|
@@ -180,7 +180,7 @@ function handleCreateChild(parentId?: number) {
|
|
|
180
180
|
function handleFormSubmit(data: Record<string, any>) {
|
|
181
181
|
const node: DemoCatalog = {
|
|
182
182
|
id: ++nextId,
|
|
183
|
-
name: String(data.name ||
|
|
183
|
+
name: String(data.name || t("core.demo.tree.new_dir", { id: nextId })),
|
|
184
184
|
code: `demo-${nextId}`,
|
|
185
185
|
owner: data.visibility === "private" ? "--" : "Demo",
|
|
186
186
|
status: data.enabled ? STATUS_ENABLE : STATUS_DISABLE,
|
|
@@ -217,7 +217,7 @@ import { useKeepAliveStore } from "../../../stores/modules/keepAlive";
|
|
|
217
217
|
import { initDynamicRouter } from "../../../routers/modules/dynamicRouter";
|
|
218
218
|
import { isUnmatchedRoute, navigateTo, resolveFrontendRouteURL } from "../../../utils/router";
|
|
219
219
|
import type { ElForm, FormRules } from "element-plus";
|
|
220
|
-
import {
|
|
220
|
+
import { encryptPassword } from "../../../utils/secretCrypto";
|
|
221
221
|
import { useConfigStore } from "../../../stores/modules/config";
|
|
222
222
|
import { Click as GoCaptchaClick, Rotate as GoCaptchaRotate, Slide as GoCaptchaSlide } from "go-captcha-vue";
|
|
223
223
|
import "go-captcha-vue/dist/style.css";
|
|
@@ -797,7 +797,7 @@ const verifyCaptchaToken = async (captchaCode: string) => {
|
|
|
797
797
|
const submitLogin = async (captchaToken: string) => {
|
|
798
798
|
loading.value = true;
|
|
799
799
|
try {
|
|
800
|
-
const password = await encryptPassword(loginForm.password
|
|
800
|
+
const password = await encryptPassword(loginForm.password);
|
|
801
801
|
const loginRequest: LoginRequest = {
|
|
802
802
|
tenant_code: configStore.showTenantCode ? loginForm.tenant_code : "0000",
|
|
803
803
|
user_name: loginForm.user_name,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liujitcn/kratos-admin-core",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.67",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "kratos-admin frontend runtime and base modules",
|
|
7
7
|
"author": {
|
|
@@ -232,7 +232,11 @@
|
|
|
232
232
|
"types": "./dist/package/declarations/vite.config.d.ts",
|
|
233
233
|
"default": "./vite.config.ts"
|
|
234
234
|
},
|
|
235
|
-
"./package.json": "./package.json"
|
|
235
|
+
"./package.json": "./package.json",
|
|
236
|
+
"./utils/secretCrypto": {
|
|
237
|
+
"types": "./dist/package/declarations/src/utils/secretCrypto.d.ts",
|
|
238
|
+
"default": "./dist/package/src/utils/secretCrypto.ts"
|
|
239
|
+
}
|
|
236
240
|
},
|
|
237
241
|
"files": [
|
|
238
242
|
"dist/package",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PasswordCryptoScene } from "../rpc/base/v1/login";
|
|
2
|
-
import type { PasswordCrypto } from "../rpc/common/v1/types";
|
|
3
|
-
export declare const PASSWORD_CRYPTO_SCENE: typeof PasswordCryptoScene;
|
|
4
|
-
export type { PasswordCryptoScene };
|
|
5
|
-
/** 加密单个密码字段,返回后端可解析的密码密文。 */
|
|
6
|
-
export declare function encryptPassword(password: string, scene: PasswordCryptoScene): Promise<PasswordCrypto>;
|