@xuda.io/account_module 1.2.458 → 1.2.459
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 +36 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1197,8 +1197,39 @@ const get_contact_background = function (doc) {
|
|
|
1197
1197
|
return ret;
|
|
1198
1198
|
};
|
|
1199
1199
|
|
|
1200
|
+
const get_contact_pattern = function (doc) {
|
|
1201
|
+
const ret = `linear-gradient(145deg,#60496e8c 0%,#71C4FF44 100%)`;
|
|
1202
|
+
|
|
1203
|
+
if (doc.pending) {
|
|
1204
|
+
ret = `linear-gradient(145deg, #4f4f4f8c 0%, #0e0f0f44 100%);`;
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
switch (doc.contact_mood) {
|
|
1208
|
+
case -2: {
|
|
1209
|
+
ret = `linear-gradient(145deg, #f60404d8 0%, #7f98e344 100%)`;
|
|
1210
|
+
break;
|
|
1211
|
+
}
|
|
1212
|
+
case -1: {
|
|
1213
|
+
ret = `linear-gradient(145deg, #f6040452 0%, #7f98e344 100%)`;
|
|
1214
|
+
break;
|
|
1215
|
+
}
|
|
1216
|
+
case 1: {
|
|
1217
|
+
ret = `linear-gradient(145deg, #04f61452 0%, #7f98e344 100%)`;
|
|
1218
|
+
break;
|
|
1219
|
+
}
|
|
1220
|
+
case 2: {
|
|
1221
|
+
ret = `linear-gradient(145deg, #30f604c9 0%, #7f98e344 100%)`;
|
|
1222
|
+
break;
|
|
1223
|
+
}
|
|
1224
|
+
default:
|
|
1225
|
+
break;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
return ret;
|
|
1229
|
+
};
|
|
1230
|
+
|
|
1200
1231
|
export const get_contacts = async function (req) {
|
|
1201
|
-
const { uid, name, limit, skip, bookmark, search, with_requests } = req;
|
|
1232
|
+
const { _id, uid, name, limit, skip, bookmark, search, with_requests } = req;
|
|
1202
1233
|
var opt = {
|
|
1203
1234
|
selector: {
|
|
1204
1235
|
docType: 'contact',
|
|
@@ -1220,6 +1251,10 @@ export const get_contacts = async function (req) {
|
|
|
1220
1251
|
limit: limit ? limit : 99999,
|
|
1221
1252
|
};
|
|
1222
1253
|
|
|
1254
|
+
if (_id) {
|
|
1255
|
+
opt.selector._id = _id;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1223
1258
|
if (typeof name !== 'undefined') {
|
|
1224
1259
|
opt.selector.name = { $regex: `(?i)${name}` };
|
|
1225
1260
|
}
|