mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-27 01:36:11 -06:00
yarn linting fixes
This commit is contained in:
parent
ef3d356167
commit
8903478c20
@ -22,7 +22,7 @@ function toggleSecretButton(hidden: boolean, button: HTMLButtonElement): void {
|
|||||||
function showSecret(): void {
|
function showSecret(): void {
|
||||||
const secret = getElement('secret');
|
const secret = getElement('secret');
|
||||||
if (isTruthy(secret)) {
|
if (isTruthy(secret)) {
|
||||||
const value = secret.getAttribute('data-secret')
|
const value = secret.getAttribute('data-secret');
|
||||||
if (isTruthy(value)) {
|
if (isTruthy(value)) {
|
||||||
secret.innerText = value;
|
secret.innerText = value;
|
||||||
}
|
}
|
||||||
@ -35,7 +35,7 @@ function showSecret(): void {
|
|||||||
function hideSecret(): void {
|
function hideSecret(): void {
|
||||||
const secret = getElement('secret');
|
const secret = getElement('secret');
|
||||||
if (isTruthy(secret)) {
|
if (isTruthy(secret)) {
|
||||||
const value = secret.getAttribute('data-secret')
|
const value = secret.getAttribute('data-secret');
|
||||||
if (isTruthy(value)) {
|
if (isTruthy(value)) {
|
||||||
secret.innerText = '••••••••';
|
secret.innerText = '••••••••';
|
||||||
}
|
}
|
||||||
@ -64,7 +64,7 @@ function handleSecretToggle(state: StateManager<SecretState>, button: HTMLButton
|
|||||||
* Initialize secret toggle button.
|
* Initialize secret toggle button.
|
||||||
*/
|
*/
|
||||||
export function initSecretToggle(): void {
|
export function initSecretToggle(): void {
|
||||||
hideSecret()
|
hideSecret();
|
||||||
for (const button of getElements<HTMLButtonElement>('button.toggle-secret')) {
|
for (const button of getElements<HTMLButtonElement>('button.toggle-secret')) {
|
||||||
button.addEventListener(
|
button.addEventListener(
|
||||||
'click',
|
'click',
|
||||||
|
Loading…
Reference in New Issue
Block a user