Skip to content

Commit 60feb3c

Browse files
authored
WebUI: Redesign login form
Make the Web UI login more mobile friendly. The main action is moving to a column layout for the logo and form. This way it's easier for mobile to view the page but it doesn't affect the desktop experience much. Secondary it set the input font size to be default text size, this in turn makes it so the mobile ui doesn't zoom in when you focus the inputs. [You can read more about it here](https://wsform.com/knowledgebase/why-forms-zoom-on-some-mobile-devices-and-browsers-and-how-to-control-it/). PR #23360.
1 parent a8e9e80 commit 60feb3c

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

src/webui/www/public/css/login.css

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,23 @@ body {
1616
}
1717

1818
#main {
19+
align-items: center;
20+
display: flex;
21+
flex-direction: column;
1922
margin-left: auto;
2023
margin-right: auto;
2124
padding-top: 5em;
2225
text-align: center;
2326
}
2427

28+
.login-input {
29+
box-sizing: border-box;
30+
font-size: 1rem;
31+
margin: 0.5rem 0;
32+
padding: 0.5rem;
33+
width: 100%;
34+
}
35+
2536
#formplace {
2637
padding: 10px;
2738
text-align: left;
@@ -33,7 +44,9 @@ body {
3344
}
3445

3546
#loginButton {
36-
float: right;
47+
font-size: 1rem;
48+
padding: 0.5rem;
49+
width: 100%;
3750
}
3851

3952
#logo img {

src/webui/www/public/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ <h1>QBT_TR(qBittorrent WebUI)QBT_TR[CONTEXT=Login]</h1>
3232
<form id="loginform">
3333
<div class="row">
3434
<label for="username">QBT_TR(Username)QBT_TR[CONTEXT=Login]</label><br>
35-
<input type="text" id="username" name="username" autocomplete="username" autocapitalize="none" autofocus required>
35+
<input type="text" class="login-input" id="username" name="username" autocomplete="username" autocapitalize="none" autofocus required>
3636
</div>
3737
<div class="row">
3838
<label for="password">QBT_TR(Password)QBT_TR[CONTEXT=Login]</label><br>
39-
<input type="password" id="password" name="password" autocomplete="current-password" required>
39+
<input type="password" class="login-input" id="password" name="password" autocomplete="current-password" required>
4040
</div>
4141
<div class="row">
4242
<input type="submit" id="loginButton" value="QBT_TR(Login)QBT_TR[CONTEXT=Login]">

0 commit comments

Comments
 (0)