Refactor recipe metadata handling and update CSS styles

- Moved the recipe metadata appending logic to occur after the JSON creation for better workflow.
- Adjusted the user comment formatting in ExifUtils to include a newline for improved readability.
- Reduced the maximum height of the recipe modal bottom section for better layout consistency.
This commit is contained in:
Will Miao
2025-03-20 19:53:05 +08:00
parent 6a10cda61f
commit 5cfae7198d
4 changed files with 7 additions and 7 deletions

View File

@@ -220,7 +220,7 @@
/* Bottom Section: Resources */
.recipe-bottom-section {
max-height: 340px;
max-height: 320px;
display: flex;
flex-direction: column;
border-top: 1px solid var(--border-color);

View File

@@ -354,9 +354,9 @@ export class ImportManager {
this.updateTagsDisplay();
}
} else if (this.recipeData && this.recipeData.gen_params && this.recipeData.gen_params.prompt) {
// Use the first 15 words from the prompt as the default recipe name
// Use the first 10 words from the prompt as the default recipe name
const promptWords = this.recipeData.gen_params.prompt.split(' ');
const truncatedPrompt = promptWords.slice(0, 15).join(' ');
const truncatedPrompt = promptWords.slice(0, 10).join(' ');
recipeName.value = truncatedPrompt;
this.recipeName = truncatedPrompt;