@xuda.io/account_module 1.2.455 → 1.2.457
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 +14 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1169,6 +1169,19 @@ export const merge_contact = async function (req) {
|
|
|
1169
1169
|
const get_contact_background = function (doc) {
|
|
1170
1170
|
const ret = `linear-gradient(145deg,#60496e8c 0%,#71C4FF44 100%)`;
|
|
1171
1171
|
|
|
1172
|
+
if (doc.pending) {
|
|
1173
|
+
ret = `linear-gradient(145deg, #4f4f4f8c 0%, #0e0f0f44 100%);`;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
switch (doc.contact_mood) {
|
|
1177
|
+
case 2: {
|
|
1178
|
+
ret = `linear-gradient(145deg, #d703038c 0%, #7f98e344 100%)`;
|
|
1179
|
+
break;
|
|
1180
|
+
}
|
|
1181
|
+
default:
|
|
1182
|
+
break;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1172
1185
|
return ret;
|
|
1173
1186
|
};
|
|
1174
1187
|
|
|
@@ -1265,6 +1278,7 @@ export const get_contacts = async function (req) {
|
|
|
1265
1278
|
doc.profile_avatar = account_ret.data.profile_avatar;
|
|
1266
1279
|
doc.name = `${account_ret.data.first_name} ${account_ret.data.last_name}`;
|
|
1267
1280
|
}
|
|
1281
|
+
doc.card_background = get_contact_background({ pending: true });
|
|
1268
1282
|
requests_to.docs.push(doc);
|
|
1269
1283
|
}
|
|
1270
1284
|
|