Skip to content

Commit 940f9a0

Browse files
committed
webui/js: formatting
Signed-off-by: KOWX712 <[email protected]>
1 parent e63cb44 commit 940f9a0

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

webui/file.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,6 @@ export async function writeConfig() {
9696
if (code !== 0) {
9797
toast('Error saving config: ' + stderr.join(' '));
9898
}
99-
})
99+
});
100100
}
101101
}

webui/index.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function appendInputGroup() {
9999
textField.addEventListener('focus', (event) => {
100100
setTimeout(() => {
101101
if (document.activeElement === textField) filterMenuItems(event.target.value);
102-
}, 100)
102+
}, 100);
103103
});
104104
} else { // Fixed options only
105105
const select = document.createElement('md-outlined-select');
@@ -173,12 +173,7 @@ function appendInputGroup() {
173173
const satisfied = metadata.require.every(req =>
174174
Object.entries(req).every(([reqKey, reqValue]) => config[reqKey] === reqValue)
175175
);
176-
177-
if (satisfied) {
178-
dependentInput.removeAttribute('disabled');
179-
} else {
180-
dependentInput.setAttribute('disabled', '');
181-
}
176+
dependentInput.disabled = !satisfied;
182177
};
183178

184179
metadata.require.forEach(req => {
@@ -367,7 +362,7 @@ document.addEventListener('DOMContentLoaded', async () => {
367362
exec('su -c "command -v apd"').then((isAp) => {
368363
if (isAp.errno !== 0 && isAp.stderr !== "ksu is not defined") return
369364
document.getElementById('ap-tab').classList.remove('hidden');
370-
initSwitch('/data/adb/.litemode_enable', 'litemode')
365+
initSwitch('/data/adb/.litemode_enable', 'litemode');
371366
}).catch(() => {});
372367

373368
document.querySelectorAll('[unresolved]').forEach(el => {

0 commit comments

Comments
 (0)