]> git.mxchange.org Git - friendica.git/commitdiff
Frio: Improved display of disabled activities
authorMichael <heluecht@pirati.ca>
Tue, 7 Nov 2023 21:25:00 +0000 (21:25 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 7 Nov 2023 21:25:00 +0000 (21:25 +0000)
src/Content/Conversation.php
src/Object/Post.php
static/defaults.config.php
view/theme/frio/css/style.css
view/theme/frio/scheme/black.php
view/theme/frio/scheme/dark.php
view/theme/frio/style.php
view/theme/frio/templates/wall_thread.tpl

index 5a32bf32f264eaa950c5f8b209abaecd5e6b6191..90479cf407ee06f63fb82e7cf7f6642e47125e81 100644 (file)
@@ -889,9 +889,10 @@ class Conversation
                        $condition['author-hidden'] = false;
                }
 
-               if ($this->config->get('system', 'emoji_activities')) {
-                       $emojis      = $this->getEmojis($uriids);
-                       $quoteshares = $this->getQuoteShares($uriids);
+               $emojis      = $this->getEmojis($uriids);
+               $quoteshares = $this->getQuoteShares($uriids);
+
+               if (!$this->config->get('system', 'legacy_activities')) {
                        $condition = DBA::mergeConditions($condition, ["(`gravity` != ? OR `origin`)", ItemModel::GRAVITY_ACTIVITY]);
                }
 
index 7f4b715dadd0c86aa93f011b2034e449b073352a..ce3781a306a0bb5f258b98052c8daa9d15693e63 100644 (file)
@@ -597,6 +597,7 @@ class Post
                        'quoteshares'     => $this->getQuoteShares($item['quoteshares']),
                        'reactions'       => $reactions,
                        'responses'       => $responses,
+                       'legacy_activities' => DI::config()->get('system', 'legacy_activities'),
                        'switchcomment'   => DI::l10n()->t('Comment'),
                        'reply_label'     => DI::l10n()->t('Reply to %s', $profile_name),
                        'comment_html'    => $comment_html,
index 3f6971dfa0c688c60c22d2990317af2e82705bf1..b6e26cb59b035536f612fd8909ff70825b8022cd 100644 (file)
@@ -290,9 +290,9 @@ return [
                // restricts develop log writes to requests originating from this IP address.
                'dlogip' => '',
 
-               // emoji_activities (Boolean)
-               // Display received activities (like, dislike, reshare) as emojis
-               'emoji_activities' => false,
+               // legacy_activities (Boolean)
+               // Display received activities (like, dislike, reshare) as detailed list
+               'legacy_activities' => true,
 
                // expire-notify-priority (integer)
                // Priority for the expiry notification
@@ -520,7 +520,7 @@ return [
                'png_quality' => 8,
 
                // process_view (Boolean)
-               // Process the "View" activity that is used by Peertube. View activities are displayed, when "emoji_activities" are enabled.
+               // Process the "View" activity that is used by Peertube.
                'process_view' => false,
 
                // profiler (Boolean)
index 6e1668a3e303a7a29074021bd0e0837d9f20ef20..adfbf140b536436be38b8ddd8597bee5418e4a7a 100644 (file)
@@ -1988,6 +1988,10 @@ code > .hl-main {
        padding-left: 5px;
        padding-right: 5px;
 }
+.wall-item-actions button:disabled,
+button[disabled] {
+       color: $font_color_lighter;
+}
 .wall-item-actions .active {
        font-weight: bold;
        color: $link_color;
index 930541757630d65e72b4e426764b8a895b188098..bb5009f6d708ebc0725f16f0908d909d6813997d 100644 (file)
@@ -19,4 +19,5 @@ $background_color = '#000000';
 $contentbg_transp = '0';
 $font_color = '#cccccc';
 $font_color_darker = '#acacac';
+$font_color_lighter = '#cdcdcd';
 $background_image = '';
index eb1d3ca7bd31ba9922f1508752e4dd303de29336..031a6d9614460ae9eb96a3954ea0cf9a9f91a834 100644 (file)
@@ -33,4 +33,5 @@ switch ($scheme_accent) {
 $contentbg_transp = 4;
 $font_color = '#e4e4e4';
 $font_color_darker = '#dcdcdc';
+$font_color_lighter = '#ababab';
 $background_image = '';
index 863a62f1e84dc02d8ae0170ec94c1163b5ea1aa5..182f36bd0f436a943f2f6f4905c2386b5632b61b 100644 (file)
@@ -209,6 +209,7 @@ $options = [
        '$login_bg_image'              => $login_bg_image,
        '$login_bg_color'              => $login_bg_color,
        '$font_color_darker'           => $font_color_darker ?? '#222',
+       '$font_color_lighter'          => $font_color_lighter ?? '#aaa',
        '$font_color'                  => $font_color ?? '#444',
 ];
 
index 9f1b809eab8050f925b353f897f1f362dd625de6..170b0bc3b20e34e0fb2cde3adb6cb2cf2cb51134 100644 (file)
@@ -307,49 +307,55 @@ as the value of $top_child_total (this is done at the end of this file)
                                <div class="wall-item-actions-row">
 
                        {{* Button to open the comment text field *}}
-                       {{if $item.comment_html}}
                                <span class="wall-item-response">
+                               {{if $item.comment_html}}
                                        <button type="button" class="btn-link button-comments" id="comment-{{$item.id}}" title="{{$item.switchcomment}}" {{if $item.thread_level != 1}}onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});" {{else}} onclick="openClose('item-comments-{{$item.id}}'); commentExpand({{$item.id}});"{{/if}}><i class="fa fa-commenting" aria-hidden="true"></i></button>
                                        <span title="{{$item.responses.comment.title}}">{{$item.responses.comment.total}}</span>
-                               </span>
-                       {{/if}}
-                       {{if $item.remote_comment}}
-                               <span class="wall-item-response">
+                               {{elseif $item.remote_comment}}
                                        <a href="{{$item.remote_comment.2}}" class="btn-link button-comments" title="{{$item.remote_comment.0}}"><i class="fa fa-commenting" aria-hidden="true"></i></a>
+                               {{else}}
+                                       <button type="button" class="btn-link button-comments" id="comment-{{$item.id}}" title="{{$item.switchcomment}}" disabled><i class="fa fa-commenting-o" aria-hidden="true"></i></button>
+                               {{/if}}
                                </span>
-                       {{/if}}
 
                        {{* Button for sharing the item *}}
                        {{if $item.vote}}
-                               {{if $item.vote.announce}}
                                <span class="wall-item-response">
+                               {{if $item.vote.announce}}
                                        <button type="button" class="btn-link button-announces{{if $item.responses.announce.self}} active" aria-pressed="true{{/if}}" id="announce-{{$item.id}}" title="{{$item.vote.announce.0}}" onclick="doActivityItemAction({{$item.id}}, 'announce'{{if $item.responses.announce.self}}, true{{/if}});" ><i class="fa fa-retweet" aria-hidden="true"></i></button>
                                        <span title="{{$item.responses.announce.title}}">{{$item.responses.announce.total}}</span>
-                               </span>
+                               {{else}}
+                                       <button type="button" class="btn-link button-announces" id="announce-{{$item.id}}" title="{{$item.vote.announce.0}}" disabled><i class="fa fa-retweet" aria-hidden="true"></i></button>
                                {{/if}}
-                               {{if $item.vote.share}}
+                               </span>
                                <span class="wall-item-response">
+                               {{if $item.vote.share}}
                                        <button type="button" class="btn-link button-votes" id="share-{{$item.id}}" title="{{$item.vote.share.0}}" onclick="jotShare({{$item.id}});"><i class="fa fa-share" aria-hidden="true"></i></button>
                                        <span title="{{$item.quoteshares.title}}">{{$item.quoteshares.total}}</span>
-                               </span>
+                               {{else}}
+                                       <button type="button" class="btn-link button-votes" id="share-{{$item.id}}" title="{{$item.vote.share.0}}" disabled><i class="fa fa-share" aria-hidden="true"></i></button>
                                {{/if}}
+                               </span>
                        {{/if}}
                        
                        {{* Buttons for like and dislike *}}
                        {{if $item.vote}}
-                               {{if $item.vote.like}}
                                <span class="wall-item-response">
+                               {{if $item.vote.like}}
                                        <button type="button" class="btn-link button-likes{{if $item.responses.like.self}} active" aria-pressed="true{{/if}}" id="like-{{$item.id}}" title="{{$item.vote.like.0}}" onclick="doActivityItemAction({{$item.id}}, 'like'{{if $item.responses.like.self}}, true{{/if}});" ><i class="fa fa-thumbs-up" aria-hidden="true"></i></button>
                                        <span title="{{$item.responses.like.title}}">{{$item.responses.like.total}}</span>
-                               </span>
+                               {{else}}
+                                       <button type="button" class="btn-link button-likes" id="like-{{$item.id}}" title="{{$item.vote.like.0}}" disabled><i class="fa fa-thumbs-o-up" aria-hidden="true"></i></button>
                                {{/if}}
-                               {{if $item.vote.dislike}}
+                               </span>
                                <span class="wall-item-response">
+                               {{if $item.vote.dislike}}
                                        <button type="button" class="btn-link button-likes{{if $item.responses.dislike.self}} active" aria-pressed="true{{/if}}" id="dislike-{{$item.id}}" title="{{$item.vote.dislike.0}}" onclick="doActivityItemAction({{$item.id}}, 'dislike'{{if $item.responses.dislike.self}}, true{{/if}});" ><i class="fa fa-thumbs-down" aria-hidden="true"></i></button>
                                        <span title="{{$item.responses.dislike.title}}">{{$item.responses.dislike.total}}</span>
-                               </span>
+                               {{else}}
+                                       <button type="button" class="btn-link button-likes" id="dislike-{{$item.id}}" title="{{$item.vote.dislike.0}}" disabled><i class="fa fa-thumbs-o-down" aria-hidden="true"></i></button>
                                {{/if}}
-                               
+                               </span>
 
                                {{foreach $item.reactions as $emoji}}
                                <span class="wall-item-emoji" title="{{$emoji.title}}">{{$emoji.emoji}} {{$emoji.total}}</span>
@@ -357,6 +363,7 @@ as the value of $top_child_total (this is done at the end of this file)
                        {{/if}}
 
                        {{* Event attendance buttons *}}
+                       <span class="vote-event">
                        {{if $item.isevent}}
                                <span class="wall-item-response">
                                        <button type="button" class="btn-link button-event{{if $item.responses.attendyes.self}} active" aria-pressed="true{{/if}}" id="attendyes-{{$item.id}}" title="{{$item.attend.0}}" onclick="doActivityItemAction({{$item.id}}, 'attendyes'{{if $item.responses.attendyes.self}}, true{{/if}});"><i class="fa fa-check" aria-hidden="true"><span class="sr-only">{{$item.attend.0}}</span></i></button>
@@ -370,8 +377,12 @@ as the value of $top_child_total (this is done at the end of this file)
                                        <button type="button" class="btn-link button-event{{if $item.responses.attendmaybe.self}} active" aria-pressed="true{{/if}}" id="attendmaybe-{{$item.id}}" title="{{$item.attend.2}}" onclick="doActivityItemAction({{$item.id}}, 'attendmaybe'{{if $item.responses.attendmaybe.self}}, true{{/if}});"><i class="fa fa-question" aria-hidden="true"><span class="sr-only">{{$item.attend.2}}</span></i></button>
                                        <span title="{{$item.responses.attendmaybe.title}}">{{$item.responses.attendmaybe.total}}</span>
                                </span>
+                       {{else}}
+                               <span class="wall-item-response"></span>
+                               <span class="wall-item-response"></span>
+                               <span class="wall-item-response"></span>
                        {{/if}}
-       
+                       </span>
                        </div>
                        </div>
                        <span class="wall-item-actions-right hidden-xs">
@@ -475,13 +486,15 @@ as the value of $top_child_total (this is done at the end of this file)
                                {{/if}}
                        </ul>
                </span>
+               {{if $item.drop.pagedrop}}
                <span class="pull-right checkbox">
-                       {{if $item.drop && $item.drop.pagedrop}}
-                                       <input type="checkbox" title="{{$item.drop.select}}" name="itemselected[]" id="checkbox-{{$item.id}}" class="item-select" value="{{$item.id}}" />
-                                       <label for="checkbox-{{$item.id}}"></label>
+                       {{if $item.drop}}
+                               <input type="checkbox" title="{{$item.drop.select}}" name="itemselected[]" id="checkbox-{{$item.id}}" class="item-select" value="{{$item.id}}" />
+                               <label for="checkbox-{{$item.id}}"></label>
                        {{/if}}
-                               </span>
-                       </span>
+               </span>
+               {{/if}}
+               </span>
 
                        <div class="wall-item-actions-items btn-toolbar btn-group visible-xs" role="group">
                                <div class="wall-item-actions-row">
@@ -653,12 +666,14 @@ as the value of $top_child_total (this is done at the end of this file)
                                                </ul>
                                        </div>
                                {{/if}}
+                               {{if $item.drop.pagedrop}}
                                <span class="pull-right checkbox">
-                                       {{if $item.drop && $item.drop.pagedrop}}
+                                       {{if $item.drop}}
                                                <input type="checkbox" title="{{$item.drop.select}}" name="itemselected[]" id="checkbox-{{$item.id}}" class="item-select" value="{{$item.id}}" />
                                                <label for="checkbox-{{$item.id}}"></label>
                                        {{/if}}
                                </span>
+                               {{/if}}
                                </div>
                        </div>
                </div><!--./wall-item-actions-->
@@ -666,7 +681,7 @@ as the value of $top_child_total (this is done at the end of this file)
                <div class="wall-item-links"></div>
 
                {{* Display likes, dislike and attendance stats *}}
-               {{if !$item.emojis && $item.responses}}
+               {{if $item.legacy_activities}}
                        <div class="wall-item-responses">
                        {{foreach $item.responses as $verb=>$response}}
                                <div class="wall-item-{{$verb}}" id="wall-item-{{$verb}}-{{$item.id}}">{{$response.output nofilter}}</div>