From 9f52f41d56cb981851fc4fd7c19f5c3c49824cc6 Mon Sep 17 00:00:00 2001 From: Roland Date: Wed, 30 Nov 2022 19:31:18 -0700 Subject: [PATCH] Reformatting Channel page to display buttons better on mobile. Creating BackButton to consolidate functionality. Expanding search input on mobile. --- app/src/Dashboard.js | 23 +- app/src/components/Archive.js | 3 +- app/src/components/Channels.js | 399 +++++++++++++++--------------- app/src/components/Common.js | 9 +- app/src/components/VideoPlayer.js | 12 +- app/src/components/Videos.js | 14 +- 6 files changed, 235 insertions(+), 225 deletions(-) diff --git a/app/src/Dashboard.js b/app/src/Dashboard.js index ea0c0dea..87530ca8 100644 --- a/app/src/Dashboard.js +++ b/app/src/Dashboard.js @@ -9,6 +9,7 @@ import {Link} from "react-router-dom"; import {BandwidthProgressCombined, CPUUsageProgress} from "./components/admin/Status"; import {ProgressPlaceholder} from "./components/Placeholder"; import {Divider} from "semantic-ui-react"; +import Grid from "semantic-ui-react/dist/commonjs/collections/Grid"; export function Dashboard() { useTitle('Dashboard'); @@ -35,14 +36,20 @@ export function Dashboard() { } return ( - + + + + + + + {body} ) } diff --git a/app/src/components/Archive.js b/app/src/components/Archive.js index aa4cef07..6895daef 100644 --- a/app/src/components/Archive.js +++ b/app/src/components/Archive.js @@ -14,6 +14,7 @@ import { TableRow } from "semantic-ui-react"; import { + BackButton, CardLink, defaultSearchOrder, ExternalCardLink, @@ -140,7 +141,7 @@ function ArchivePage() { return ( <> - + } - - - - - - - - - - - Advanced Settings - - - -
- The following settings are encouraged by default, modify them at your own risk. -
- - - -
-
-
- - - {header} + + + + + changeValue('name', value)} /> - + + + changeValue('directory', value)} + placeholder='videos/channel directory' /> - - - - - - {!create && - <> - - setDeleteOpen(false)} - onConfirm={handleDeleteConfirm} + + + { + create !== undefined && + + {/* Empty field*/} + + + { + handleCheckbox(null, {name: 'mkdir', checked: i}) + }} /> - - - - - - - } - - - - {channel.statistics && } + + + + } + + + + + + + + + + + + + + + + + Advanced Settings + + + +
+ The following settings are encouraged by default, modify them at your own risk. +
+ + + +
+
+
+ + + + + + + + {!create && + <> + + setDeleteOpen(false)} + onConfirm={handleDeleteConfirm} + /> + + + + } + + + + + + + + + +
+ {channel.statistics && } +
} @@ -494,28 +498,27 @@ export function Channels() { setSearchStr(value); } - let header = - -
Channels
-
- - - - - - - - - - - ; -
; + let header =
+
Channels
+ + + + + + + + + + + + +
; let tableHeader = diff --git a/app/src/components/Common.js b/app/src/components/Common.js index 7e63fb06..ca2c23a2 100644 --- a/app/src/components/Common.js +++ b/app/src/components/Common.js @@ -1,6 +1,6 @@ import React, {useContext, useEffect, useState} from "react"; import {Card, Container, IconGroup, Image, Input, Modal, Pagination, Responsive} from 'semantic-ui-react'; -import {Link, NavLink} from "react-router-dom"; +import {Link, NavLink, useNavigate} from "react-router-dom"; import Message from "semantic-ui-react/dist/commonjs/collections/Message"; import {useDirectories, useDownloaders, useHotspot, useSettings, useThrottle} from "../hooks/customHooks"; import {StatusContext, ThemeContext} from "../contexts/contexts"; @@ -344,7 +344,7 @@ export function SearchInput({ } return
- setValue(e.target.value)} @@ -740,3 +740,8 @@ export function DirectoryInput({disabled, error, placeholder, setInput, value, r ); } + +export const BackButton = () => { + const navigate = useNavigate(); + return + +