viewpeerlist anonymous after ip

This commit is contained in:
xiaomlove
2022-08-11 03:50:05 +08:00
parent f5053a3f8e
commit d5ece41da6
+4 -4
View File
@@ -31,7 +31,7 @@ function get_location_column($e, $isStrongPrivacy, $canView): string
} }
$title = sprintf('%s%s%s', $lang_functions['text_user_ip'], ': ', implode(', ', $ips)); $title = sprintf('%s%s%s', $lang_functions['text_user_ip'], ': ', implode(', ', $ips));
$addressStr = implode('<br/>', $address); $addressStr = implode('<br/>', $address);
$location = "<div title='" . $title . "'>" . $addressStr . "</div>"; $location = '<div style="margin-right: 6px" title="'.$title.'">'.$addressStr.'</div>';
} else { } else {
if (!empty($e['ipv4'])) { if (!empty($e['ipv4'])) {
$ips[] = $e['ipv4'] . $seedBoxRep->renderIcon($e['ipv4'], $e['userid']); $ips[] = $e['ipv4'] . $seedBoxRep->renderIcon($e['ipv4'], $e['userid']);
@@ -39,13 +39,13 @@ function get_location_column($e, $isStrongPrivacy, $canView): string
if (!empty($e['ipv6'])) { if (!empty($e['ipv6'])) {
$ips[] = $e['ipv6'] . $seedBoxRep->renderIcon($e['ipv6'], $e['userid']); $ips[] = $e['ipv6'] . $seedBoxRep->renderIcon($e['ipv6'], $e['userid']);
} }
$location = '<div>'.implode('<br/>', $ips).'</div>'; $location = '<div style="margin-right: 6px">'.implode('<br/>', $ips).'</div>';
} }
if ($isStrongPrivacy) { if ($isStrongPrivacy) {
$result = '<div style="margin-right: 6px"><i>'.$lang_viewpeerlist['text_anonymous'].'</i></div>'; $result = '<div><i>'.$lang_viewpeerlist['text_anonymous'].'</i></div>';
if ($canView) { if ($canView) {
$result .= $location; $result = $location . $result;
} }
} else { } else {
$result = $location; $result = $location;