From 05aaa5b6671f40d87c6751e0d665271f7260fb97 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Thu, 9 May 2024 12:06:54 +0100 Subject: [PATCH] chore: Remove dead code from 2FA development No `.qr-code-checkbox input`s now exist. Also, `.code-confirm-btn` is only used by CodeEntryView, which doesn't use this Button component. --- src/UI/Components/Button.js | 4 ++-- src/UI/UIWindowQR.js | 7 ------- src/css/style.css | 10 ---------- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/src/UI/Components/Button.js b/src/UI/Components/Button.js index 375e1ad9..49490244 100644 --- a/src/UI/Components/Button.js +++ b/src/UI/Components/Button.js @@ -33,14 +33,14 @@ export default class Button extends Component { create_template ({ template }) { if ( this.get('style') === 'link' ) { $(template).html(/*html*/` - `); return; } $(template).html(/*html*/` - `); diff --git a/src/UI/UIWindowQR.js b/src/UI/UIWindowQR.js index 812b6a33..8976fc68 100644 --- a/src/UI/UIWindowQR.js +++ b/src/UI/UIWindowQR.js @@ -88,14 +88,7 @@ async function UIWindowQR(options){ ] }); - // component_qr.attach(placeholder_qr); component_flexer.attach(placeholder_qr); - // placeholder_qr.replaceWith($(`

test

`).get(0)); - - $(el_window).find('.qr-code-checkbox input').on('change', () => { - const all_checked = $(el_window).find('.qr-code-checkbox input').toArray().every(el => el.checked); - $(el_window).find('.code-confirm-btn').prop('disabled', !all_checked); - }); } export default UIWindowQR \ No newline at end of file diff --git a/src/css/style.css b/src/css/style.css index 0fe24790..faa21aba 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -2625,16 +2625,6 @@ fieldset[name=number-code] { margin: 20px 0; } -.qr-code-checkbox { - display: flex; - gap: 10px; - align-items: center; -} - -.qr-code-checkbox input[type=checkbox] { - margin: 0; -} - .perm-title { text-align: center; margin-top: 0;