mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 09:28:11 +00:00
add warning to model view
This commit is contained in:
1 parent
d9b9849344
commit
b21a5fefca
1 file changed
+17
-1
@@ -14,6 +14,8 @@ import { GravatarFc } from '../../_common/GravatarFc';
|
||||
import { GetTtsModelUseCount } from '../../../api/tts/GetTtsModelUseCount';
|
||||
import { BackLink } from '../../_common/BackLink';
|
||||
import { ListTtsCategoriesForModel, ListTtsCategoriesForModelIsError, ListTtsCategoriesForModelIsOk, TtsModelCategory } from '../../../api/category/ListTtsCategoriesForModel';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faExclamationCircle } from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
interface Props {
|
||||
sessionWrapper: SessionWrapper,
|
||||
@@ -264,9 +266,23 @@ function TtsModelViewFc(props: Props) {
|
||||
<div className="content">
|
||||
<ul>
|
||||
{assignedCategories.map(category => {
|
||||
let notApprovedWarning = null;
|
||||
|
||||
if (!category.is_mod_approved) {
|
||||
notApprovedWarning = (
|
||||
<>
|
||||
<span className="tag is-rounded is-warning is-medium is-light">
|
||||
Not Mod Approved
|
||||
|
||||
<FontAwesomeIcon icon={faExclamationCircle} />
|
||||
</span>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<li>{category.name}</li>
|
||||
<li>{category.name} {notApprovedWarning}</li>
|
||||
</>
|
||||
);
|
||||
})}
|
||||
|
||||
Reference in new issue
Block a user