diff --git a/app/src/components/Common.js b/app/src/components/Common.js index 25706641..7792d1fc 100644 --- a/app/src/components/Common.js +++ b/app/src/components/Common.js @@ -44,7 +44,7 @@ import { import {FilePreviewContext} from "./FilePreview"; import _ from "lodash"; import {killDownloads, startDownloads, unlockCookies} from "../api"; -import {allFrequencyOptions, NAME, semanticUIColorMap, validUrlRegex} from "./Vars"; +import {allFrequencyOptions, HELP_VIEWER_URI, NAME, semanticUIColorMap, validUrlRegex} from "./Vars"; import Grid from "semantic-ui-react/dist/commonjs/collections/Grid"; export function Paginator({activePage, onPageChange, totalPages, showFirstAndLast, size = 'mini'}) { @@ -903,6 +903,51 @@ export function InfoHeader({ } +export function HelpModal({ + icon = 'help circle', + iconSize = null, + iconStyle = {margin: '0.5em'}, + helpPath, + title = null, + modalSize = 'fullscreen', + }) { + const [open, setOpen] = useState(false); + const src = `${HELP_VIEWER_URI}${helpPath}`; + const style = {position: 'relative', height: '75vh', width: '100%', border: 'none'}; + + return <> + setOpen(true)}/> + setOpen(false)} size={modalSize} closeIcon> + {title && {title}} + + + + + +} + +export function HelpHeader({ + icon, + headerSize = 'h2', + iconSize, + headerContent, + helpPath, + helpTitle, + helpModalProps = {}, + for_ = null, + required = false, + ...props + }) { + return
+ + + + +
+} + export function HotspotToggle() { let {on, setHotspot} = useHotspot(); const disabled = on === null; diff --git a/app/src/components/Videos.js b/app/src/components/Videos.js index c6dafe3c..8bf27e94 100644 --- a/app/src/components/Videos.js +++ b/app/src/components/Videos.js @@ -12,6 +12,7 @@ import { findPosterPath, humanFileSize, humanNumber, + HelpHeader, InfoHeader, isoDatetimeToAgoPopup, mimetypeColor, @@ -65,7 +66,7 @@ import { } from "../api"; import {Media, QueryContext, ThemeContext} from "../contexts/contexts"; import _ from "lodash"; -import {defaultFileOrder, defaultSearchOrder, HELP_VIEWER_URI} from "./Vars"; +import {defaultFileOrder, defaultSearchOrder} from "./Vars"; import {InputForm, ToggleForm, useForm} from "../hooks/useForm"; import {VideoFormatSelectorForm, VideoResolutionSelectorForm} from "./Download"; import {BatchReorganizeModal} from "./collections/BatchReorganizeModal"; @@ -645,24 +646,12 @@ function CookiesSettingsSection() { return ; }; - const popupContent =
-

Upload cookies exported from your browser to allow yt-dlp to download videos that require authentication.

-

Browser extensions for exporting cookies:

- -

Cookies are encrypted with AES-128 and stored securely. You'll need to unlock them with your password after each restart.

-
; - return -
- -
+

Use this feature at your own risk! You may be suspended or blocked if abused!

diff --git a/app/src/components/admin/Settings.js b/app/src/components/admin/Settings.js index 23817fbe..f040a32a 100644 --- a/app/src/components/admin/Settings.js +++ b/app/src/components/admin/Settings.js @@ -7,6 +7,7 @@ import {ButtonGroup, Container, Dimmer, Dropdown, GridColumn, GridRow, Icon, Inp import { APIButton, ErrorMessage, + HelpHeader, InfoPopup, RefreshHeader, Toggle, @@ -817,7 +818,11 @@ export function SettingsPage() { -
Root CA Certificate
+

Install the WROLPi Root CA certificate on your devices to trust all HTTPS connections to this WROLPi. You only need to do this once per device.