diff --git a/plugins/Favourite/Favourite.php b/plugins/Favourite/Favourite.php index 6b5be8a28d..c4c8d4644d 100644 --- a/plugins/Favourite/Favourite.php +++ b/plugins/Favourite/Favourite.php @@ -66,9 +66,10 @@ class Favourite extends NoteHandlerPlugin $form_fav = Form::create([ ['submit_favourite', SubmitType::class, [ - 'label' => $is_set ? _m('Note already favourite!.') : _m('Favourite this note.'), + 'label' => ' ', 'attr' => [ - 'class' => $is_set ? 'note-actions-set' : 'note-actions-unset', + 'class' => ($is_set ? 'note-actions-set' : 'note-actions-unset') . ' button-container favourite-button-container', + 'title' => $is_set ? _m('Note already favourite!') : _m('Favourite this note!'), ], ], ], diff --git a/plugins/Repeat/Repeat.php b/plugins/Repeat/Repeat.php index d04bb73608..48ebc922b0 100644 --- a/plugins/Repeat/Repeat.php +++ b/plugins/Repeat/Repeat.php @@ -29,6 +29,7 @@ use App\Util\Exception\RedirectException; use Symfony\Component\Form\Extension\Core\Type\HiddenType; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\HttpFoundation\Request; +use function App\Core\I18n\_m; class Repeat extends NoteHandlerPlugin { @@ -51,7 +52,8 @@ class Repeat extends NoteHandlerPlugin [ 'label' => ' ', 'attr' => [ - 'class' => $is_set ? 'note-actions-set' : 'note-actions-unset', + 'class' => ($is_set ? 'note-actions-set' : 'note-actions-unset') . ' button-container repeat-button-container', + 'title' => $is_set ? _m('Note already repeated!') : _m('Repeat this note!'), ], ], ], diff --git a/plugins/Reply/Reply.php b/plugins/Reply/Reply.php index eef6a81a42..fbd097dc7d 100644 --- a/plugins/Reply/Reply.php +++ b/plugins/Reply/Reply.php @@ -64,7 +64,8 @@ class Reply extends NoteHandlerPlugin [ 'label' => ' ', 'attr' => [ - 'class' => 'note-actions-unset', + 'class' => 'note-actions-unset button-container reply-button-container', + 'title' => 'Reply to this note!', ], ], ], diff --git a/public/assets/css/base.css b/public/assets/css/base.css index 916eda57fc..723625cac4 100644 --- a/public/assets/css/base.css +++ b/public/assets/css/base.css @@ -300,41 +300,35 @@ summary:hover .icon-details-open { } .button-container { - width: 1em !important; - height: 1em !important; -} - -.button-container button { all: unset; border: none !important; - width: inherit !important; - height: inherit !important; + width: 1em !important; + height: 1em !important; background-size: cover !important; margin-left: 5px; + text-indent: -9999em; + text-transform: uppercase; } -.button-container button:hover, -.button-container button:focus { +.button-container:hover, +.button-container:focus { border: none !important; background: var(--bg3) !important; } -.favourite-button-container button { - text-indent: -9999em; - text-transform: uppercase; - +.favourite-button-container { -webkit-mask-image: url("../icons/heart.svg") !important; -o-mask-image: url("../icons/heart.svg") !important; -moz-mask-image: url("../icons/heart.svg") !important; mask-image: url("../icons/heart.svg") !important; } -.reply-button-container button { +.reply-button-container { -webkit-mask-image: url("../icons/reply.svg") !important; -o-mask-image: url("../icons/reply.svg") !important; -moz-mask-image: url("../icons/reply.svg") !important; mask-image: url("../icons/reply.svg") !important; } -.repeat-button-container button { +.repeat-button-container { -webkit-mask-image: url("../icons/repeat.svg") !important; -o-mask-image: url("../icons/repeat.svg") !important; -moz-mask-image: url("../icons/repeat.svg") !important; diff --git a/src/Twig/Runtime.php b/src/Twig/Runtime.php index bdba0717c9..5e7554e4a0 100644 --- a/src/Twig/Runtime.php +++ b/src/Twig/Runtime.php @@ -118,8 +118,10 @@ class Runtime implements RuntimeExtensionInterface, EventSubscriberInterface public function isFirefox(): bool { - $re = '/.*(?i)\bfirefox\b.*/m'; - return preg_match(pattern: $re, subject: $this->request->headers->get('User-Agent')) === 1; + $re_has_chrome = '/.*(?i)\bchrome\b.*/m'; + $re_has_gecko = '/.*(?i)\bgecko\b.*/m'; + return (preg_match(pattern: $re_has_chrome, subject: $this->request->headers->get('User-Agent')) !== 1) + && (preg_match(pattern: $re_has_gecko, subject: $this->request->headers->get('User-Agent')) === 1); } // ---------------------------------------------------------- diff --git a/templates/base.html.twig b/templates/base.html.twig index 895fd7f6e1..a584f3d8ac 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -30,12 +30,11 @@ {% endfor %} -
+ -