diff options
author | bobzel <zzzman@gmail.com> | 2025-03-05 19:26:31 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2025-03-05 19:26:31 -0500 |
commit | b38b2ee7826550ccd0960ef95016e81f1d930798 (patch) | |
tree | 6cda57eb4d25df3eee7c2003d40ebf3756a6bbe4 /src/client/views/smartdraw/SmartDrawHandler.tsx | |
parent | 466f1967af7583654de4d57fb89efe5b70630dbd (diff) | |
parent | 436b3def89ea955e2ff30fe8c2e9d15092e8c9a9 (diff) |
Merge branch 'master' into Merge
Diffstat (limited to 'src/client/views/smartdraw/SmartDrawHandler.tsx')
-rw-r--r-- | src/client/views/smartdraw/SmartDrawHandler.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/views/smartdraw/SmartDrawHandler.tsx b/src/client/views/smartdraw/SmartDrawHandler.tsx index ca308015d..1cceabed3 100644 --- a/src/client/views/smartdraw/SmartDrawHandler.tsx +++ b/src/client/views/smartdraw/SmartDrawHandler.tsx @@ -28,6 +28,7 @@ import { FireflyDimensionsMap, FireflyImageData, FireflyImageDimensions } from ' import './SmartDrawHandler.scss'; import { Upload } from '../../../server/SharedMediaTypes'; import { PointData } from '../../../pen-gestures/GestureTypes'; +import { List } from '../../../fields/List'; export interface DrawingOptions { text?: string; @@ -293,15 +294,17 @@ export class SmartDrawHandler extends ObservableReactComponent<object> { return undefined; } const newseed = img.accessPaths.agnostic.client.match(/\/(\d+)upload/)?.[1]; - const imgDoc: Doc = Docs.Create.ImageDocument(img.accessPaths.agnostic.client, { + return Docs.Create.ImageDocument(img.accessPaths.agnostic.client, { title: input, nativeWidth: dims.width, nativeHeight: dims.height, + tags: new List<string>(['@ai']), + _width: Math.min(400, dims.width), + _height: (Math.min(400, dims.width) * dims.height) / dims.width, ai: 'firefly', ai_firefly_seed: +(newseed ?? 0), ai_firefly_prompt: input, }); - return imgDoc; }) .catch(e => { alert('create image failed: ' + e.toString()); @@ -568,6 +571,7 @@ export class SmartDrawHandler extends ObservableReactComponent<object> { color={SettingsManager.userColor} /> <input + style={{ color: SettingsManager.userColor, background: SettingsManager.userBackgroundColor }} aria-label="Smart Draw Input" className="smartdraw-input" type="text" |