@xuda.io/account_module 1.2.461 → 1.2.463
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/index.mjs +13 -19
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1202,23 +1202,16 @@ const get_contact_pattern = function (doc) {
|
|
|
1202
1202
|
if (doc.contact_uid) {
|
|
1203
1203
|
ret = `xu-pattern.png`;
|
|
1204
1204
|
} else {
|
|
1205
|
-
switch (doc.
|
|
1206
|
-
case
|
|
1207
|
-
ret = `
|
|
1205
|
+
switch (doc.source) {
|
|
1206
|
+
case 'email': {
|
|
1207
|
+
ret = `email-pattern.png`;
|
|
1208
1208
|
break;
|
|
1209
1209
|
}
|
|
1210
|
-
case
|
|
1211
|
-
ret = `
|
|
1212
|
-
break;
|
|
1213
|
-
}
|
|
1214
|
-
case 1: {
|
|
1215
|
-
ret = `linear-gradient(145deg, #04f61452 0%, #7f98e344 100%)`;
|
|
1216
|
-
break;
|
|
1217
|
-
}
|
|
1218
|
-
case 2: {
|
|
1219
|
-
ret = `linear-gradient(145deg, #30f604c9 0%, #7f98e344 100%)`;
|
|
1210
|
+
case 'web': {
|
|
1211
|
+
ret = `web-pattern.png`;
|
|
1220
1212
|
break;
|
|
1221
1213
|
}
|
|
1214
|
+
|
|
1222
1215
|
default:
|
|
1223
1216
|
break;
|
|
1224
1217
|
}
|
|
@@ -1292,13 +1285,12 @@ export const get_contacts = async function (req) {
|
|
|
1292
1285
|
doc.profile_avatar = account_ret.data.profile_avatar;
|
|
1293
1286
|
|
|
1294
1287
|
doc.card_background = get_contact_background(doc);
|
|
1295
|
-
|
|
1288
|
+
|
|
1296
1289
|
// doc.telephone = `561-235-1675`;
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
}
|
|
1290
|
+
|
|
1291
|
+
// doc.notifications = 45;
|
|
1292
|
+
// doc.online = true;
|
|
1293
|
+
doc.icon_pattern = get_contact_pattern(doc);
|
|
1302
1294
|
}
|
|
1303
1295
|
}
|
|
1304
1296
|
|
|
@@ -1321,6 +1313,7 @@ export const get_contacts = async function (req) {
|
|
|
1321
1313
|
continue; // throw new Error(`account ${contact_uid} not found`);
|
|
1322
1314
|
}
|
|
1323
1315
|
doc.profile_avatar = account_ret.data.profile_avatar;
|
|
1316
|
+
doc.icon_pattern = get_contact_pattern(doc);
|
|
1324
1317
|
doc.name = `${account_ret.data.first_name} ${account_ret.data.last_name}`;
|
|
1325
1318
|
}
|
|
1326
1319
|
doc.card_background = get_contact_background({ pending: true });
|
|
@@ -1342,6 +1335,7 @@ export const get_contacts = async function (req) {
|
|
|
1342
1335
|
doc.name = `${account_ret.data.first_name} ${account_ret.data.last_name}`;
|
|
1343
1336
|
}
|
|
1344
1337
|
doc.card_background = get_contact_background({ pending: true });
|
|
1338
|
+
doc.icon_pattern = get_contact_pattern(doc);
|
|
1345
1339
|
requests_from.docs.push(doc);
|
|
1346
1340
|
}
|
|
1347
1341
|
}
|