@xuda.io/account_module 1.2.453 → 1.2.455

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/index.mjs +10 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1166,6 +1166,12 @@ export const merge_contact = async function (req) {
1166
1166
  return primary_contact_save_ret; //{ code: 1, data: duplicate_arr };
1167
1167
  };
1168
1168
 
1169
+ const get_contact_background = function (doc) {
1170
+ const ret = `linear-gradient(145deg,#60496e8c 0%,#71C4FF44 100%)`;
1171
+
1172
+ return ret;
1173
+ };
1174
+
1169
1175
  export const get_contacts = async function (req) {
1170
1176
  const { uid, name, limit, skip, bookmark, search, with_requests } = req;
1171
1177
  var opt = {
@@ -1224,8 +1230,10 @@ export const get_contacts = async function (req) {
1224
1230
  if (account_ret.code < 0) {
1225
1231
  continue; // throw new Error(`account ${contact_uid} not found`);
1226
1232
  }
1233
+
1227
1234
  doc.profile_avatar = account_ret.data.profile_avatar;
1228
- doc.card_background = `linear-gradient(145deg,#60496e8c 0%,#71C4FF44 100%)`;
1235
+
1236
+ doc.card_background = get_contact_background(doc);
1229
1237
  doc.icon_pattern = `xu-pattern.png`;
1230
1238
  // doc.telephone = `561-235-1675`;
1231
1239
  if (doc.contact_uid === '0489f946c213947316647b468f029ed9') {
@@ -1274,6 +1282,7 @@ export const get_contacts = async function (req) {
1274
1282
  doc.profile_avatar = account_ret.data.profile_avatar;
1275
1283
  doc.name = `${account_ret.data.first_name} ${account_ret.data.last_name}`;
1276
1284
  }
1285
+ doc.card_background = get_contact_background({ pending: true });
1277
1286
  requests_from.docs.push(doc);
1278
1287
  }
1279
1288
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.453",
3
+ "version": "1.2.455",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {