mirror of
https://github.com/HeyPuter/puter.git
synced 2026-04-22 15:20:50 -05:00
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:
@@ -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>
|
||||
`);
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user