From 86c666427ff8b9d516450a150af641570e00f2d2 Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 1 Jul 2025 13:17:40 -0400 Subject: reverted chat send to use dash component Button, and dictation to use Toggle. Reverted Dropdown to use trigger of CLICK (hover doesn't work well). got rid of currentuserutil button references in infoUI & replaced with info-specific button descriptions. fixed up a bunch of lint/typing errors --- src/client/views/pdf/GPTPopup/GPTPopup.tsx | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'src/client/views/pdf') diff --git a/src/client/views/pdf/GPTPopup/GPTPopup.tsx b/src/client/views/pdf/GPTPopup/GPTPopup.tsx index 9c37428ee..6e0d58932 100644 --- a/src/client/views/pdf/GPTPopup/GPTPopup.tsx +++ b/src/client/views/pdf/GPTPopup/GPTPopup.tsx @@ -1,4 +1,4 @@ -import { Button, IconButton, Toggle, ToggleType, Type } from '@dash/components'; +import { Button, IconButton, Size, Toggle, ToggleType, Type } from '@dash/components'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { action, makeObservable, observable, reaction } from 'mobx'; import { observer } from 'mobx-react'; @@ -9,7 +9,10 @@ import ReactLoading from 'react-loading'; import { TypeAnimation } from 'react-type-animation'; import { ClientUtils } from '../../../../ClientUtils'; import { Doc } from '../../../../fields/Doc'; +import { List } from '../../../../fields/List'; import { NumCast, StrCast } from '../../../../fields/Types'; +import { ImageField } from '../../../../fields/URLField'; +import { Upload } from '../../../../server/SharedMediaTypes'; import { Networking } from '../../../Network'; import { DataSeperator, DescriptionSeperator, DocSeperator, GPTCallType, GPTDocCommand, gptAPICall, gptImageCall } from '../../../apis/gpt/GPT'; import { DocUtils } from '../../../documents/DocUtils'; @@ -21,17 +24,14 @@ import { DictationButton } from '../../DictationButton'; import { ObservableReactComponent } from '../../ObservableReactComponent'; import { TagItem } from '../../TagsView'; import { ChatSortField, docSortings } from '../../collections/CollectionSubView'; +import { ComparisonBox } from '../../nodes/ComparisonBox'; import { DocumentView, DocumentViewInternal } from '../../nodes/DocumentView'; +import { OpenWhere } from '../../nodes/OpenWhere'; +import { DrawingFillHandler } from '../../smartdraw/DrawingFillHandler'; +import { FireflyImageDimensions } from '../../smartdraw/FireflyConstants'; import { SmartDrawHandler } from '../../smartdraw/SmartDrawHandler'; import { AnchorMenu } from '../AnchorMenu'; import './GPTPopup.scss'; -import { FireflyImageDimensions } from '../../smartdraw/FireflyConstants'; -import { Upload } from '../../../../server/SharedMediaTypes'; -import { OpenWhere } from '../../nodes/OpenWhere'; -import { DrawingFillHandler } from '../../smartdraw/DrawingFillHandler'; -import { ImageField } from '../../../../fields/URLField'; -import { List } from '../../../../fields/List'; -import { ComparisonBox } from '../../nodes/ComparisonBox'; export enum GPTPopupMode { SUMMARY, // summary of seleted document text @@ -45,7 +45,6 @@ export enum GPTPopupMode { @observer export class GPTPopup extends ObservableReactComponent { - // eslint-disable-next-line no-use-before-define static Instance: GPTPopup; static ChatTag = '#chat'; // tag used by GPT popup to filter docs private _askDictation: DictationButton | null = null; @@ -530,14 +529,14 @@ export class GPTPopup extends ObservableReactComponent { style={{ color: 'black' }} placeholder={placeholder} /> -