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.
This commit is contained in:
Sam Atkins 2024-05-09 12:06:54 +01:00
parent df24c663df
commit 05aaa5b667
3 changed files with 2 additions and 19 deletions

View File

@ -33,14 +33,14 @@ export default class Button extends Component {
create_template ({ template }) {
if ( this.get('style') === 'link' ) {
$(template).html(/*html*/`
<button type="submit" class="link-button code-confirm-btn" style="margin-top:10px;" disabled>${
<button type="submit" class="link-button" style="margin-top:10px;" disabled>${
html_encode(this.get('label'))
}</button>
`);
return;
}
$(template).html(/*html*/`
<button type="submit" class="button button-block button-${this.get('style')} code-confirm-btn" style="margin-top:10px;" disabled>${
<button type="submit" class="button button-block button-${this.get('style')}" style="margin-top:10px;" disabled>${
html_encode(this.get('label'))
}</button>
`);

View File

@ -88,14 +88,7 @@ async function UIWindowQR(options){
]
});
// component_qr.attach(placeholder_qr);
component_flexer.attach(placeholder_qr);
// placeholder_qr.replaceWith($(`<h1>test</h1>`).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

View File

@ -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;