Skip to content

Commit

Permalink
fixes missing channel edit actions
Browse files Browse the repository at this point in the history
  • Loading branch information
markdavella committed Apr 16, 2024
1 parent e633099 commit 8a06692
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions web/src/components/channel_config/ChannelEditActions.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Button from '@mui/material/Button';
import Stack from '@mui/material/Stack';
import { SaveChannelRequest } from '@tunarr/types';
import { useContext } from 'react';
import { ChannelEditContext } from '../../pages/channels/EditChannelContext.ts';
import { useFormContext } from 'react-hook-form';
import { SaveChannelRequest } from '@tunarr/types';
import { ChannelEditContext } from '../../pages/channels/EditChannelContext.ts';

export default function ChannelEditActions() {
const { channelEditorState } = useContext(ChannelEditContext)!;
Expand All @@ -17,7 +17,7 @@ export default function ChannelEditActions() {
{!channelEditorState.isNewChannel ? (
<>
<Button onClick={() => reset()} variant="outlined">
Reset Options
Reset Changes
</Button>
<Button disabled={!isValid} variant="contained" type="submit">
Save
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
} from '@mui/material';
import Box from '@mui/material/Box';
import Typography from '@mui/material/Typography';
import Grid2 from '@mui/material/Unstable_Grid2/Grid2';
import { SaveChannelRequest, Watermark } from '@tunarr/types';
import { isEmpty, isNil, isUndefined, map, round } from 'lodash-es';
import { useEffect, useState } from 'react';
Expand All @@ -25,13 +26,13 @@ import {
typedProperty,
} from '../../helpers/util.ts';
import { useFfmpegSettings } from '../../hooks/settingsHooks.ts';
import useStore from '../../store/index.ts';
import { ImageUploadInput } from '../settings/ImageUploadInput.tsx';
import {
CheckboxFormController,
NumericFormControllerText,
} from '../util/TypedController.tsx';
import { ImageUploadInput } from '../settings/ImageUploadInput.tsx';
import Grid2 from '@mui/material/Unstable_Grid2/Grid2';
import useStore from '../../store/index.ts';
import ChannelEditActions from './ChannelEditActions.tsx';

const resolutionOptions = [
{ value: '420x420', label: '420x420 (1:1)' },
Expand Down Expand Up @@ -421,6 +422,7 @@ export default function ChannelTranscodingConfig() {
)}
</FormControl>
</Stack>
<ChannelEditActions />
</Box>
)
);
Expand Down

0 comments on commit 8a06692

Please sign in to comment.