SHA256
Добавить opinion-связи и обновить UI связей в профиле
This commit is contained in:
@@ -61,6 +61,9 @@ const CONNECTION_SUBTYPES = Object.freeze({
|
||||
parent: { on: 50, off: 51 },
|
||||
child: { on: 52, off: 53 },
|
||||
sibling: { on: 54, off: 55 },
|
||||
known_person: { on: 60, off: 61 },
|
||||
shine_confirmed: { on: 70, off: 71 },
|
||||
shine_seen: { on: 74, off: 75 },
|
||||
});
|
||||
|
||||
function normalizeServerUrl(url) {
|
||||
|
||||
@@ -75,6 +75,12 @@ async function buildRelationsModel(login) {
|
||||
inChildren: [],
|
||||
outSiblings: [],
|
||||
inSiblings: [],
|
||||
outKnownPersons: [],
|
||||
inKnownPersons: [],
|
||||
outShineConfirmed: [],
|
||||
inShineConfirmed: [],
|
||||
outShineSeen: [],
|
||||
inShineSeen: [],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -117,6 +123,12 @@ async function buildRelationsModel(login) {
|
||||
inChildren: readArray(graph, 'inChildren') || [],
|
||||
outSiblings: readArray(graph, 'outSiblings') || [],
|
||||
inSiblings: readArray(graph, 'inSiblings') || [],
|
||||
outKnownPersons: readArray(graph, 'outKnownPersons') || [],
|
||||
inKnownPersons: readArray(graph, 'inKnownPersons') || [],
|
||||
outShineConfirmed: readArray(graph, 'outShineConfirmed') || [],
|
||||
inShineConfirmed: readArray(graph, 'inShineConfirmed') || [],
|
||||
outShineSeen: readArray(graph, 'outShineSeen') || [],
|
||||
inShineSeen: readArray(graph, 'inShineSeen') || [],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -151,6 +163,12 @@ export async function loadCurrentRelations() {
|
||||
inChildren: [],
|
||||
outSiblings: [],
|
||||
inSiblings: [],
|
||||
outKnownPersons: [],
|
||||
inKnownPersons: [],
|
||||
outShineConfirmed: [],
|
||||
inShineConfirmed: [],
|
||||
outShineSeen: [],
|
||||
inShineSeen: [],
|
||||
};
|
||||
}
|
||||
return buildRelationsModel(login);
|
||||
@@ -170,6 +188,12 @@ export function relationFlagsForTarget(relations, targetLogin) {
|
||||
inChild: listContainsLogin(relations?.inChildren, targetLogin),
|
||||
outSibling: listContainsLogin(relations?.outSiblings, targetLogin),
|
||||
inSibling: listContainsLogin(relations?.inSiblings, targetLogin),
|
||||
outKnownPerson: listContainsLogin(relations?.outKnownPersons, targetLogin),
|
||||
inKnownPerson: listContainsLogin(relations?.inKnownPersons, targetLogin),
|
||||
outShineConfirmed: listContainsLogin(relations?.outShineConfirmed, targetLogin),
|
||||
inShineConfirmed: listContainsLogin(relations?.inShineConfirmed, targetLogin),
|
||||
outShineSeen: listContainsLogin(relations?.outShineSeen, targetLogin),
|
||||
inShineSeen: listContainsLogin(relations?.inShineSeen, targetLogin),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user