mirror of
https://github.com/friendica/friendica
synced 2024-11-10 05:42:54 +00:00
Show the network icon for the contact
This commit is contained in:
parent
30aad250df
commit
b3b5599d27
3 changed files with 15 additions and 5 deletions
|
@ -21,6 +21,7 @@
|
|||
|
||||
namespace Friendica\Content\Widget;
|
||||
|
||||
use Friendica\Content\ContactSelector;
|
||||
use Friendica\Content\Text\BBCode;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Protocol;
|
||||
|
@ -49,10 +50,12 @@ class VCard
|
|||
Logger::warning('Incomplete contact', ['contact' => $contact ?? [], 'callstack' => System::callstack(20)]);
|
||||
}
|
||||
|
||||
if (($contact['network'] != '') && ($contact['network'] != Protocol::DFRN)) {
|
||||
if ($contact['network'] != '') {
|
||||
$network_link = Strings::formatNetworkName($contact['network'], $contact['url']);
|
||||
$network_avatar = ContactSelector::networkToIcon($contact['network'], $contact['url']);
|
||||
} else {
|
||||
$network_link = '';
|
||||
$network_avatar = '';
|
||||
}
|
||||
|
||||
$follow_link = '';
|
||||
|
@ -93,6 +96,7 @@ class VCard
|
|||
'$xmpp' => DI::l10n()->t('XMPP:'),
|
||||
'$location' => DI::l10n()->t('Location:'),
|
||||
'$network_link' => $network_link,
|
||||
'$network_avatar' => $network_avatar,
|
||||
'$network' => DI::l10n()->t('Network:'),
|
||||
'$account_type' => Contact::getAccountType($contact),
|
||||
'$follow' => DI::l10n()->t('Follow'),
|
||||
|
|
|
@ -1167,7 +1167,8 @@ aside .vcard .detail {
|
|||
display: table;
|
||||
padding: 5px 0;
|
||||
}
|
||||
aside .xmpp {
|
||||
aside .xmpp,
|
||||
aside .network {
|
||||
display: table;
|
||||
}
|
||||
aside .vcard .icon {
|
||||
|
|
|
@ -76,6 +76,11 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if $network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$network_link nofilter}}</dd></dl>{{/if}}
|
||||
{{if $network_link}}
|
||||
<div class="network">
|
||||
<span class="network-label icon"><i class="fa fa-{{$network_avatar}}"></i></span>
|
||||
<span class="x-network">{{$network_link nofilter}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue