File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8989 :key =" key"
9090 class =" w-full"
9191 >
92- <div v-if =" Object.keys(promptsCategory).length > 0" class =" gap-4 mb-6" >
93- <p class =" text-start w-full text-xl font-bold" >{{ formatKey(key) }}</p >
92+ <div v-if =" Object.keys(promptsCategory).length > 0" class =" gap-4 mb-6 ml-1" >
93+ <p class =" text-start w-full text-xl font-bold mb-2" >{{
94+ key === "plainFieldsPrompts" ? "Prompts for non-image fields"
95+ : key === "generateImages" ? "Prompts for image fields"
96+ : "Prompts for image analysis"
97+ }}</p >
9498 <div class =" grid grid-cols-2 gap-4" >
9599 <div v-for =" (prompt, promptKey) in promptsCategory" :key =" promptKey" >
96100 {{ formatLabel(promptKey) }} prompt:
97101 <Textarea
98102 v-model =" generationPrompts [key ][promptKey ]"
99- class="w-full h-32 p-2 border border-gray-300 rounded-md resize-none focus:outline-none focus:ring-2 focus:ring-purple-500 ml-1 "
103+ class="w-full h-32 p-2 border border-gray-300 rounded-md resize-none focus:outline-none focus:ring-2 focus:ring-purple-500 "
100104 ></Textarea >
101105 <p class =" text-red-500 hover:underline hover:cursor-pointer mt-2" @click =" resetPromptToDefault(key, promptKey)" >reset to default</p >
102106 </div >
@@ -878,14 +882,6 @@ function clickSettingsButton() {
878882 popupMode .value = ' settings' ;
879883}
880884
881- function formatKey(str ) {
882- return str
883- .replace (/ ([A-Z ] )/ g , ' $1' )
884- .trim ()
885- .split (' ' )
886- .map (w => w .charAt (0 ).toUpperCase () + w .slice (1 ))
887- .join (' ' );
888- }
889885
890886function checkAndAddNewFieldsToPrompts(savedPrompts , defaultPrompts ) {
891887 for (const categoryKey in defaultPrompts ) {
You can’t perform that action at this time.
0 commit comments