From 00395118f92f54994ab1764e9c7254bd5152e84e Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 9 Nov 2023 18:22:25 +0000 Subject: [PATCH] Don't show dislike if unwanted / views use the correct icon now / colours adjusted --- src/Object/Post.php | 4 +++- view/theme/frio/scheme/black.php | 2 +- view/theme/frio/scheme/dark.php | 2 +- view/theme/frio/templates/wall_thread.tpl | 9 ++++++--- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/Object/Post.php b/src/Object/Post.php index ce3781a306..e6aae2f5d5 100644 --- a/src/Object/Post.php +++ b/src/Object/Post.php @@ -458,7 +458,8 @@ class Post $title = ''; } - if (DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'hide_dislike')) { + $hide_dislike = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'hide_dislike'); + if ($hide_dislike) { $buttons['dislike'] = false; } @@ -593,6 +594,7 @@ class Post 'vote' => $buttons, 'like_html' => $responses['like']['output'], 'dislike_html' => $responses['dislike']['output'], + 'hide_dislike' => $hide_dislike, 'emojis' => $emojis, 'quoteshares' => $this->getQuoteShares($item['quoteshares']), 'reactions' => $reactions, diff --git a/view/theme/frio/scheme/black.php b/view/theme/frio/scheme/black.php index bb5009f6d7..94cb6a615a 100644 --- a/view/theme/frio/scheme/black.php +++ b/view/theme/frio/scheme/black.php @@ -19,5 +19,5 @@ $background_color = '#000000'; $contentbg_transp = '0'; $font_color = '#cccccc'; $font_color_darker = '#acacac'; -$font_color_lighter = '#cdcdcd'; +$font_color_lighter = '#444444'; $background_image = ''; diff --git a/view/theme/frio/scheme/dark.php b/view/theme/frio/scheme/dark.php index 031a6d9614..31c7449625 100644 --- a/view/theme/frio/scheme/dark.php +++ b/view/theme/frio/scheme/dark.php @@ -33,5 +33,5 @@ switch ($scheme_accent) { $contentbg_transp = 4; $font_color = '#e4e4e4'; $font_color_darker = '#dcdcdc'; -$font_color_lighter = '#ababab'; +$font_color_lighter = '#555555'; $background_image = ''; diff --git a/view/theme/frio/templates/wall_thread.tpl b/view/theme/frio/templates/wall_thread.tpl index 170b0bc3b2..14ce750fab 100644 --- a/view/theme/frio/templates/wall_thread.tpl +++ b/view/theme/frio/templates/wall_thread.tpl @@ -352,13 +352,17 @@ as the value of $top_child_total (this is done at the end of this file) {{if $item.vote.dislike}} {{$item.responses.dislike.total}} - {{else}} + {{elseif !$item.hide_dislike}} {{/if}} {{foreach $item.reactions as $emoji}} - {{$emoji.emoji}} {{$emoji.total}} + {{if $emoji.icon.fa}} + {{$emoji.total}} + {{else}} + {{$emoji.emoji}} {{$emoji.total}} + {{/if}} {{/foreach}} {{/if}} @@ -495,7 +499,6 @@ as the value of $top_child_total (this is done at the end of this file) {{/if}} -
{{* Button to open the comment text field *}}