@waline/admin 0.28.4 → 0.29.0

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.
Files changed (2) hide show
  1. package/dist/admin.js +24 -9
  2. package/package.json +1 -1
package/dist/admin.js CHANGED
@@ -16927,14 +16927,14 @@ function xx() {
16927
16927
  function Ex() {
16928
16928
  const [i, l] = N.useState(!1), [u, s] = N.useState(!1), c = di(), f = pn((T) => T.user), { t: m } = yn(), g = async function(T) {
16929
16929
  T.preventDefault();
16930
- const j = T.target.screenName.value, M = T.target.url.value, L = T.target.label.value;
16930
+ const j = T.target.screenName.value, M = T.target.url.value, L = T.target.label.value, H = T.target.email.value;
16931
16931
  if (!j || !M)
16932
16932
  return alert(m("nickname and homepage are required"));
16933
16933
  s(!0);
16934
16934
  try {
16935
- await c.user.updateProfile({ display_name: j, url: M, label: L });
16936
- } catch (H) {
16937
- alert(H);
16935
+ await c.user.updateProfile({ display_name: j, url: M, label: L, email: H });
16936
+ } catch (R) {
16937
+ alert(R);
16938
16938
  } finally {
16939
16939
  s(!1);
16940
16940
  }
@@ -16976,11 +16976,12 @@ function Ex() {
16976
16976
  target: "_blank",
16977
16977
  rel: "noreferrer",
16978
16978
  onClick: p,
16979
- children: /* @__PURE__ */ b.jsx(
16979
+ children: f && f.avatar && /* @__PURE__ */ b.jsx(
16980
16980
  "img",
16981
16981
  {
16982
16982
  className: "profile-avatar",
16983
- src: f.avatar || `https://seccdn.libravatar.org/avatar/${f.mailMd5}?s=220&r=X&d=mm`
16983
+ src: f.avatar,
16984
+ alt: m("avatar")
16984
16985
  }
16985
16986
  )
16986
16987
  }
@@ -17012,11 +17013,25 @@ function Ex() {
17012
17013
  /* @__PURE__ */ b.jsx("p", { className: "description" })
17013
17014
  ] }) }),
17014
17015
  /* @__PURE__ */ b.jsx("ul", { className: "typecho-option", children: /* @__PURE__ */ b.jsxs("li", { children: [
17015
- /* @__PURE__ */ b.jsx("label", { className: "typecho-label", htmlFor: "url-0-2", children: m("homepage") }),
17016
+ /* @__PURE__ */ b.jsx("label", { className: "typecho-label", htmlFor: "email-0-2", children: m("email") }),
17016
17017
  /* @__PURE__ */ b.jsx(
17017
17018
  "input",
17018
17019
  {
17019
- id: "url-0-2",
17020
+ id: "email-0-2",
17021
+ name: "email",
17022
+ type: "text",
17023
+ className: "text",
17024
+ defaultValue: f.email
17025
+ }
17026
+ ),
17027
+ /* @__PURE__ */ b.jsx("p", { className: "description" })
17028
+ ] }) }),
17029
+ /* @__PURE__ */ b.jsx("ul", { className: "typecho-option", children: /* @__PURE__ */ b.jsxs("li", { children: [
17030
+ /* @__PURE__ */ b.jsx("label", { className: "typecho-label", htmlFor: "url-0-3", children: m("homepage") }),
17031
+ /* @__PURE__ */ b.jsx(
17032
+ "input",
17033
+ {
17034
+ id: "url-0-3",
17020
17035
  name: "url",
17021
17036
  type: "text",
17022
17037
  className: "text",
@@ -18305,7 +18320,7 @@ async function p3() {
18305
18320
  );
18306
18321
  }
18307
18322
  console.log(
18308
- "%c @waline/admin %c v0.28.4 ",
18323
+ "%c @waline/admin %c v0.29.0 ",
18309
18324
  "color: white; background: #0078E7; padding:5px 0;",
18310
18325
  "padding:4px;border:1px solid #0078E7;"
18311
18326
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@waline/admin",
3
- "version": "0.28.4",
3
+ "version": "0.29.0",
4
4
  "description": "management system for waline",
5
5
  "keywords": [
6
6
  "waline",