mirror of
https://github.com/zimplexing/OrionTV.git
synced 2026-02-21 08:58:17 +08:00
feat(mobile): optimize mobile experience by hiding non-essential features
- Hide live streaming tab in mobile navigation components - Hide remote input and live stream configurations in settings - Hide API configuration description text on mobile - Disable HTTP server startup on mobile devices to save resources This streamlines the mobile interface while preserving full functionality on tablet and TV platforms.
This commit is contained in:
@@ -24,7 +24,12 @@ const tabs: TabItem[] = [
|
||||
const MobileBottomTabNavigator: React.FC = () => {
|
||||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
const { spacing } = useResponsiveLayout();
|
||||
const { spacing, deviceType } = useResponsiveLayout();
|
||||
|
||||
// 在手机端过滤掉直播 tab
|
||||
const filteredTabs = tabs.filter(tab =>
|
||||
deviceType !== 'mobile' || tab.key !== 'live'
|
||||
);
|
||||
|
||||
const handleTabPress = (route: string) => {
|
||||
if (route === '/') {
|
||||
@@ -44,7 +49,7 @@ const MobileBottomTabNavigator: React.FC = () => {
|
||||
|
||||
return (
|
||||
<View style={dynamicStyles.container}>
|
||||
{tabs.map((tab) => {
|
||||
{filteredTabs.map((tab) => {
|
||||
const isActive = isTabActive(tab.route);
|
||||
const IconComponent = tab.icon;
|
||||
|
||||
|
||||
@@ -28,7 +28,12 @@ interface MobileTabContainerProps {
|
||||
const MobileTabContainer: React.FC<MobileTabContainerProps> = ({ children }) => {
|
||||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
const { spacing } = useResponsiveLayout();
|
||||
const { spacing, deviceType } = useResponsiveLayout();
|
||||
|
||||
// 在手机端过滤掉直播 tab
|
||||
const filteredTabs = tabs.filter(tab =>
|
||||
deviceType !== 'mobile' || tab.key !== 'live'
|
||||
);
|
||||
|
||||
const handleTabPress = (route: string) => {
|
||||
if (route === '/') {
|
||||
@@ -55,7 +60,7 @@ const MobileTabContainer: React.FC<MobileTabContainerProps> = ({ children }) =>
|
||||
|
||||
{/* 底部导航栏 */}
|
||||
<View style={dynamicStyles.tabBar}>
|
||||
{tabs.map((tab) => {
|
||||
{filteredTabs.map((tab) => {
|
||||
const isActive = isTabActive(tab.route);
|
||||
const IconComponent = tab.icon;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user