Password peek 🫣

This commit is contained in:
Karthik Kasturi 2025-09-11 21:34:12 +00:00
parent 2b8b5d71d2
commit f9c958da90
42 changed files with 203 additions and 9 deletions

View file

@ -82,7 +82,13 @@ endif;
<form id="passwordform" role="form">
<div class="mb-3">
<label for="passworddecrypt"><svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#eye" /></svg> <?php echo I18n::_('Please enter the password for this document:') ?></label>
<input id="passworddecrypt" type="password" class="form-control" placeholder="<?php echo I18n::_('Enter password') ?>" required="required" />
<div class="password-peek-container">
<input id="passworddecrypt" type="password" class="form-control input-password" placeholder="<?php echo I18n::_('Enter password') ?>" required="required" />
<button class="toggle-password" type="button"
title="<?php echo I18n::_('Show password as plain text. Warning: this will display your password on the screen.'); ?>"
aria-label="<?php echo I18n::_('Show password as plain text. Warning: this will display your password on the screen.'); ?>">
</button>
</div>
</div>
<button type="submit" class="btn btn-success btn-block"><svg width="16" height="16" fill="currentColor" aria-hidden="true"><use href="img/bootstrap-icons.svg#power" /></svg> <?php echo I18n::_('Decrypt') ?></button>
</form>
@ -243,7 +249,13 @@ if ($PASSWORD) :
?>
<li class="nav-item">
<div id="password" class="navbar-form hidden">
<input type="password" id="passwordinput" placeholder="<?php echo I18n::_('Password (recommended)'); ?>" aria-label="<?php echo I18n::_('Password (recommended)'); ?>" class="form-control" size="23" />
<div class="password-peek-container">
<input type="password" id="passwordinput" placeholder="<?php echo I18n::_('Password (recommended)'); ?>" aria-label="<?php echo I18n::_('Password (recommended)'); ?>" class="form-control input-password" size="23" />
<button class="toggle-password" type="button"
title="<?php echo I18n::_('Show password as plain text. Warning: this will display your password on the screen.'); ?>"
aria-label="<?php echo I18n::_('Show password as plain text. Warning: this will display your password on the screen.'); ?>">
</button>
</div>
</div>
</li>
<?php
@ -434,7 +446,7 @@ if (!empty($URLSHORTENER)) :
<p>
<button id="shortenbutton" data-shortener="<?php echo I18n::encode($URLSHORTENER); ?>"
<?php if ($SHORTENBYDEFAULT) : ?>
data-autoshorten="true"
data-autoshorten="true"
<?php endif; ?>
type="button" class="btn btn-primary btn-block d-flex justify-content-center align-items-center gap-1"
>