mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 19:12:27 +08:00
Fixed login errors
This commit is contained in:
parent
e232c6634e
commit
37b4bf6b58
@ -3,7 +3,6 @@
|
||||
import {Totp} from 'time2fa';
|
||||
|
||||
function isTotpEnabled() {
|
||||
console.log("Reading ENV: " + process.env.TOTP_ENABLED );
|
||||
if (process.env.TOTP_ENABLED === undefined) {
|
||||
return false;
|
||||
}
|
||||
|
@ -13,10 +13,17 @@
|
||||
<h1>Trilium login</h1>
|
||||
|
||||
<% if (failedAuth) { %>
|
||||
<div class="alert alert-warning">
|
||||
Password is incorrect. Please try again.
|
||||
</div>
|
||||
<% if( totpEnabled ) { %>
|
||||
<div class="alert alert-warning">
|
||||
Password or TOTP is incorrect. Please try again.
|
||||
</div>
|
||||
<% }else{ %>
|
||||
<div class="alert alert-warning">
|
||||
Password is incorrect. Please try again.
|
||||
</div>
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
|
||||
<form action="login" method="POST">
|
||||
<div class="form-group">
|
||||
|
Loading…
x
Reference in New Issue
Block a user