]> git.mxchange.org Git - friendica.git/commitdiff
New option to disable SVG icons / Functionality added to Vier
authorMichael <heluecht@pirati.ca>
Mon, 11 Nov 2024 15:42:42 +0000 (15:42 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 11 Nov 2024 15:43:57 +0000 (15:43 +0000)
src/Content/ContactSelector.php
src/Module/Settings/Display.php
view/templates/wall_thread.tpl
view/theme/vier/style.css

index 6f5b73bf6bb188e8755161d3caa2413947eed3a7..5a00feeaf6425688ce98dc8dfe9b47448ce33213 100644 (file)
@@ -18,6 +18,7 @@ use Friendica\Util\Strings;
  */
 class ContactSelector
 {
+       const SVG_DISABLED    = -1;
        const SVG_COLOR_BLACK = 0;
        const SVG_BLACK       = 1;
        const SVG_COLOR_WHITE = 2;
@@ -183,6 +184,10 @@ class ContactSelector
        {
                $platform_icon_style = $uid ? (DI::pConfig()->get($uid, 'accessibility', 'platform_icon_style') ?? self::SVG_COLOR_BLACK) : self::SVG_COLOR_BLACK;
 
+               if ($platform_icon_style == self::SVG_DISABLED) {
+                       return '';
+               }
+
                $nets = [
                        Protocol::ACTIVITYPUB => 'activitypub', // https://commons.wikimedia.org/wiki/File:ActivityPub-logo-symbol.svg
                        Protocol::BLUESKY     => 'bluesky', // https://commons.wikimedia.org/wiki/File:Bluesky_Logo.svg
index 3c71b604d604fa9389ed8c4e44ba1e79280889db..71e22c5fd297e3327a6cfa155b7ec7784b119e9a 100644 (file)
@@ -253,6 +253,7 @@ class Display extends BaseSettings
                $hide_custom_emojis      =  $this->pConfig->get($uid, 'accessibility', 'hide_custom_emojis', false);
                $platform_icon_style     =  $this->pConfig->get($uid, 'accessibility', 'platform_icon_style', ContactSelector::SVG_COLOR_BLACK);
                $platform_icon_styles = [
+                       ContactSelector::SVG_DISABLED    => $this->t('Disabled'),
                        ContactSelector::SVG_COLOR_BLACK => $this->t('Color/Black'),
                        ContactSelector::SVG_BLACK       => $this->t('Black'),
                        ContactSelector::SVG_COLOR_WHITE => $this->t('Color/White'),
index 90cc69d25e67ed35120bf7b34a95be630b3a0f25..4933614fbaca078d397a7e18c975fbb20784662d 100644 (file)
                                 {{/if}}
                                <span class="pinned">{{$item.pinned}}</span>
                        </span>
-                            {{if $item.lock}}<span class="icon s10 lock fakelink" onclick="lockview(event, 'item', {{$item.id}});" title="{{$item.lock}}">{{$item.lock}}</span>{{/if}}
-                                                       <span class="wall-item-network" title="{{$item.app}}">
+                       {{if $item.lock}}<span class="icon s10 lock fakelink" onclick="lockview(event, 'item', {{$item.id}});" title="{{$item.lock}}">{{$item.lock}}</span>{{/if}}
+                       <span class="wall-item-network" title="{{$item.app}}">
+                       {{if $item.network_svg}}
+                               <img class="network-svg" src="{{$item.network_svg}}" title="{{$item.network_name}}" alt="{{$item.network_name}}" loading="lazy"/>
+                       {{else}}
                                {{$item.network_name}}
+                       {{/if}}
                        </span>
                                                        <div class="wall-item-network-end"></div>
                                                </div>
index 149ebe6b69597f25d1305b87f08495e658331df0..8a9d9722d63e373ebaf602d89e92d8aa342b1e7b 100644 (file)
@@ -1779,6 +1779,13 @@ section.minimal {
        padding-right: 12px; */
 }
 
+.network-svg {
+       width: 18px;
+       height: 18px;
+       border-radius: 4px;
+       padding: 2px;
+}
+
 #profile-jot-form {
        box-shadow: 1px 2px 0px 0px #D8D8D8;
        background-color: #fafafa;