mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 15:47:18 +02:00
Add "Android app settings" button
This commit is contained in:
parent
fcaab4ce77
commit
07b477a738
@ -148,8 +148,20 @@ export function setupSettingsUi() {
|
||||
$updateAvailable.classList.remove('bx-gone');
|
||||
}
|
||||
|
||||
// Show link to Android app
|
||||
if (!AppInterface) {
|
||||
if (AppInterface) {
|
||||
// Show Android app settings button
|
||||
const $btn = createButton({
|
||||
label: t('android-app-settings'),
|
||||
icon: BxIcon.STREAM_SETTINGS,
|
||||
style: ButtonStyle.FULL_WIDTH | ButtonStyle.FOCUSABLE,
|
||||
onClick: e => {
|
||||
AppInterface.openAppSettings && AppInterface.openAppSettings();
|
||||
},
|
||||
});
|
||||
|
||||
$wrapper.appendChild($btn);
|
||||
} else {
|
||||
// Show link to Android app
|
||||
const userAgent = UserAgent.getDefault().toLowerCase();
|
||||
if (userAgent.includes('android')) {
|
||||
const $btn = createButton({
|
||||
|
Loading…
x
Reference in New Issue
Block a user