Skip to content

Commit

Permalink
Mark nsfw outfits in novel builder
Browse files Browse the repository at this point in the history
  • Loading branch information
miku448 committed Sep 22, 2024
1 parent a28e417 commit b07548b
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion apps/novel-builder/src/modals/character/CharacterOutfitsEdit.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import React, { useState } from 'react';

import { Accordion, AccordionItem, AreYouSure, Button, DragAndDropImages, Dropdown, Input } from '@mikugg/ui-kit';
import {
Accordion,
AccordionItem,
AreYouSure,
Button,
CheckBox,
DragAndDropImages,
Dropdown,
Input,
} from '@mikugg/ui-kit';

import { checkFileType } from '../../libs/utils';

Expand Down Expand Up @@ -54,6 +63,7 @@ export default function CharacterOutfitsEdit({ characterId }: { characterId?: st
description: '',
attributes: [],
template: 'single-emotion',
nsfw: 0,
emotions: [
{
id: 'neutral',
Expand Down Expand Up @@ -331,6 +341,20 @@ export default function CharacterOutfitsEdit({ characterId }: { characterId?: st
onChange={(event) => handleMultipleImageChange(event, groupIndex)}
/>
</div>
<div className="CharacterOutfitsEdit__formGroup">
<CheckBox
label="Mark as NSFW outfit"
value={!!group.nsfw}
onChange={(e) => {
const newGroups = [...outfits];
newGroups[groupIndex] = {
...newGroups[groupIndex],
nsfw: e.target.checked ? 1 : 0,
};
dispatch(updateCharacter(decorateCharacterWithOutfits(newGroups)));
}}
/>
</div>
<div className="CharacterOutfitsEdit__formGroup">
<label htmlFor={`group_${groupIndex}_emotionsHash`}>Emotion Set:</label>
<Dropdown
Expand Down

0 comments on commit b07548b

Please sign in to comment.