Fix server selection icon alignment in home page

Signed-off-by: Maurício Meneghini Fauth <mauricio@mfauth.net>
This commit is contained in:
Maurício Meneghini Fauth 2026-04-21 16:45:09 -03:00
parent 6d364b9bba
commit e09a1f7b15
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
4 changed files with 10 additions and 4 deletions

View File

@ -117,7 +117,7 @@ class HomeController extends AbstractController
)
);
if ($hasServerSelection) {
$serverSelection = Select::render(true, true);
$serverSelection = Select::render(true, true, true);
}
if ($server > 0) {

View File

@ -29,7 +29,7 @@ class Select
*
* @return string
*/
public static function render($not_only_options, $omit_fieldset)
public static function render($not_only_options, $omit_fieldset, bool $hasLabelIcon = false)
{
// Show as list?
if ($not_only_options) {
@ -108,6 +108,7 @@ class Select
'not_only_options' => $not_only_options,
'omit_fieldset' => $omit_fieldset,
'servers' => $servers,
'has_label_icon' => $hasLabelIcon,
];
if ($not_only_options) {
$renderDetails['form_action'] = $form_action;

View File

@ -34,7 +34,6 @@
<ul class="list-group list-group-flush">
{% if has_server_selection %}
<li id="li_select_server" class="list-group-item">
{{ get_image('s_host') }}
{{ server_selection|raw }}
</li>
{% endif %}

View File

@ -4,7 +4,13 @@
<fieldset class="pma-fieldset">
{% endif %}
{{ get_hidden_fields([]) }}
<label for="select_server">{% trans 'Current server:' %}</label>
<label for="select_server">
{% if has_label_icon %}
{{ get_icon('s_host', 'Current server:'|trans) }}
{% else %}
{% trans 'Current server:' %}
{% endif %}
</label>
<select id="select_server" class="autosubmit" name="server">
<option value="">({% trans 'Servers' %}) ...</option>
{% include 'server/select/server_options.twig' with {