diff --git a/README.md b/README.md index 9533812..9fde835 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -**TL;DR:** [Nerd Web](http://57.129.69.232/) is a new web interface for all gen2 commands with preview features, a cheat sheet, and more coming soon. +**TL;DR:** [Nerd Web](https://nerdweb.socksm.dev/) is a new web interface for all gen2 commands with preview features, a cheat sheet, and more coming soon. # Nerd Web (Beta) Hello Nerds, today I'm happy to announce Nerd Web beta. A tool for using the bot with a web based interface. @@ -25,17 +25,15 @@ Current Features: PreviewFeature.png
- Share generator inputs feature - You can easily click a button and send the link to someone, and it will share the inputs you gave for a certain gen - -Planned features: -- A generator history saved in the cookies. -- Keep input upon refresh (ties into the above.) +- A generator history + - You can easily view your past generations and their inputs, and even click a button to copy the inputs to the generator again. ## Bugs For bug reporting [create a new issue](https://github.com/SkyBlock-Nerds/NerdWeb/issues/new) in the repo. ## Website: Ready to try it? Here you go:
-[NerdWeb Beta](http://57.129.69.232/)
+[NerdWeb](https://nerdweb.socksm.dev/)
Currently it's not being run on a Domain name. I plan on later buying a domain and linking it to this website.
This does however mean that it's "not secure". What does this mean? In the current state of the application, not much. The secure tag is mainly there to encrypt traffic between the website and the host. However, no sensitive information is being transmitted so it doesn't matter for now. diff --git a/package-lock.json b/package-lock.json index 4cd6845..86b070d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1824,9 +1824,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "dev": true, "license": "MIT", "dependencies": { @@ -1996,14 +1996,14 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.6.tgz", - "integrity": "sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.15.0.tgz", + "integrity": "sha512-wWyJDlAatxk30ZJer+GeCWS209sA42X+N5jU2jy6oHTp7ufw8uzUTVFBX9+wTfAlhiJXGS0Bq7X6efruWjuK9Q==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.11", "form-data": "^4.0.5", - "proxy-from-env": "^1.1.0" + "proxy-from-env": "^2.1.0" } }, "node_modules/balanced-match": { @@ -2033,9 +2033,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", + "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", "dev": true, "license": "MIT", "dependencies": { @@ -2718,9 +2718,9 @@ } }, "node_modules/flatted": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", - "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", + "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", "dev": true, "license": "ISC" }, @@ -3362,9 +3362,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", "dev": true, "license": "MIT", "engines": { @@ -3438,10 +3438,13 @@ } }, "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "license": "MIT" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } }, "node_modules/punycode": { "version": "2.3.1", @@ -3808,9 +3811,9 @@ } }, "node_modules/tinyglobby/node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "dev": true, "license": "MIT", "peer": true, @@ -3974,9 +3977,9 @@ } }, "node_modules/vite": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz", - "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.2.tgz", + "integrity": "sha512-2N/55r4JDJ4gdrCvGgINMy+HH3iRpNIz8K6SFwVsA+JbQScLiC+clmAxBgwiSPgcG9U15QmvqCGWzMbqda5zGQ==", "dev": true, "license": "MIT", "peer": true, @@ -4065,9 +4068,9 @@ } }, "node_modules/vite/node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "dev": true, "license": "MIT", "peer": true, diff --git a/src/assets/image-generator/dialogue_multi.png b/src/assets/image-generator/dialogue_multi.png index 30123a3..01c4d73 100644 Binary files a/src/assets/image-generator/dialogue_multi.png and b/src/assets/image-generator/dialogue_multi.png differ diff --git a/src/assets/image-generator/dialogue_single.png b/src/assets/image-generator/dialogue_single.png index 7b1a098..a770c38 100644 Binary files a/src/assets/image-generator/dialogue_single.png and b/src/assets/image-generator/dialogue_single.png differ diff --git a/src/components/input-fields/impl/custom/MultiNpcDialogueLineField.tsx b/src/components/input-fields/impl/custom/MultiNpcDialogueLineField.tsx index 6e53121..0e11421 100644 --- a/src/components/input-fields/impl/custom/MultiNpcDialogueLineField.tsx +++ b/src/components/input-fields/impl/custom/MultiNpcDialogueLineField.tsx @@ -2,13 +2,20 @@ import MultiDialogueLine from "../../../../api-client/api-models/generator/submo import DropdownField from "../../DropdownField.tsx"; import SmallTextField from "../../SmallTextField.tsx"; import StyleCodeParser from "../../../style-code-parser/StyleCodeParser.tsx"; +import { CreateNpcTag } from "../../../../utils/CreateNpcTag.ts"; -function MultiNpcDialogueLineField({npcNames, dialogueLine, setDialogueLine, onRemove}: { +function MultiNpcDialogueLineField({npcNames, dialogueLine, setDialogueLine, onRemove, abiphone}: { npcNames: string[]; dialogueLine: MultiDialogueLine; setDialogueLine: (value: MultiDialogueLine) => void; onRemove: () => void; + abiphone: boolean; }) { + let npcName = "NPC Name"; + if (dialogueLine.npcIndex && dialogueLine.npcIndex < npcNames.length && dialogueLine.npcIndex >= 0) { + npcName = npcNames[dialogueLine.npcIndex]; + } + return ( <> @@ -16,7 +23,6 @@ function MultiNpcDialogueLineField({npcNames, dialogueLine, setDialogueLine, onR
{ const npcIndex = npcNames.indexOf(selectedValue); if (npcIndex !== -1) { @@ -45,7 +51,7 @@ function MultiNpcDialogueLineField({npcNames, dialogueLine, setDialogueLine, onR Remove
- + ); diff --git a/src/components/input-fields/impl/custom/SingleNpcDialogueLineField.tsx b/src/components/input-fields/impl/custom/SingleNpcDialogueLineField.tsx index 7978f83..0473be0 100644 --- a/src/components/input-fields/impl/custom/SingleNpcDialogueLineField.tsx +++ b/src/components/input-fields/impl/custom/SingleNpcDialogueLineField.tsx @@ -3,10 +3,11 @@ import SmallTextField from "../../SmallTextField.tsx"; import StyleCodeParser from "../../../style-code-parser/StyleCodeParser.tsx"; -function SingleNpcDialogueLineField({dialogueLine, setDialogueLine, onRemove}: { +function SingleNpcDialogueLineField({dialogueLine, setDialogueLine, onRemove, npcNameFormatted}: { dialogueLine: string; setDialogueLine: (value: string) => void; onRemove: () => void + npcNameFormatted: string; }) { return ( <> @@ -30,7 +31,7 @@ function SingleNpcDialogueLineField({dialogueLine, setDialogueLine, onRemove}: { Remove - + ); diff --git a/src/components/input-fields/impl/custom/list/MultiNpcDialogueLineListField.tsx b/src/components/input-fields/impl/custom/list/MultiNpcDialogueLineListField.tsx index 1dd7cf1..a47f2c8 100644 --- a/src/components/input-fields/impl/custom/list/MultiNpcDialogueLineListField.tsx +++ b/src/components/input-fields/impl/custom/list/MultiNpcDialogueLineListField.tsx @@ -9,10 +9,11 @@ type LocalLine = { data: MultiDialogueLine; }; -function MultiNpcDialogueLineListField({setValue, npcNames, value = []}: { +function MultiNpcDialogueLineListField({setValue, npcNames, value = [], abiphone}: { npcNames: string[]; setValue: (value: MultiDialogueLine[]) => void; value?: MultiDialogueLine[]; + abiphone: boolean; }) { const [lines, setLines] = useState( value.map((line) => ({ id: uuid(), data: line })) @@ -42,6 +43,7 @@ function MultiNpcDialogueLineListField({setValue, npcNames, value = []}: { setDialogueLine={(updatedItem) => handleSetInventoryItem(index, updatedItem)} onRemove={() => handleRemoveLine(index)} npcNames={npcNames} + abiphone={abiphone} /> ))} diff --git a/src/components/input-fields/impl/custom/list/SingleNpcDialogueLineListField.tsx b/src/components/input-fields/impl/custom/list/SingleNpcDialogueLineListField.tsx index 368ee97..702ed81 100644 --- a/src/components/input-fields/impl/custom/list/SingleNpcDialogueLineListField.tsx +++ b/src/components/input-fields/impl/custom/list/SingleNpcDialogueLineListField.tsx @@ -8,9 +8,10 @@ type LocalLine = { data: string; }; -function SingleNpcDialogueLineListField({setValue, value = []}: { +function SingleNpcDialogueLineListField({setValue, value = [], npcNameFormatted}: { setValue: (value: string[]) => void; value?: string[]; + npcNameFormatted: string; }) { const [lines, setLines] = useState( value.map((line) => ({ id: uuid(), data: line })) @@ -39,6 +40,7 @@ function SingleNpcDialogueLineListField({setValue, value = []}: { dialogueLine={itemWrapper.data} setDialogueLine={(updatedItem) => handleSetInventoryItem(index, updatedItem)} onRemove={() => handleRemoveLine(index)} + npcNameFormatted={npcNameFormatted} /> ))} diff --git a/src/pages/image-generator/generator/MultiDialogueGenerator.tsx b/src/pages/image-generator/generator/MultiDialogueGenerator.tsx index 5b5a805..9d72aab 100644 --- a/src/pages/image-generator/generator/MultiDialogueGenerator.tsx +++ b/src/pages/image-generator/generator/MultiDialogueGenerator.tsx @@ -40,6 +40,7 @@ function MultiDialogueGenerator() { return updatedRequest; }) } + abiphone={currentRequest.abiphone || false} />
diff --git a/src/pages/image-generator/generator/SingleDialogueGenerator.tsx b/src/pages/image-generator/generator/SingleDialogueGenerator.tsx index 065cd81..560cff9 100644 --- a/src/pages/image-generator/generator/SingleDialogueGenerator.tsx +++ b/src/pages/image-generator/generator/SingleDialogueGenerator.tsx @@ -7,6 +7,7 @@ import AbiphoneField from "../../../components/input-fields/impl/checkbox/Abipho import SingleNpcDialogueLineListField from "../../../components/input-fields/impl/custom/list/SingleNpcDialogueLineListField.tsx"; import { useLocation } from "react-router-dom"; import { ensureInstanceOf } from "../../../utils/ensureInstanceOf.ts"; +import { CreateNpcTag } from "../../../utils/CreateNpcTag.ts"; function SingleDialogueGenerator() { const location = useLocation(); @@ -40,6 +41,7 @@ function SingleDialogueGenerator() { return updatedRequest; }) } + npcNameFormatted={CreateNpcTag(currentRequest.npcName || "NPC Name", currentRequest.abiphone || false) + "&f"} />
diff --git a/src/utils/CreateNpcTag.ts b/src/utils/CreateNpcTag.ts new file mode 100644 index 0000000..6f29a39 --- /dev/null +++ b/src/utils/CreateNpcTag.ts @@ -0,0 +1,6 @@ +export function CreateNpcTag(npcName: string, abiphone: boolean = false) +{ + let str = `&e[NPC] ${npcName}&f: `; + if (abiphone) str += `&b✆ `; + return str; +}