mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 08:07:18 +02:00
Update style of the Reload page button
This commit is contained in:
parent
5392414abd
commit
7310a009df
@ -9882,6 +9882,7 @@ function injectSettingsButton($parent) {
|
|||||||
const PREF_LATEST_VERSION = getPref(Preferences.LATEST_VERSION);
|
const PREF_LATEST_VERSION = getPref(Preferences.LATEST_VERSION);
|
||||||
|
|
||||||
const $headerFragment = document.createDocumentFragment();
|
const $headerFragment = document.createDocumentFragment();
|
||||||
|
let $reloadBtnWrapper;
|
||||||
|
|
||||||
// Remote Play button
|
// Remote Play button
|
||||||
if (getPref(Preferences.REMOTE_PLAY_ENABLED)) {
|
if (getPref(Preferences.REMOTE_PLAY_ENABLED)) {
|
||||||
@ -10034,6 +10035,10 @@ function injectSettingsButton($parent) {
|
|||||||
$wrapper.appendChild($group);
|
$wrapper.appendChild($group);
|
||||||
|
|
||||||
let onChange = e => {
|
let onChange = e => {
|
||||||
|
if (!$reloadBtnWrapper) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$reloadBtnWrapper.classList.remove('bx-gone');
|
$reloadBtnWrapper.classList.remove('bx-gone');
|
||||||
|
|
||||||
if (e.target.id === 'bx_setting_' + Preferences.BETTER_XCLOUD_LOCALE) {
|
if (e.target.id === 'bx_setting_' + Preferences.BETTER_XCLOUD_LOCALE) {
|
||||||
@ -10153,7 +10158,7 @@ function injectSettingsButton($parent) {
|
|||||||
// Setup Reload button
|
// Setup Reload button
|
||||||
const $reloadBtn = createButton({
|
const $reloadBtn = createButton({
|
||||||
label: t('settings-reload'),
|
label: t('settings-reload'),
|
||||||
style: ButtonStyle.PRIMARY | ButtonStyle.FOCUSABLE | ButtonStyle.FULL_WIDTH,
|
style: ButtonStyle.DANGER | ButtonStyle.FOCUSABLE | ButtonStyle.FULL_WIDTH,
|
||||||
onClick: e => {
|
onClick: e => {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
$reloadBtn.disabled = true;
|
$reloadBtn.disabled = true;
|
||||||
@ -10162,7 +10167,7 @@ function injectSettingsButton($parent) {
|
|||||||
});
|
});
|
||||||
$reloadBtn.setAttribute('tabindex', 0);
|
$reloadBtn.setAttribute('tabindex', 0);
|
||||||
|
|
||||||
const $reloadBtnWrapper = CE('div', {'class': 'bx-settings-reload-button-wrapper bx-gone'}, $reloadBtn);
|
$reloadBtnWrapper = CE('div', {'class': 'bx-settings-reload-button-wrapper bx-gone'}, $reloadBtn);
|
||||||
$wrapper.appendChild($reloadBtnWrapper);
|
$wrapper.appendChild($reloadBtnWrapper);
|
||||||
|
|
||||||
// Donation link
|
// Donation link
|
||||||
|
Loading…
x
Reference in New Issue
Block a user