mirror of
https://github.com/friendica/friendica
synced 2024-11-09 17:02:54 +00:00
Improved server detection / new servers added to federation statistics (#13793)
* Improved server detection / new servers added to federation statistics * Fix wrong color code
This commit is contained in:
parent
bf80001c80
commit
9592292dba
4 changed files with 68 additions and 2 deletions
|
@ -1247,6 +1247,11 @@ class GServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Special treatment for NextCloud, since there you can freely define your software name
|
||||||
|
if (!empty($nodeinfo['rootUrl']) && in_array(parse_url($nodeinfo['rootUrl'], PHP_URL_PATH), ['/index.php/apps/social', '/apps/social'])) {
|
||||||
|
$server['platform'] = 'nextcloud';
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($nodeinfo['metadata']['nodeName'])) {
|
if (!empty($nodeinfo['metadata']['nodeName'])) {
|
||||||
$server['site_name'] = $nodeinfo['metadata']['nodeName'];
|
$server['site_name'] = $nodeinfo['metadata']['nodeName'];
|
||||||
}
|
}
|
||||||
|
@ -1565,7 +1570,7 @@ class GServer
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($tags as $tag) {
|
foreach ($tags as $tag) {
|
||||||
if ((($tag['as:name'] ?? '') == 'Protocol') && (($tag['sc:value'] ?? '') == 'nomad')) {
|
if ((($tag['as:name'] ?? '') == 'Protocol') && in_array('nomad', [$tag['sc:value'] ?? '', $tag['as:content'] ?? ''])) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,14 +45,16 @@ class Federation extends BaseAdmin
|
||||||
'castopod' => ['name' => 'Castopod', 'color' => '#00564a'], // Background color from the page
|
'castopod' => ['name' => 'Castopod', 'color' => '#00564a'], // Background color from the page
|
||||||
'diaspora' => ['name' => 'Diaspora', 'color' => '#a1a1a1'], // logo is black and white, makes a gray
|
'diaspora' => ['name' => 'Diaspora', 'color' => '#a1a1a1'], // logo is black and white, makes a gray
|
||||||
'calckey' => ['name' => 'firefish (Calckey)', 'color' => '#1c4a5c'], // Color from the page
|
'calckey' => ['name' => 'firefish (Calckey)', 'color' => '#1c4a5c'], // Color from the page
|
||||||
|
'sharkey' => ['name' => 'Sharkey', 'color' => 'lightpink'], // Font color from the homepage
|
||||||
'foundkey' => ['name' => 'Foundkey', 'color' => '#609926'], // Some random color from the repository
|
'foundkey' => ['name' => 'Foundkey', 'color' => '#609926'], // Some random color from the repository
|
||||||
'funkwhale' => ['name' => 'Funkwhale', 'color' => '#4082B4'], // From the homepage
|
'funkwhale' => ['name' => 'Funkwhale', 'color' => '#4082B4'], // From the homepage
|
||||||
'gancio' => ['name' => 'Gancio', 'color' => '#7253ed'], // Fontcolor from the page
|
'gancio' => ['name' => 'Gancio', 'color' => '#7253ed'], // Fontcolor from the page
|
||||||
'gnusocial' => ['name' => 'GNU Social/Statusnet', 'color' => '#a22430'], // dark red from the logo
|
'gnusocial' => ['name' => 'GNU Social/Statusnet', 'color' => '#a22430'], // dark red from the logo
|
||||||
'gotosocial' => ['name' => 'GoToSocial', 'color' => '#df8958'], // Some color from their mascot
|
'gotosocial' => ['name' => 'GoToSocial', 'color' => '#df8958'], // Some color from their mascot
|
||||||
'hometown' => ['name' => 'Hometown', 'color' => '#1f70c1'], // Color from the Patreon page
|
'hometown' => ['name' => 'Hometown', 'color' => '#1f70c1'], // Color from the Patreon page
|
||||||
'honk' => ['name' => 'Honk', 'color' => '##0d0d0d'], // Background color from the page
|
'honk' => ['name' => 'Honk', 'color' => '#0d0d0d'], // Background color from the page
|
||||||
'hubzilla' => ['name' => 'Hubzilla/Red Matrix', 'color' => '#43488a'], // blue from the logo
|
'hubzilla' => ['name' => 'Hubzilla/Red Matrix', 'color' => '#43488a'], // blue from the logo
|
||||||
|
'iceshrimp' => ['name' => 'iceshrimp', 'color' => 'mediumslateblue'], // Color that is used in their software
|
||||||
'kbin' => ['name' => 'kbin', 'color' => '#61366b'], // Color from their main instance
|
'kbin' => ['name' => 'kbin', 'color' => '#61366b'], // Color from their main instance
|
||||||
'lemmy' => ['name' => 'Lemmy', 'color' => '#00c853'], // Green from the page
|
'lemmy' => ['name' => 'Lemmy', 'color' => '#00c853'], // Green from the page
|
||||||
'mastodon' => ['name' => 'Mastodon', 'color' => '#1a9df9'], // blue from the Mastodon logo
|
'mastodon' => ['name' => 'Mastodon', 'color' => '#1a9df9'], // blue from the Mastodon logo
|
||||||
|
@ -66,8 +68,10 @@ class Federation extends BaseAdmin
|
||||||
'pixelfed' => ['name' => 'Pixelfed', 'color' => '#11da47'], // One of the logo colors
|
'pixelfed' => ['name' => 'Pixelfed', 'color' => '#11da47'], // One of the logo colors
|
||||||
'pleroma' => ['name' => 'Pleroma', 'color' => '#E46F0F'], // Orange from the text that is used on Pleroma instances
|
'pleroma' => ['name' => 'Pleroma', 'color' => '#E46F0F'], // Orange from the text that is used on Pleroma instances
|
||||||
'plume' => ['name' => 'Plume', 'color' => '#7765e3'], // From the homepage
|
'plume' => ['name' => 'Plume', 'color' => '#7765e3'], // From the homepage
|
||||||
|
'postmarks' => ['name' => 'Postmarks', 'color' => 'darkblue'], // Header color from the homepage
|
||||||
'relay' => ['name' => 'ActivityPub Relay', 'color' => '#888888'], // Grey like the second color of the ActivityPub logo
|
'relay' => ['name' => 'ActivityPub Relay', 'color' => '#888888'], // Grey like the second color of the ActivityPub logo
|
||||||
'socialhome' => ['name' => 'SocialHome', 'color' => '#52056b'], // lilac from the Django Image used at the Socialhome homepage
|
'socialhome' => ['name' => 'SocialHome', 'color' => '#52056b'], // lilac from the Django Image used at the Socialhome homepage
|
||||||
|
'snac' => ['name' => 'Snac', 'color' => '#2966a8'], // Color from one of their themes
|
||||||
'takahe' => ['name' => 'Takahē', 'color' => '#26323c'], // Background color of the homepage
|
'takahe' => ['name' => 'Takahē', 'color' => '#26323c'], // Background color of the homepage
|
||||||
'wildebeest' => ['name' => 'Wildebeest', 'color' => '#0055dc'], // Color of the mascot
|
'wildebeest' => ['name' => 'Wildebeest', 'color' => '#0055dc'], // Color of the mascot
|
||||||
'wordpress' => ['name' => 'WordPress', 'color' => '#016087'], // Background color of the homepage
|
'wordpress' => ['name' => 'WordPress', 'color' => '#016087'], // Background color of the homepage
|
||||||
|
|
|
@ -58,6 +58,9 @@ class JsonLD
|
||||||
case 'https://www.w3.org/ns/activitystreams':
|
case 'https://www.w3.org/ns/activitystreams':
|
||||||
$url = DI::basePath() . '/static/activitystreams.jsonld';
|
$url = DI::basePath() . '/static/activitystreams.jsonld';
|
||||||
break;
|
break;
|
||||||
|
case 'https://www.w3.org/ns/did/v1':
|
||||||
|
$url = DI::basePath() . '/static/did-v1.jsonld';
|
||||||
|
break;
|
||||||
case 'https://funkwhale.audio/ns':
|
case 'https://funkwhale.audio/ns':
|
||||||
$url = DI::basePath() . '/static/funkwhale.audio.jsonld';
|
$url = DI::basePath() . '/static/funkwhale.audio.jsonld';
|
||||||
break;
|
break;
|
||||||
|
|
54
static/did-v1.jsonld
Normal file
54
static/did-v1.jsonld
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
{
|
||||||
|
"@context": {
|
||||||
|
"alsoKnownAs": {
|
||||||
|
"@id": "https://www.w3.org/ns/activitystreams#alsoKnownAs",
|
||||||
|
"@type": "@id"
|
||||||
|
},
|
||||||
|
"assertionMethod": {
|
||||||
|
"@id": "https://w3id.org/security#assertionMethod",
|
||||||
|
"@type": "@id",
|
||||||
|
"@container": "@set"
|
||||||
|
},
|
||||||
|
"authentication": {
|
||||||
|
"@id": "https://w3id.org/security#authenticationMethod",
|
||||||
|
"@type": "@id",
|
||||||
|
"@container": "@set"
|
||||||
|
},
|
||||||
|
"capabilityDelegation": {
|
||||||
|
"@id": "https://w3id.org/security#capabilityDelegationMethod",
|
||||||
|
"@type": "@id",
|
||||||
|
"@container": "@set"
|
||||||
|
},
|
||||||
|
"capabilityInvocation": {
|
||||||
|
"@id": "https://w3id.org/security#capabilityInvocationMethod",
|
||||||
|
"@type": "@id",
|
||||||
|
"@container": "@set"
|
||||||
|
},
|
||||||
|
"controller": {
|
||||||
|
"@id": "https://w3id.org/security#controller",
|
||||||
|
"@type": "@id"
|
||||||
|
},
|
||||||
|
"keyAgreement": {
|
||||||
|
"@id": "https://w3id.org/security#keyAgreementMethod",
|
||||||
|
"@type": "@id",
|
||||||
|
"@container": "@set"
|
||||||
|
},
|
||||||
|
"service": {
|
||||||
|
"@id": "https://www.w3.org/ns/did#service",
|
||||||
|
"@type": "@id",
|
||||||
|
"@context": {
|
||||||
|
"@protected": true,
|
||||||
|
"id": "@id",
|
||||||
|
"type": "@type",
|
||||||
|
"serviceEndpoint": {
|
||||||
|
"@id": "https://www.w3.org/ns/did#serviceEndpoint",
|
||||||
|
"@type": "@id"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"verificationMethod": {
|
||||||
|
"@id": "https://w3id.org/security#verificationMethod",
|
||||||
|
"@type": "@id"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue