mirror of
https://github.com/zimplexing/OrionTV.git
synced 2026-03-02 16:57:32 +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:
@@ -65,12 +65,13 @@ export default function RootLayout() {
|
||||
}, [loaded, lastCheckTime, checkForUpdate]);
|
||||
|
||||
useEffect(() => {
|
||||
if (remoteInputEnabled) {
|
||||
// 只有在非手机端才启动远程控制服务器
|
||||
if (remoteInputEnabled && responsiveConfig.deviceType !== "mobile") {
|
||||
startServer();
|
||||
} else {
|
||||
stopServer();
|
||||
}
|
||||
}, [remoteInputEnabled, startServer, stopServer]);
|
||||
}, [remoteInputEnabled, startServer, stopServer, responsiveConfig.deviceType]);
|
||||
|
||||
if (!loaded && !error) {
|
||||
return null;
|
||||
|
||||
@@ -86,7 +86,8 @@ export default function SettingsScreen() {
|
||||
};
|
||||
|
||||
const sections = [
|
||||
{
|
||||
// 远程输入配置 - 仅在非手机端显示
|
||||
deviceType !== "mobile" && {
|
||||
component: (
|
||||
<RemoteInputSection
|
||||
onChanged={markAsChanged}
|
||||
@@ -103,6 +104,7 @@ export default function SettingsScreen() {
|
||||
<APIConfigSection
|
||||
ref={apiSectionRef}
|
||||
onChanged={markAsChanged}
|
||||
hideDescription={deviceType === "mobile"}
|
||||
onFocus={() => {
|
||||
setCurrentFocusIndex(1);
|
||||
setCurrentSection("api");
|
||||
@@ -111,7 +113,8 @@ export default function SettingsScreen() {
|
||||
),
|
||||
key: "api",
|
||||
},
|
||||
{
|
||||
// 直播源配置 - 仅在非手机端显示
|
||||
deviceType !== "mobile" && {
|
||||
component: (
|
||||
<LiveStreamSection
|
||||
ref={liveStreamSectionRef}
|
||||
|
||||
Reference in New Issue
Block a user