text2image-gui icon indicating copy to clipboard operation
text2image-gui copied to clipboard

Import prompt and settings from clipboard

Open RafaelEstevamReis opened this issue 2 years ago • 0 comments

A lot of places publishes their prompts in the same format

[Positive]
Negative Prompt: [negative]
[settings]

This small PR parses a prompt in the clipboard and updates the UI

I tried to keep all styles and structure

  • I used OsUtils.cs to check for clipboard content
  • I used Data.TtiSettings to transport and migrate the settings
  • I used FormParsing.LoadTtiSettingsIntoUi to update the UI
  • All "old" settings params will be preserved if no new value is present in the settings list

I did not know a good place to put the action, so I placed it inside the Dev menu as Import prompt from clipboard

If I miss anything, let me know Thanks in advance

RafaelEstevamReis avatar Feb 08 '23 19:02 RafaelEstevamReis