* Fix: #919 リストの「Hide members in home」設定状況が、アカウントのリスト追加画面に表示されない * Fix lint
This commit is contained in:
parent
46b3fa48ae
commit
18fb6f7faa
1 changed files with 5 additions and 2 deletions
|
@ -6,6 +6,7 @@ import { isFulfilled } from '@reduxjs/toolkit';
|
|||
|
||||
import CloseIcon from '@/material-icons/400-24px/close.svg?react';
|
||||
import ListAltIcon from '@/material-icons/400-24px/list_alt.svg?react';
|
||||
import VisibilityOffIcon from '@/material-icons/400-24px/visibility_off.svg?react';
|
||||
import { fetchLists } from 'mastodon/actions/lists';
|
||||
import { createList } from 'mastodon/actions/lists_typed';
|
||||
import {
|
||||
|
@ -39,9 +40,10 @@ const messages = defineMessages({
|
|||
const ListItem: React.FC<{
|
||||
id: string;
|
||||
title: string;
|
||||
exclusive: boolean;
|
||||
checked: boolean;
|
||||
onChange: (id: string, checked: boolean) => void;
|
||||
}> = ({ id, title, checked, onChange }) => {
|
||||
}> = ({ id, title, exclusive, checked, onChange }) => {
|
||||
const handleChange = useCallback(
|
||||
(e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
onChange(id, e.target.checked);
|
||||
|
@ -50,10 +52,10 @@ const ListItem: React.FC<{
|
|||
);
|
||||
|
||||
return (
|
||||
// eslint-disable-next-line jsx-a11y/label-has-associated-control
|
||||
<label className='lists__item'>
|
||||
<div className='lists__item__title'>
|
||||
<Icon id='list-ul' icon={ListAltIcon} />
|
||||
{exclusive && <Icon id='eye-slash' icon={VisibilityOffIcon} />}
|
||||
<span>{title}</span>
|
||||
</div>
|
||||
|
||||
|
@ -199,6 +201,7 @@ const ListAdder: React.FC<{
|
|||
key={list.id}
|
||||
id={list.id}
|
||||
title={list.title}
|
||||
exclusive={list.exclusive}
|
||||
checked={listIds.includes(list.id)}
|
||||
onChange={handleToggle}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue