@arcblock/ux 2.5.14 → 2.5.16

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.
@@ -78,11 +78,12 @@ const messages = {
78
78
  };
79
79
  const translations = {
80
80
  en: {
81
- alreadyBindOAuth: 'Already bind OAuth',
81
+ alreadyBindOAuth: 'Already bind Auth0',
82
82
  bind: 'Bind '
83
83
  },
84
84
  zh: {
85
- alreadyBindOAuth: '已绑定 OAuth 账号',
85
+ // NOTE: 目前只有 Auth0,展示出具体的第三方名字会更好
86
+ alreadyBindOAuth: '已绑定 Auth0 账号',
86
87
  bind: '绑定'
87
88
  }
88
89
  };
@@ -191,9 +192,12 @@ function SessionManager(_ref) {
191
192
  args[_key] = arguments[_key];
192
193
  }
193
194
 
194
- logoutOAuth().then(() => {
195
- setUserOpen(false);
195
+ logoutOAuth(session, ...args).then(() => {
196
196
  onLogout(...args);
197
+ }).catch(err => {
198
+ console.error(err);
199
+ }).finally(() => {
200
+ setUserOpen(false);
197
201
  });
198
202
  });
199
203
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcblock/ux",
3
- "version": "2.5.14",
3
+ "version": "2.5.16",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -47,11 +47,11 @@
47
47
  "react": ">=18.1.0",
48
48
  "react-ga": "^2.7.0"
49
49
  },
50
- "gitHead": "4d5e261715baf2fc47274e65130cc2e845c4dc0e",
50
+ "gitHead": "2d161f64c481ff5ca5f323726ec75e2f696fde1b",
51
51
  "dependencies": {
52
52
  "@arcblock/did-motif": "^1.1.10",
53
- "@arcblock/icons": "^2.5.14",
54
- "@arcblock/react-hooks": "^2.5.14",
53
+ "@arcblock/icons": "^2.5.16",
54
+ "@arcblock/react-hooks": "^2.5.16",
55
55
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
56
56
  "@emotion/react": "^11.10.4",
57
57
  "@emotion/styled": "^11.10.4",
@@ -38,11 +38,12 @@ const messages = {
38
38
  };
39
39
  const translations = {
40
40
  en: {
41
- alreadyBindOAuth: 'Already bind OAuth',
41
+ alreadyBindOAuth: 'Already bind Auth0',
42
42
  bind: 'Bind ',
43
43
  },
44
44
  zh: {
45
- alreadyBindOAuth: '已绑定 OAuth 账号',
45
+ // NOTE: 目前只有 Auth0,展示出具体的第三方名字会更好
46
+ alreadyBindOAuth: '已绑定 Auth0 账号',
46
47
  bind: '绑定',
47
48
  },
48
49
  };
@@ -124,10 +125,16 @@ function SessionManager({
124
125
  }
125
126
  function _onLogout() {
126
127
  session.logout((...args) => {
127
- logoutOAuth().then(() => {
128
- setUserOpen(false);
129
- onLogout(...args);
130
- });
128
+ logoutOAuth(session, ...args)
129
+ .then(() => {
130
+ onLogout(...args);
131
+ })
132
+ .catch((err) => {
133
+ console.error(err);
134
+ })
135
+ .finally(() => {
136
+ setUserOpen(false);
137
+ });
131
138
  });
132
139
  }
133
140
  function _onSwitchDid() {