Added impersonation for admins
This commit is contained in:
@ -14,7 +14,7 @@ import { Label } from "@/components/ui/label";
|
||||
import { Checkbox } from "@/components/ui/checkbox";
|
||||
import voices from "@/data/tts";
|
||||
|
||||
const TTSFiltersPage = () => {
|
||||
const TTSVoiceFiltersPage = () => {
|
||||
const { data: session, status } = useSession();
|
||||
const [loading, setLoading] = useState<boolean>(true)
|
||||
|
||||
@ -88,7 +88,7 @@ const TTSFiltersPage = () => {
|
||||
<CommandGroup>
|
||||
{voices.map((voice) => (
|
||||
<CommandItem
|
||||
key={voice.value}
|
||||
key={voice.value + "-" + voice.label}
|
||||
value={voice.value}
|
||||
onSelect={(currentValue) => {
|
||||
setValue(Number.parseInt(currentValue))
|
||||
@ -115,7 +115,7 @@ const TTSFiltersPage = () => {
|
||||
<p className="text-xl text-center justify-center">Voices Enabled</p>
|
||||
<div className="grid grid-cols-4 grid-flow-row gap-4 pt-[20px]">
|
||||
{voices.map((v, i) => (
|
||||
<div className="h-[30px] row-span-1 col-span-1 align-middle flex items-center justify-center">
|
||||
<div key={v.label + "-enabled"} className="h-[30px] row-span-1 col-span-1 align-middle flex items-center justify-center">
|
||||
<Checkbox onClick={() => {
|
||||
const newVal = enabled ^ (1 << (Number.parseInt(v.value) - 1))
|
||||
setEnabled(newVal)
|
||||
@ -132,4 +132,4 @@ const TTSFiltersPage = () => {
|
||||
);
|
||||
}
|
||||
|
||||
export default TTSFiltersPage;
|
||||
export default TTSVoiceFiltersPage;
|
Reference in New Issue
Block a user