@xuda.io/account_module 1.2.482 → 1.2.483
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 +38 -0
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1219,6 +1219,44 @@ const get_contact_pattern = function (doc) {
|
|
|
1219
1219
|
return ret;
|
|
1220
1220
|
};
|
|
1221
1221
|
|
|
1222
|
+
const get_contact_border = function (doc) {
|
|
1223
|
+
let ret = `transparent`;
|
|
1224
|
+
|
|
1225
|
+
if (pending) {
|
|
1226
|
+
ret = `#6f6c67`;
|
|
1227
|
+
} else {
|
|
1228
|
+
switch (doc.connection_stat) {
|
|
1229
|
+
case 0: {
|
|
1230
|
+
ret = `transparent`;
|
|
1231
|
+
break;
|
|
1232
|
+
}
|
|
1233
|
+
case 1: {
|
|
1234
|
+
ret = `red`;
|
|
1235
|
+
break;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
case 2: {
|
|
1239
|
+
ret = `red`;
|
|
1240
|
+
break;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
case 3: {
|
|
1244
|
+
ret = `#0070ff`;
|
|
1245
|
+
break;
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
case 4: {
|
|
1249
|
+
ret = `red`;
|
|
1250
|
+
break;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
default:
|
|
1254
|
+
break;
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
return ret;
|
|
1258
|
+
};
|
|
1259
|
+
|
|
1222
1260
|
export const get_contacts = async function (req) {
|
|
1223
1261
|
const { _id, uid, name, limit, skip, bookmark, search, with_requests } = req;
|
|
1224
1262
|
var opt = {
|