Skip to content

Commit a569d87

Browse files
authored
Merge pull request #206 from PopNatanael/4.0
Made login page mobile friendly and made every column in admin logins…
2 parents 353f3c6 + d9d047c commit a569d87

6 files changed

Lines changed: 64 additions & 49 deletions

File tree

public/css/app.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66783,6 +66783,11 @@ textarea.form-control-lg {
6678366783
background-color: #5cb85c;
6678466784
}
6678566785

66786+
@media (max-width: 767px) {
66787+
.login-button {
66788+
width: 100%;
66789+
}
66790+
}
6678666791
#loader {
6678766792
transition: all 0.3s ease-in-out;
6678866793
opacity: 1;

src/Admin/src/Form/LoginForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function init(): void
6262
'attributes' => [
6363
'type' => 'submit',
6464
'value' => 'Log in',
65-
'class' => 'btn btn-primary btn-block',
65+
'class' => 'btn btn-primary btn-block login-button',
6666
],
6767
'type' => Submit::class,
6868
]);

src/Admin/src/Service/AdminService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function getAdminLogins(
129129
'uuid' => $login->getUuid()->toString(),
130130
'identity' => $login->getIdentity(),
131131
'adminIp' => $login->getAdminIp(),
132-
'status' => $login->getLoginStatus(),
132+
'loginStatus' => $login->getLoginStatus(),
133133
'country' => $login->getCountry(),
134134
'continent' => $login->getContinent(),
135135
'organization' => $login->getOrganization(),

src/Admin/templates/admin/list-logins.html.twig

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@
1818
<thead>
1919

2020
<tr>
21-
<th data-field="identity" data-sortable="false">Identity</th>
22-
<th data-field="adminIp" data-sortable="false">Ip</th>
23-
<th data-field="status" data-sortable="false">Status</th>
24-
<th data-field="country" data-sortable="false">Country</th>
25-
<th data-field="continent" data-sortable="false">Continent</th>
26-
<th data-field="organization" data-sortable="false">Organization</th>
27-
<th data-field="deviceType" data-sortable="false">Device Type</th>
28-
<th data-field="deviceBrand" data-sortable="false">Device Brand</th>
29-
<th data-field="deviceModel" data-sortable="false">Device Model</th>
30-
<th data-field="isMobile" data-sortable="false">Is Mobile</th>
31-
<th data-field="osName" data-sortable="false">Os Name</th>
32-
<th data-field="osVersion" data-sortable="false">Os Version</th>
33-
<th data-field="osPlatform" data-sortable="false">Os Platform</th>
34-
<th data-field="clientType" data-sortable="false">Client Type</th>
35-
<th data-field="clientName" data-sortable="false">Client Name</th>
36-
<th data-field="clientEngine" data-sortable="false">Client Engine</th>
37-
<th data-field="clientVersion" data-sortable="false">Client Version</th>
21+
<th data-field="identity" data-sortable="true">Identity</th>
22+
<th data-field="adminIp" data-sortable="true">Ip</th>
23+
<th data-field="loginStatus" data-sortable="true">Status</th>
24+
<th data-field="country" data-sortable="true">Country</th>
25+
<th data-field="continent" data-sortable="true">Continent</th>
26+
<th data-field="organization" data-sortable="true">Organization</th>
27+
<th data-field="deviceType" data-sortable="true">Device Type</th>
28+
<th data-field="deviceBrand" data-sortable="true">Device Brand</th>
29+
<th data-field="deviceModel" data-sortable="true">Device Model</th>
30+
<th data-field="isMobile" data-sortable="true">Is Mobile</th>
31+
<th data-field="osName" data-sortable="true">Os Name</th>
32+
<th data-field="osVersion" data-sortable="true">Os Version</th>
33+
<th data-field="osPlatform" data-sortable="true">Os Platform</th>
34+
<th data-field="clientType" data-sortable="true">Client Type</th>
35+
<th data-field="clientName" data-sortable="true">Client Name</th>
36+
<th data-field="clientEngine" data-sortable="true">Client Engine</th>
37+
<th data-field="clientVersion" data-sortable="true">Client Version</th>
3838
<th data-field="created" data-sortable="true">Created</th>
3939
</tr>
4040

src/Admin/templates/admin/login.html.twig

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -54,40 +54,44 @@
5454
</head>
5555
<body class="app">
5656
<div class="peers ai-s fxw-nw h-100vh align-items-center">
57-
<div class="col-6 col-md-6 peer pX-40 pY-80 h-100 bgc-white scrollable pos-r">
58-
<div class="pos-a centerXY">
59-
<div class="bgc-white bdrs-50p w-100">
60-
<a href="{{ path('dashboard') }}">
61-
<img class="pos-a centerXY logo-img" src="{{ asset('images/app/logo.svg') }}" alt="">
62-
</a>
57+
<div class="container">
58+
<div class="row">
59+
<div class="col-md-6 peer pX-40 pY-80 h-100 bgc-white scrollable pos-r">
60+
<div class="pos-a centerXY">
61+
<div class="bgc-white bdrs-50p w-100">
62+
<a href="{{ path('dashboard') }}">
63+
<img class="pos-a centerXY logo-img" src="{{ asset('images/app/logo.svg') }}" alt="">
64+
</a>
65+
</div>
66+
</div>
6367
</div>
64-
</div>
65-
</div>
66-
<div class="col-2 col-md-2 mL-10">
67-
{% set dummy = form.prepare() %}
68-
{{ form().openTag(form) | raw }}
69-
<h4 class="fw-300 c-grey-900 mB-20">Login</h4>
70-
<div class="mb-3">
71-
{% set username = form.get('username') %}
72-
{% set elementTranslatePlaceholder = username.getAttribute('placeholder')|trans|raw %}
73-
{% set dummy = username.setAttribute('placeholder', elementTranslatePlaceholder) %}
74-
{{ formElement(username) }}
75-
</div>
76-
<div class="mb-3">
77-
{% set password = form.get('password') %}
78-
{% set elementTranslatePlaceholder = password.getAttribute('placeholder')|trans|raw %}
79-
{% set dummy = password.setAttribute('placeholder', elementTranslatePlaceholder) %}
80-
{{ formElement(password) }}
81-
</div>
82-
{% set submit = form.get('submit') %}
83-
{% set submitValue = submit.getValue|trans|raw %}
84-
{% set dummy = submit.setAttribute('value', submitValue) %}
68+
<div class="col-md-4">
69+
{% set dummy = form.prepare() %}
70+
{{ form().openTag(form) | raw }}
71+
<h4 class="fw-300 c-grey-900 mB-20">Login</h4>
72+
<div class="mb-3">
73+
{% set username = form.get('username') %}
74+
{% set elementTranslatePlaceholder = username.getAttribute('placeholder')|trans|raw %}
75+
{% set dummy = username.setAttribute('placeholder', elementTranslatePlaceholder) %}
76+
{{ formElement(username) }}
77+
</div>
78+
<div class="mb-3">
79+
{% set password = form.get('password') %}
80+
{% set elementTranslatePlaceholder = password.getAttribute('placeholder')|trans|raw %}
81+
{% set dummy = password.setAttribute('placeholder', elementTranslatePlaceholder) %}
82+
{{ formElement(password) }}
83+
</div>
84+
{% set submit = form.get('submit') %}
85+
{% set submitValue = submit.getValue|trans|raw %}
86+
{% set dummy = submit.setAttribute('value', submitValue) %}
8587

86-
{{ messagesPartial('partial::alerts', {}, null, 'user-login') }}
88+
{{ messagesPartial('partial::alerts', {}, null, 'user-login') }}
8789

88-
{{ formSubmit(submit) }}
90+
{{ formSubmit(submit) }}
8991

90-
{{ form().closeTag() | raw }}
92+
{{ form().closeTag() | raw }}
93+
</div>
94+
</div>
9195
</div>
9296
</div>
9397
</body>

src/App/assets/scss/components/forms.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,3 +255,9 @@
255255
.radio-success input[type="radio"]:checked + label::after {
256256
background-color: #5cb85c;
257257
}
258+
259+
@media (max-width: 767px) {
260+
.login-button {
261+
width: 100%;
262+
}
263+
}

0 commit comments

Comments
 (0)