Skip to content

Commit

Permalink
Add random uuid button
Browse files Browse the repository at this point in the history
  • Loading branch information
misode committed May 3, 2024
1 parent 1c629a4 commit a306213
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/schema/renderHtml.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ function StringSuffix({ path, getValues, config, node, value, lang, version, sta
{values.map(v => <option value={v} />)}
</datalist>}
{['generator_biome.biome'].includes(context) && <input type="color" value={rgbToHex(biomeColors[fullId] ?? VanillaColors[fullId] ?? stringToColor(fullId))} onChange={v => setBiomeColor(fullId, hexToRgb(v.currentTarget.value))}></input>}
{['attribute_modifier.id', 'text_component_object.hoverEvent.show_entity.contents.id'].includes(context) && <button onClick={() => path.set(generateUUID())} class="tooltipped tip-se" aria-label={localize(lang, 'generate_new_uuid')}>{Octicon.sync}</button>}
{['attribute_modifier.id', 'text_component_object.hoverEvent.show_entity.contents.id', 'enchantment.effects.entry.uuid'].includes(context) && <button onClick={() => path.set(generateUUID())} class="tooltipped tip-se" aria-label={localize(lang, 'generate_new_uuid')}>{Octicon.sync}</button>}
{gen && values.includes(value) && value.startsWith('minecraft:') &&
<a href={`/${gen.url}/?version=${version}&preset=${value.replace(/^minecraft:/, '')}`} class="tooltipped tip-se" aria-label={localize(lang, 'follow_reference')}>{Octicon.link_external}</a>}
</>
Expand Down

0 comments on commit a306213

Please sign in to comment.