mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-07-15 17:02:58 +01:00
chore: Apply linting rules and add git hok (#611)
Co-authored-by: Fredrik Burmester <fredrik.burmester@gmail.com>
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import React, {useMemo} from "react";
|
||||
import { ViewProps } from "react-native";
|
||||
import { Stepper } from "@/components/inputs/Stepper";
|
||||
import DisabledSetting from "@/components/settings/DisabledSetting";
|
||||
import { useSettings } from "@/utils/atoms/settings";
|
||||
import type React from "react";
|
||||
import { useMemo } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import type { ViewProps } from "react-native";
|
||||
import { ListGroup } from "../list/ListGroup";
|
||||
import { ListItem } from "../list/ListItem";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import DisabledSetting from "@/components/settings/DisabledSetting";
|
||||
import {Stepper} from "@/components/inputs/Stepper";
|
||||
|
||||
interface Props extends ViewProps {}
|
||||
|
||||
@@ -16,18 +17,15 @@ export const MediaToggles: React.FC<Props> = ({ ...props }) => {
|
||||
|
||||
if (!settings) return null;
|
||||
|
||||
const disabled = useMemo(() => (
|
||||
const disabled = useMemo(
|
||||
() =>
|
||||
pluginSettings?.forwardSkipTime?.locked === true &&
|
||||
pluginSettings?.rewindSkipTime?.locked === true
|
||||
),
|
||||
[pluginSettings]
|
||||
)
|
||||
pluginSettings?.rewindSkipTime?.locked === true,
|
||||
[pluginSettings],
|
||||
);
|
||||
|
||||
return (
|
||||
<DisabledSetting
|
||||
disabled={disabled}
|
||||
{...props}
|
||||
>
|
||||
<DisabledSetting disabled={disabled} {...props}>
|
||||
<ListGroup title={t("home.settings.media_controls.media_controls_title")}>
|
||||
<ListItem
|
||||
title={t("home.settings.media_controls.forward_skip_length")}
|
||||
@@ -40,7 +38,7 @@ export const MediaToggles: React.FC<Props> = ({ ...props }) => {
|
||||
appendValue={t("home.settings.media_controls.seconds_unit")}
|
||||
min={0}
|
||||
max={60}
|
||||
onUpdate={(forwardSkipTime) => updateSettings({forwardSkipTime})}
|
||||
onUpdate={(forwardSkipTime) => updateSettings({ forwardSkipTime })}
|
||||
/>
|
||||
</ListItem>
|
||||
|
||||
@@ -55,7 +53,7 @@ export const MediaToggles: React.FC<Props> = ({ ...props }) => {
|
||||
appendValue={t("home.settings.media_controls.seconds_unit")}
|
||||
min={0}
|
||||
max={60}
|
||||
onUpdate={(rewindSkipTime) => updateSettings({rewindSkipTime})}
|
||||
onUpdate={(rewindSkipTime) => updateSettings({ rewindSkipTime })}
|
||||
/>
|
||||
</ListItem>
|
||||
</ListGroup>
|
||||
|
||||
Reference in New Issue
Block a user