mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Fix not disabling the Reload button correctly
This commit is contained in:
parent
6e17c2e24b
commit
8742da0531
4
dist/better-xcloud.user.js
vendored
4
dist/better-xcloud.user.js
vendored
@ -4272,8 +4272,8 @@ class SettingsNavigationDialog extends NavigationDialog {
|
||||
classes: ["bx-settings-reload-button", "bx-gone"],
|
||||
style: ButtonStyle.FOCUSABLE | ButtonStyle.FULL_WIDTH,
|
||||
onClick: (e) => {
|
||||
const $target = e.target;
|
||||
$target.disabled = !0, $target.textContent = t("settings-reloading"), window.location.reload();
|
||||
const $target = e.target.closest("button");
|
||||
$target.disabled = !0, $target.firstElementChild.textContent = t("settings-reloading"), window.location.reload();
|
||||
}
|
||||
}), topButtons.push(this.$btnGlobalReload), this.$noteGlobalReload = CE("span", {
|
||||
class: "bx-settings-reload-note"
|
||||
|
@ -122,9 +122,9 @@ export class SettingsNavigationDialog extends NavigationDialog {
|
||||
classes: ['bx-settings-reload-button', 'bx-gone'],
|
||||
style: ButtonStyle.FOCUSABLE | ButtonStyle.FULL_WIDTH,
|
||||
onClick: e => {
|
||||
const $target = e.target as HTMLButtonElement;
|
||||
const $target = (e.target as HTMLButtonElement).closest('button')!;
|
||||
$target.disabled = true;
|
||||
$target.textContent = t('settings-reloading');
|
||||
$target.firstElementChild!.textContent = t('settings-reloading');
|
||||
|
||||
window.location.reload();
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user