mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-10 03:51:25 +00:00
multi-state icons
This commit is contained in:
1 parent
29ac201e0a
commit
17bb2b6464
1 file changed
+9
-22
@@ -6,7 +6,7 @@ import { ListTtsCategoriesForModeration, ListTtsCategoriesForModerationIsError,
|
||||
import { GravatarFc } from '../../_common/GravatarFc';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faBox, faLock } from '@fortawesome/free-solid-svg-icons';
|
||||
import { faBox, faBoxOpen, faLock } from '@fortawesome/free-solid-svg-icons';
|
||||
import { CategoryBreadcrumb } from '../../_common/CategoryBreadcrumb';
|
||||
|
||||
interface Props {
|
||||
@@ -100,13 +100,6 @@ function ModerationTtsCategoryListPage(props: Props) {
|
||||
return -1;
|
||||
});
|
||||
|
||||
//let ttsCategoriesSorted = ttsCategories.sort((first, second) => {
|
||||
// if (first.can_have_subcategories !== second.can_have_subcategories) {
|
||||
// return first.can_have_subcategories ? -1 : 1;
|
||||
// }
|
||||
// return first.name.localeCompare(second.name);
|
||||
//})
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h1 className="title is-1"> Moderate TTS Categories </h1>
|
||||
@@ -204,20 +197,14 @@ function ModerationTtsCategoryListPage(props: Props) {
|
||||
<> <FontAwesomeIcon icon={faLock} title={"mod only"} /></> :
|
||||
<></>;
|
||||
|
||||
let parentCategoryIcon = category.can_have_subcategories ?
|
||||
<><FontAwesomeIcon icon={faBox} title={"can have subcategories"} /> </> :
|
||||
<></>;
|
||||
|
||||
let name = <>{parentCategoryIcon}{category.name}{modOnlyIcon}</>;
|
||||
|
||||
if (!!category.maybe_dropdown_name) {
|
||||
name = (
|
||||
<>
|
||||
{parentCategoryIcon}{category.name}{modOnlyIcon}
|
||||
<br />
|
||||
({category.maybe_dropdown_name})
|
||||
</>
|
||||
);
|
||||
let parentCategoryIcon = <></>;
|
||||
|
||||
if (category.can_have_subcategories) {
|
||||
if (category.can_directly_have_models) {
|
||||
parentCategoryIcon = <><FontAwesomeIcon icon={faBoxOpen} title={"can have subcategories and models"} /> </>
|
||||
} else {
|
||||
parentCategoryIcon = <><FontAwesomeIcon icon={faBox} title={"can have subcategories"} /> </>
|
||||
}
|
||||
}
|
||||
|
||||
let creatorLink = <span />;
|
||||
|
||||
Reference in new issue
Block a user