Render Settings footer in lite mode

This commit is contained in:
redphx 2024-07-31 06:54:14 +07:00
parent 847adb1fff
commit a39d056eba

View File

@ -40,8 +40,8 @@ type SettingTabContentItem = Partial<{
}> }>
type SettingTabContent = { type SettingTabContent = {
group: 'general' | 'server' | 'stream' | 'game-bar' | 'co-op' | 'mkb' | 'touch-control' | 'loading-screen' | 'ui' | 'other' | 'advanced' | 'audio' | 'video' | 'controller' | 'native-mkb' | 'stats' | 'controller-shortcuts'; group: 'general' | 'server' | 'stream' | 'game-bar' | 'co-op' | 'mkb' | 'touch-control' | 'loading-screen' | 'ui' | 'other' | 'advanced' | 'footer' | 'audio' | 'video' | 'controller' | 'native-mkb' | 'stats' | 'controller-shortcuts';
label: string; label?: string;
note?: string | Text | null; note?: string | Text | null;
unsupported?: boolean; unsupported?: boolean;
helpUrl?: string; helpUrl?: string;
@ -274,7 +274,10 @@ export class SettingsNavigationDialog extends NavigationDialog {
}); });
}, },
}, },
],
}, {
group: 'footer',
items: [
// Donation link // Donation link
($parent) => { ($parent) => {
$parent.appendChild(CE('a', { $parent.appendChild(CE('a', {
@ -321,7 +324,7 @@ export class SettingsNavigationDialog extends NavigationDialog {
); );
$parent.appendChild($debugInfo); $parent.appendChild($debugInfo);
} },
], ],
}]; }];
@ -921,8 +924,8 @@ export class SettingsNavigationDialog extends NavigationDialog {
} }
// Don't render other settings in unsupported regions // Don't render other settings in unsupported regions
if (!this.renderFullSettings && settingTab.group === 'global' && settingTabContent.group !== 'general') { if (!this.renderFullSettings && settingTab.group === 'global' && settingTabContent.group !== 'general' && settingTabContent.group !== 'footer') {
break; continue;
} }
let label = settingTabContent.label; let label = settingTabContent.label;
@ -937,6 +940,7 @@ export class SettingsNavigationDialog extends NavigationDialog {
}); });
} }
if (label) {
const $title = CE('h2', { const $title = CE('h2', {
_nearby: { _nearby: {
orientation: 'horizontal', orientation: 'horizontal',
@ -952,6 +956,7 @@ export class SettingsNavigationDialog extends NavigationDialog {
); );
$tabContent.appendChild($title); $tabContent.appendChild($title);
}
// Add note // Add note
if (settingTabContent.note) { if (settingTabContent.note) {