mirror of
https://github.com/HeyPuter/puter.git
synced 2025-01-23 22:40:20 +08: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:
parent
df24c663df
commit
05aaa5b667
@ -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
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user