mirror of
https://github.com/RetroShare/RSNewWebUI.git
synced 2026-09-14 11:05:47 +05:00
Added to show pgp fingerprint
This commit is contained in:
parent
88aaf7cf92
commit
f670319331
@ -100,6 +100,7 @@ Data.refreshGpgDetails = async function () {
|
||||
if (details[gpgId] === undefined) {
|
||||
details[gpgId] = {
|
||||
name: data.name,
|
||||
fingerprint: data.fpr || '',
|
||||
isSearched: true,
|
||||
isOnline,
|
||||
locations: [loc],
|
||||
@ -110,6 +111,9 @@ Data.refreshGpgDetails = async function () {
|
||||
};
|
||||
} else {
|
||||
details[gpgId].locations.push(loc);
|
||||
if (!details[gpgId].fingerprint && data.fpr) {
|
||||
details[gpgId].fingerprint = data.fpr;
|
||||
}
|
||||
if (avatar) {
|
||||
details[gpgId].avatar = avatar;
|
||||
}
|
||||
|
||||
@ -5,6 +5,13 @@ const Data = require('network/network_data');
|
||||
const peopleUtil = require('people/people_util');
|
||||
const { State, startDirectChat, getOnlineSslId } = require('network/network_state');
|
||||
|
||||
function formatFingerprint(fingerprint) {
|
||||
return String(fingerprint || '')
|
||||
.replace(/\s/g, '')
|
||||
.match(/.{1,4}/g)
|
||||
?.join(' ') || '';
|
||||
}
|
||||
|
||||
const ConfirmRemove = () => {
|
||||
return {
|
||||
view: (vnode) => [
|
||||
@ -38,6 +45,7 @@ const DetailsTab = () => {
|
||||
|
||||
const friendGxsId = State.gpgToGxsIdMap[gpgId.toLowerCase()];
|
||||
const status = Data.getStatusPresentation(friend.statusValue, friend.isOnline);
|
||||
const fingerprint = formatFingerprint(friend.fingerprint);
|
||||
|
||||
return m('.network-detail-view', [
|
||||
m('.detail-header', [
|
||||
@ -101,6 +109,8 @@ const DetailsTab = () => {
|
||||
] : null,
|
||||
m('.info-label', 'Node GPG Key'),
|
||||
m('.info-value', gpgId),
|
||||
m('.info-label', 'PGP Fingerprint'),
|
||||
m('.info-value', fingerprint || 'Unavailable'),
|
||||
]),
|
||||
]),
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user