mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-24 02:28:12 +00:00
Removed unused imports and variables
This commit is contained in:
parent
f6825418da
commit
a45c800718
2 changed files with 9 additions and 18 deletions
|
|
@ -1,30 +1,20 @@
|
|||
// Modal.js
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import API from '../../api';
|
||||
import useEPGsStore from '../../store/epgs';
|
||||
import {
|
||||
LoadingOverlay,
|
||||
TextInput,
|
||||
Button,
|
||||
Checkbox,
|
||||
Modal,
|
||||
Flex,
|
||||
NativeSelect,
|
||||
NumberInput,
|
||||
Space,
|
||||
Select,
|
||||
PasswordInput,
|
||||
Box,
|
||||
Group,
|
||||
Stack,
|
||||
MultiSelect,
|
||||
Switch,
|
||||
Text,
|
||||
Center,
|
||||
ActionIcon,
|
||||
} from '@mantine/core';
|
||||
import { RotateCcwKey, X } from 'lucide-react';
|
||||
import { isNotEmpty, useForm } from '@mantine/form';
|
||||
import { useForm } from '@mantine/form';
|
||||
import useChannelsStore from '../../store/channels';
|
||||
import { USER_LEVELS, USER_LEVEL_LABELS } from '../../constants';
|
||||
import useAuthStore from '../../store/auth';
|
||||
|
|
@ -34,7 +24,7 @@ const User = ({ user = null, isOpen, onClose }) => {
|
|||
const authUser = useAuthStore((s) => s.user);
|
||||
const setUser = useAuthStore((s) => s.setUser);
|
||||
|
||||
const [enableXC, setEnableXC] = useState(false);
|
||||
const [, setEnableXC] = useState(false);
|
||||
const [selectedProfiles, setSelectedProfiles] = useState(new Set());
|
||||
|
||||
const form = useForm({
|
||||
|
|
@ -84,7 +74,7 @@ const User = ({ user = null, isOpen, onClose }) => {
|
|||
const onSubmit = async () => {
|
||||
const values = form.getValues();
|
||||
|
||||
const { xc_password, ...customProps } = JSON.parse(
|
||||
const { ...customProps } = JSON.parse(
|
||||
user?.custom_properties || '{}'
|
||||
);
|
||||
|
||||
|
|
@ -193,7 +183,7 @@ const User = ({ user = null, isOpen, onClose }) => {
|
|||
{showPermissions && (
|
||||
<Select
|
||||
label="User Level"
|
||||
data={Object.entries(USER_LEVELS).map(([label, value]) => {
|
||||
data={Object.entries(USER_LEVELS).map(([, value]) => {
|
||||
return {
|
||||
label: USER_LEVEL_LABELS[value],
|
||||
value: `${value}`,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useEffect, useMemo, useCallback, useState } from 'react';
|
||||
import React, { useMemo, useCallback, useState } from 'react';
|
||||
import API from '../../api';
|
||||
import UserForm from '../forms/User';
|
||||
import useUsersStore from '../../store/users';
|
||||
|
|
@ -147,6 +147,7 @@ const UsersTable = () => {
|
|||
{
|
||||
header: 'Username',
|
||||
accessorKey: 'username',
|
||||
size: 150,
|
||||
cell: ({ getValue }) => (
|
||||
<Box
|
||||
style={{
|
||||
|
|
@ -193,7 +194,7 @@ const UsersTable = () => {
|
|||
{
|
||||
header: 'Date Joined',
|
||||
accessorKey: 'date_joined',
|
||||
size: 120,
|
||||
size: 125,
|
||||
cell: ({ getValue }) => {
|
||||
const date = getValue();
|
||||
return (
|
||||
|
|
@ -219,7 +220,7 @@ const UsersTable = () => {
|
|||
{
|
||||
header: 'XC Password',
|
||||
accessorKey: 'custom_properties',
|
||||
size: 120,
|
||||
size: 125,
|
||||
enableSorting: false,
|
||||
cell: ({ getValue, row }) => {
|
||||
const userId = row.original.id;
|
||||
|
|
@ -317,7 +318,7 @@ const UsersTable = () => {
|
|||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
padding: '20px',
|
||||
padding: '0px',
|
||||
minHeight: '100vh',
|
||||
}}
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue