mirror of
https://github.com/friendica/friendica
synced 2025-04-25 10:30:12 +00:00
SVG icons for various fediverse systems
This commit is contained in:
parent
435c37bff4
commit
e73566c0a1
115 changed files with 2640 additions and 236 deletions
|
@ -8,6 +8,7 @@
|
|||
namespace Friendica\Module\Admin;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Content\ContactSelector;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Database\DBA;
|
||||
|
@ -36,6 +37,7 @@ class Federation extends BaseAdmin
|
|||
'foundkey' => ['name' => 'Foundkey', 'color' => '#609926'], // Some random color from the repository
|
||||
'funkwhale' => ['name' => 'Funkwhale', 'color' => '#4082B4'], // From the homepage
|
||||
'gancio' => ['name' => 'Gancio', 'color' => '#7253ed'], // Fontcolor from the page
|
||||
'glitchsoc' => ['name' => 'Mastodon Glitch Edition', 'color' => '#82dcb9'], // Color from their site
|
||||
'gnusocial' => ['name' => 'GNU Social/Statusnet', 'color' => '#a22430'], // dark red from the logo
|
||||
'gotosocial' => ['name' => 'GoToSocial', 'color' => '#df8958'], // Some color from their mascot
|
||||
'hometown' => ['name' => 'Hometown', 'color' => '#1f70c1'], // Color from the Patreon page
|
||||
|
@ -128,6 +130,10 @@ class Federation extends BaseAdmin
|
|||
$platform = 'nomad';
|
||||
} elseif(stristr($platform, 'pleroma')) {
|
||||
$platform = 'pleroma';
|
||||
} elseif(stristr($platform, 'glitchsoc')) {
|
||||
$platform = 'glitchsoc';
|
||||
} elseif(stristr($platform, 'iceshrimp.net')) {
|
||||
$platform = 'iceshrimp';
|
||||
} elseif(stristr($platform, 'statusnet')) {
|
||||
$platform = 'gnusocial';
|
||||
} elseif(stristr($platform, 'nextcloud')) {
|
||||
|
@ -176,6 +182,7 @@ class Federation extends BaseAdmin
|
|||
}
|
||||
|
||||
$gserver['platform'] = $systems[$platform]['name'];
|
||||
$gserver['svg'] = ContactSelector::networkToSVG($gserver['network'], '', null, $platform, DI::userSession()->getLocalUserId());
|
||||
$gserver['totallbl'] = DI::l10n()->tt('%2$s total system' , '%2$s total systems' , $gserver['total'], number_format($gserver['total']));
|
||||
$gserver['monthlbl'] = DI::l10n()->tt('%2$s active user last month' , '%2$s active users last month' , $gserver['month'] ?? 0, number_format($gserver['month'] ?? 0));
|
||||
$gserver['halfyearlbl'] = DI::l10n()->tt('%2$s active user last six months' , '%2$s active users last six months' , $gserver['halfyear'] ?? 0, number_format($gserver['halfyear'] ?? 0));
|
||||
|
|
|
@ -97,6 +97,7 @@ class Add extends BaseModeration
|
|||
array_walk($gservers, function (array &$gserver) {
|
||||
$gserver['domain'] = (new Uri($gserver['url']))->getHost();
|
||||
$gserver['network_icon'] = ContactSelector::networkToIcon($gserver['network']);
|
||||
$gserver['network_svg'] = ContactSelector::networkToSVG($gserver['network']);
|
||||
$gserver['network_name'] = ContactSelector::networkToName($gserver['network']);
|
||||
});
|
||||
|
||||
|
|
|
@ -95,6 +95,7 @@ class Display extends BaseSettings
|
|||
$stay_local = (bool)$request['stay_local'];
|
||||
$hide_empty_descriptions = (bool)$request['hide_empty_descriptions'];
|
||||
$hide_custom_emojis = (bool)$request['hide_custom_emojis'];
|
||||
$black_platform_icons = (bool)$request['black_platform_icons'];
|
||||
$show_page_drop = (bool)$request['show_page_drop'];
|
||||
$display_eventlist = (bool)$request['display_eventlist'];
|
||||
$preview_mode = (int)$request['preview_mode'];
|
||||
|
@ -156,6 +157,7 @@ class Display extends BaseSettings
|
|||
|
||||
$this->pConfig->set($uid, 'accessibility', 'hide_empty_descriptions', $hide_empty_descriptions);
|
||||
$this->pConfig->set($uid, 'accessibility', 'hide_custom_emojis' , $hide_custom_emojis);
|
||||
$this->pConfig->set($uid, 'accessibility', 'black_platform_icons' , $black_platform_icons);
|
||||
|
||||
$this->pConfig->set($uid, 'calendar', 'first_day_of_week' , $first_day_of_week);
|
||||
$this->pConfig->set($uid, 'calendar', 'default_view' , $calendar_default_view);
|
||||
|
@ -248,6 +250,7 @@ class Display extends BaseSettings
|
|||
|
||||
$hide_empty_descriptions = $this->pConfig->get($uid, 'accessibility', 'hide_empty_descriptions', false);
|
||||
$hide_custom_emojis = $this->pConfig->get($uid, 'accessibility', 'hide_custom_emojis', false);
|
||||
$black_platform_icons = $this->pConfig->get($uid, 'accessibility', 'black_platform_icons', false);
|
||||
|
||||
$preview_mode = $this->pConfig->get($uid, 'system', 'preview_mode', BBCode::PREVIEW_LARGE);
|
||||
$preview_modes = [
|
||||
|
@ -330,6 +333,7 @@ class Display extends BaseSettings
|
|||
'$preview_mode' => ['preview_mode' , $this->t('Link preview mode'), $preview_mode, $this->t('Appearance of the link preview that is added to each post with a link.'), $preview_modes, false],
|
||||
'$hide_empty_descriptions' => ['hide_empty_descriptions' , $this->t('Hide pictures with empty alternative text'), $hide_empty_descriptions, $this->t("Don't display pictures that are missing the alternative text.")],
|
||||
'$hide_custom_emojis' => ['hide_custom_emojis' , $this->t('Hide custom emojis'), $hide_custom_emojis, $this->t("Don't display custom emojis.")],
|
||||
'$black_platform_icons' => ['black_platform_icons' , $this->t('Black platform Icons'), $black_platform_icons, $this->t("Use black platform icons instead of colored ones.")],
|
||||
|
||||
'$timeline_label' => $this->t('Label'),
|
||||
'$timeline_descriptiom' => $this->t('Description'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue