]> git.mxchange.org Git - friendica.git/commitdiff
[frio] Add connector-based privacy display
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 9 Jan 2022 17:17:34 +0000 (12:17 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 9 Jan 2022 17:17:52 +0000 (12:17 -0500)
src/Model/Item.php
src/Object/Post.php
view/theme/frio/templates/search_item.tpl
view/theme/frio/templates/wall_thread.tpl

index f923fe2691d84109e6ec20f0e918fed26a4d2da6..39d045d0cd224e1ba13e26e58bf3d8dd746e9359 100644 (file)
@@ -80,7 +80,7 @@ class Item
                'commented', 'created', 'edited', 'received', 'verb', 'object-type', 'postopts', 'plink',
                'wall', 'private', 'starred', 'origin', 'parent-origin', 'title', 'body', 'language',
                'content-warning', 'location', 'coord', 'app', 'rendered-hash', 'rendered-html', 'object',
-               'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'mention',
+               'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'mention', 'global',
                'author-id', 'author-link', 'author-name', 'author-avatar', 'author-network',
                'owner-id', 'owner-link', 'owner-name', 'owner-avatar', 'owner-network', 'owner-contact-type',
                'causer-id', 'causer-link', 'causer-name', 'causer-avatar', 'causer-contact-type', 'causer-network',
index 827f1dc23809b55b1b618a1ebfff957367e36aa7..4c6de164a00562c4fb2c6e3bfd20f21c4227be95 100644 (file)
@@ -177,6 +177,8 @@ class Post
                        ? DI::l10n()->t('Private Message')
                        : false);
 
+               $connector = !$item['global'] ? DI::l10n()->t('Connector Message') : false;
+
                $shareable = in_array($conv->getProfileOwner(), [0, local_user()]) && $item['private'] != Item::PRIVATE;
                $announceable = $shareable && in_array($item['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::TWITTER]);
 
@@ -469,6 +471,7 @@ class Post
                        'app'             => $item['app'],
                        'created'         => $ago,
                        'lock'            => $lock,
+                       'connector'       => $connector,
                        'location_html'   => $location_html,
                        'indent'          => $indent,
                        'shiny'           => $shiny,
index c6f19eb16821f89b649dbcaf0ef2d8b187d81a6c..9b1d2e739731c41b212edf44792669f2e8975f56 100644 (file)
@@ -63,8 +63,9 @@
                                        <span class="navicon lock fakelink" onClick="lockview(event, 'item', {{$item.id}});" title="{{$item.lock}}">
                                                &nbsp;<small><i class="fa fa-lock" aria-hidden="true"></i></small>
                                        </span>
+                               {{elseif $item.connector}}
+                                       <span class="fa fa-lock" title="{{$item.connector}}"></span>
                                {{/if}}
-
                                        <div class="additional-info text-muted">
                                                <div id="wall-item-ago-{{$item.id}}" class="wall-item-ago">
                                                        <small>
index d6790b3e8461fe45417cf1ab64bbf6cb2004b808..3cce85cdef4860c77cb13c9b524d2d5dde7954d3 100644 (file)
@@ -63,7 +63,8 @@ as the value of $top_child_total (this is done at the end of this file)
        {{if $item.star}}
        <span class="icon s22 star {{$item.isstarred}}" id="starred-{{$item.id}}" title="{{$item.star.starred}}">{{$item.star.starred}}</span>
        {{/if}}
-       {{if $item.lock}}<span class="navicon lock fakelink" onclick="lockview(event, 'item', {{$item.id}});" title="{{$item.lock}}"></span><span class="fa fa-lock"></span>{{/if}}
+       {{if $item.lock}}<span class="navicon lock fakelink" onclick="lockview(event, 'item', {{$item.id}});" title="{{$item.lock}}"></span><span class="fa fa-lock"></span>
+       {{elseif $item.connector}}<span class="fa fa-lock" title="{{$item.connector}}"></span>{{/if}}
 </div>
 {{* /TODO => Unknown block *}}
 
@@ -161,6 +162,8 @@ as the value of $top_child_total (this is done at the end of this file)
                                        <span class="navicon lock fakelink" onClick="lockview(event, 'item', {{$item.id}});" title="{{$item.lock}}" data-toggle="tooltip">
                                                &nbsp;<small><i class="fa fa-lock" aria-hidden="true"></i></small>
                                        </span>
+                               {{elseif $item.connector}}
+                                       <small><i class="fa fa-lock" title="{{$item.connector}}"></i></small>
                                {{/if}}
                                </h4>