@pubinfo-pr/module-crypto 0.230.1 → 0.231.1

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.
@@ -1,38 +1,38 @@
1
- import { cryptoContext as e, n as t, t as n } from "./index.js";
2
- import { r, t as i } from "./drawerCryptoUrl-BtGF8N07.js";
1
+ import { i as e, n as t, t as n } from "./context-CqcxYCXg.js";
2
+ import { r, t as i } from "./drawerCryptoUrl-BR79pIbC.js";
3
3
  import { PubinfoIcon as a, useAuth as o } from "pubinfo-pr";
4
- import { Button as s, CheckableTag as ee, Form as c, FormItem as l, Space as te, Switch as u } from "ant-design-vue/es";
5
- import { createBlock as d, createCommentVNode as ne, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, defineComponent as g, normalizeClass as _, onMounted as v, openBlock as y, reactive as b, ref as x, resolveDirective as re, toDisplayString as S, unref as C, withCtx as w, withDirectives as T } from "vue";
6
- import { PlusCircleOutlined as E, QuestionCircleOutlined as ie } from "@ant-design/icons-vue";
4
+ import { Button as ee, CheckableTag as te, Form as s, FormItem as ne, Space as re, Switch as c } from "ant-design-vue/es";
5
+ import { createBlock as l, createCommentVNode as ie, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, normalizeClass as h, onMounted as g, openBlock as _, reactive as v, ref as y, resolveDirective as b, toDisplayString as x, unref as S, withCtx as C, withDirectives as w } from "vue";
6
+ import { PlusCircleOutlined as T, QuestionCircleOutlined as E } from "@ant-design/icons-vue";
7
7
  import { ProTable as ae } from "@pubinfo/pro-components";
8
8
  import { Modal as D, message as O } from "ant-design-vue";
9
9
  import './setting.css';//#region src/pages/enum.ts
10
10
  var k = /* @__PURE__ */ function(e) {
11
11
  return e.ADD = "新增", e.EDIT = "编辑", e.REMOVE = "删除", e.ENABLE = "启用", e.DISABLE = "停用", e;
12
- }({}), oe = {
12
+ }({}), A = {
13
13
  "w-full": "",
14
14
  "h-full": "",
15
15
  "pt-10px": "",
16
16
  "px-10px": "",
17
17
  "overflow-auto": ""
18
- }, A = {
18
+ }, oe = {
19
19
  "h-full": "",
20
20
  "min-w-1130px": ""
21
21
  }, j = { class: "pt-20px pl-20px h-161px flex flex-col bg-[#ffffff] box-border bg-[url('@/assets/images/crypto-setting-bg.png')] bg-cover text-[#4e5969] dark:text-[#C9CDD4]" }, M = { class: "flex items-center" }, N = { class: "p-5px bg-[#f2f3f5] rounded-5px flex items-center" }, P = { class: "flex items-center ml-15px text-[#a3a4a8]" }, F = { class: "h-[calc(100%-165px)]" }, I = ["onClick"], L = { class: "ml-4px" }, R = ["onClick"], z = { class: "ml-4px" }, B = /* @__PURE__ */ ((e, t) => {
22
22
  let n = e.__vccOpts || e;
23
23
  for (let [e, r] of t) n[e] = r;
24
24
  return n;
25
- })(/* @__PURE__ */ g({
25
+ })(/* @__PURE__ */ m({
26
26
  __name: "setting",
27
- setup(g) {
28
- let B = x(), V = x(), H = x(), U = { style: { width: "auto" } }, W = { span: 24 }, { auth: G } = o(), K = b({
27
+ setup(m) {
28
+ let B = y(), V = y(), H = y(), U = { style: { width: "auto" } }, W = { span: 24 }, { auth: G } = o(), K = v({
29
29
  isCrypto: !0,
30
30
  mode: !0,
31
31
  whiteListUrls: []
32
32
  }), [q, J] = r(!1);
33
- v(Y);
33
+ g(Y);
34
34
  async function Y() {
35
- await n().then((e) => {
35
+ await t().then((e) => {
36
36
  J(!1), e && e.data && e.success && (K.isCrypto = e.data.cryptoEnabled || !1, K.whiteListUrls = e.data.cryptoWhitePath, K.mode = e.data.cryptoMode === void 0 ? !0 : e.data.cryptoMode);
37
37
  });
38
38
  }
@@ -44,13 +44,13 @@ var k = /* @__PURE__ */ function(e) {
44
44
  J(!0);
45
45
  try {
46
46
  await V.value?.validate();
47
- let { isCrypto: n, mode: r, whiteListUrls: i } = K, a = {
48
- cryptoEnabled: n,
47
+ let { isCrypto: t, mode: r, whiteListUrls: i } = K, { success: a } = await e({ json: JSON.stringify({
48
+ cryptoEnabled: t,
49
49
  cryptoMode: r,
50
50
  cryptoWhitePath: i
51
- }, { success: o } = await t({ json: JSON.stringify(a) });
52
- o && (O.success("配置更改成功"), e.callAsync({
53
- ...e.use(),
51
+ }) });
52
+ a && (O.success("配置更改成功"), n.callAsync({
53
+ ...n.use(),
54
54
  isCrypto: K.isCrypto,
55
55
  cryptoMode: K.mode,
56
56
  whiteListUrls: K.whiteListUrls
@@ -117,8 +117,8 @@ var k = /* @__PURE__ */ function(e) {
117
117
  K.whiteListUrls = e, Z();
118
118
  }
119
119
  return (e, t) => {
120
- let n = u, r = l, o = ee, g = c, v = E, b = s, x = a, D = te, O = re("auth");
121
- return y(), f("div", oe, [p("div", A, [p("div", j, [h(g, {
120
+ let n = c, r = ne, o = te, m = s, g = T, v = ee, y = a, D = re, O = b("auth");
121
+ return _(), u("div", A, [d("div", oe, [d("div", j, [p(m, {
122
122
  ref_key: "formRef",
123
123
  ref: V,
124
124
  model: K,
@@ -126,45 +126,45 @@ var k = /* @__PURE__ */ function(e) {
126
126
  "wrapper-col": W,
127
127
  class: "safe-rule-form"
128
128
  }, {
129
- default: w(() => [h(r, {
129
+ default: C(() => [p(r, {
130
130
  label: "开启加密",
131
131
  name: "isCrypto"
132
132
  }, {
133
- default: w(() => [h(n, {
133
+ default: C(() => [p(n, {
134
134
  checked: K.isCrypto,
135
135
  "onUpdate:checked": t[0] ||= (e) => K.isCrypto = e,
136
- disabled: C(q),
136
+ disabled: S(q),
137
137
  onChange: Z
138
138
  }, null, 8, ["checked", "disabled"])]),
139
139
  _: 1
140
- }), h(r, {
140
+ }), p(r, {
141
141
  label: "模式",
142
142
  name: "isCrypto"
143
143
  }, {
144
- default: w(() => [p("div", M, [p("div", N, [h(o, {
144
+ default: C(() => [d("div", M, [d("div", N, [p(o, {
145
145
  checked: K.mode,
146
- disabled: C(q),
147
- class: _(C(q) ? "cursor-not-allowed!" : ""),
148
- onChange: t[1] ||= (e) => !C(q) && X(!0, e)
146
+ disabled: S(q),
147
+ class: h(S(q) ? "cursor-not-allowed!" : ""),
148
+ onChange: t[1] ||= (e) => !S(q) && X(!0, e)
149
149
  }, {
150
- default: w(() => [...t[4] ||= [m(" 白名单 ", -1)]]),
150
+ default: C(() => [...t[4] ||= [f(" 白名单 ", -1)]]),
151
151
  _: 1
152
152
  }, 8, [
153
153
  "checked",
154
154
  "disabled",
155
155
  "class"
156
- ]), h(o, {
156
+ ]), p(o, {
157
157
  checked: !K.mode,
158
- class: _(["mr-0px!", C(q) ? "cursor-not-allowed!" : ""]),
159
- onChange: t[2] ||= (e) => !C(q) && X(!1, e)
158
+ class: h(["mr-0px!", S(q) ? "cursor-not-allowed!" : ""]),
159
+ onChange: t[2] ||= (e) => !S(q) && X(!1, e)
160
160
  }, {
161
- default: w(() => [...t[5] ||= [m(" 黑名单 ", -1)]]),
161
+ default: C(() => [...t[5] ||= [f(" 黑名单 ", -1)]]),
162
162
  _: 1
163
- }, 8, ["checked", "class"])]), p("div", P, [h(C(ie), { class: "mr-5px" }), t[6] ||= m("白名单模式下,仅不加密过滤列表中的接口;黑名单模式下,仅加密过滤列表中的接口。 ", -1)])])]),
163
+ }, 8, ["checked", "class"])]), d("div", P, [p(S(E), { class: "mr-5px" }), t[6] ||= f("白名单模式下,仅不加密过滤列表中的接口;黑名单模式下,仅加密过滤列表中的接口。 ", -1)])])]),
164
164
  _: 1
165
165
  })]),
166
166
  _: 1
167
- }, 8, ["model"])]), p("div", F, [h(C(ae), {
167
+ }, 8, ["model"])]), d("div", F, [p(S(ae), {
168
168
  ref_key: "tableRef",
169
169
  ref: B,
170
170
  "row-key": "id",
@@ -175,37 +175,37 @@ var k = /* @__PURE__ */ function(e) {
175
175
  pagination: !1,
176
176
  scroll: { x: 1e3 }
177
177
  }, {
178
- toolbar: w(() => [T((y(), d(b, {
178
+ toolbar: C(() => [w((_(), l(v, {
179
179
  type: "primary",
180
- disabled: C(q),
181
- onClick: t[3] ||= (e) => Q(C(k).ADD)
180
+ disabled: S(q),
181
+ onClick: t[3] ||= (e) => Q(S(k).ADD)
182
182
  }, {
183
- default: w(() => [h(v), m(" " + S(C(k).ADD), 1)]),
183
+ default: C(() => [p(g), f(" " + x(S(k).ADD), 1)]),
184
184
  _: 1
185
185
  }, 8, ["disabled"])), [[O, "crypto_url_add"]])]),
186
- bodyCell: w(({ column: e, index: t }) => [e.dataIndex === "action" ? (y(), d(D, { key: 0 }, {
187
- default: w(() => [T((y(), f("a", {
186
+ bodyCell: C(({ column: e, index: t }) => [e.dataIndex === "action" ? (_(), l(D, { key: 0 }, {
187
+ default: C(() => [w((_(), u("a", {
188
188
  class: "flex items-center hover:opacity-80",
189
- onClick: (e) => Q(C(k).EDIT, t)
190
- }, [h(x, {
189
+ onClick: (e) => Q(S(k).EDIT, t)
190
+ }, [p(y, {
191
191
  name: "edit",
192
192
  class: "text-base"
193
- }), p("span", L, S(C(k).EDIT), 1)], 8, I)), [[O, "crypto_url_edit"]]), T((y(), f("span", {
193
+ }), d("span", L, x(S(k).EDIT), 1)], 8, I)), [[O, "crypto_url_edit"]]), w((_(), u("span", {
194
194
  flex: "",
195
195
  "items-center": "",
196
196
  "text-red-500": "",
197
197
  "hover:cursor-pointer": "",
198
198
  "hover:text-red-500": "",
199
199
  "hover:opacity-80": "",
200
- onClick: (e) => Q(C(k).REMOVE, t)
201
- }, [h(x, {
200
+ onClick: (e) => Q(S(k).REMOVE, t)
201
+ }, [p(y, {
202
202
  name: "remove",
203
203
  class: "text-base"
204
- }), p("span", z, S(C(k).REMOVE), 1)], 8, R)), [[O, "crypto_url_delete"]])]),
204
+ }), d("span", z, x(S(k).REMOVE), 1)], 8, R)), [[O, "crypto_url_delete"]])]),
205
205
  _: 2
206
- }, 1024)) : ne("", !0)]),
206
+ }, 1024)) : ie("", !0)]),
207
207
  _: 1
208
- }, 8, ["data-source"])])]), h(i, {
208
+ }, 8, ["data-source"])])]), p(i, {
209
209
  ref_key: "drawerRef",
210
210
  ref: H,
211
211
  onSubmit: $
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pubinfo-pr/module-crypto",
3
3
  "type": "module",
4
- "version": "0.230.1",
4
+ "version": "0.231.1",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  "@ant-design/icons-vue": "^7.0.1",
24
24
  "@pubinfo/pro-components": "^1.8.2",
25
25
  "ant-design-vue": "^4.2.6",
26
- "pubinfo-pr": "0.230.1"
26
+ "pubinfo-pr": "0.231.1"
27
27
  },
28
28
  "dependencies": {
29
29
  "@vueuse/core": "^14.2.1",
@@ -36,7 +36,7 @@
36
36
  "@pubinfo/pro-components": "^1.8.2",
37
37
  "@types/crypto-js": "^4.2.2",
38
38
  "ant-design-vue": "^4.2.6",
39
- "pubinfo-pr": "0.230.1"
39
+ "pubinfo-pr": "0.231.1"
40
40
  },
41
41
  "scripts": {
42
42
  "dev": "pubinfo build -w --sourcemap",