diff options
| author | bobzel <zzzman@gmail.com> | 2024-09-17 21:54:47 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-09-17 21:54:47 -0400 |
| commit | 31321f6def982305ea89cdfe5a873b942060eb84 (patch) | |
| tree | e3923478e97b688bde7d413c4038c20192877203 /src/client/views/collections | |
| parent | 78f348cd1406cfaf3d0247973b826783ab3532b5 (diff) | |
| parent | 921ab051bfcaa805cb18f40dfcd189624d83f43a (diff) | |
fixed eslint started some linting
Diffstat (limited to 'src/client/views/collections')
| -rw-r--r-- | src/client/views/collections/CollectionCardDeckView.tsx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/client/views/collections/CollectionCardDeckView.tsx b/src/client/views/collections/CollectionCardDeckView.tsx index 97ff852b2..fced9fd37 100644 --- a/src/client/views/collections/CollectionCardDeckView.tsx +++ b/src/client/views/collections/CollectionCardDeckView.tsx @@ -1,4 +1,4 @@ -import { IReactionDisposer, ObservableMap, action, computed, makeObservable, observable, reaction, trace } from 'mobx'; +import { IReactionDisposer, ObservableMap, action, computed, makeObservable, observable, reaction } from 'mobx'; import { observer } from 'mobx-react'; import * as React from 'react'; import { ClientUtils, DashColor, returnFalse, returnZero } from '../../../ClientUtils'; @@ -6,11 +6,13 @@ import { emptyFunction } from '../../../Utils'; import { Doc, StrListCast } from '../../../fields/Doc'; import { DocData } from '../../../fields/DocSymbols'; import { Id } from '../../../fields/FieldSymbols'; -import { BoolCast, Cast, DateCast, NumCast, RTFCast, ScriptCast, StrCast } from '../../../fields/Types'; +import { BoolCast, DateCast, DocCast, NumCast, RTFCast, ScriptCast, StrCast } from '../../../fields/Types'; import { URLField } from '../../../fields/URLField'; import { gptImageLabel } from '../../apis/gpt/GPT'; import { DocumentType } from '../../documents/DocumentTypes'; import { DragManager } from '../../util/DragManager'; +import { dropActionType } from '../../util/DropActionTypes'; +import { SelectionManager } from '../../util/SelectionManager'; import { SnappingManager } from '../../util/SnappingManager'; import { Transform } from '../../util/Transform'; import { undoable } from '../../util/UndoManager'; @@ -19,9 +21,6 @@ import { DocumentView } from '../nodes/DocumentView'; import { GPTPopup, GPTPopupMode } from '../pdf/GPTPopup/GPTPopup'; import './CollectionCardDeckView.scss'; import { CollectionSubView, SubCollectionViewProps } from './CollectionSubView'; -import { dropActionType } from '../../util/DropActionTypes'; -import { DocCast } from '../../../fields/Types'; -import { SelectionManager } from '../../util/SelectionManager'; enum cardSortings { Time = 'time', @@ -354,10 +353,11 @@ export class CollectionCardView extends CollectionSubView() { switch (sortType) { case cardSortings.Time: return [DateCast(docA.author_date)?.date ?? Date.now(), DateCast(docB.author_date)?.date ?? Date.now()]; - case cardSortings.Color: + case cardSortings.Color: { const d1 = DashColor(StrCast(docA.backgroundColor)); const d2 = DashColor(StrCast(docB.backgroundColor)); return [d1.hsv().hue(), d2.hsv().hue()]; + } case cardSortings.Tag: return [this.tagValue(docA) ?? 9999, this.tagValue(docB) ?? 9999]; case cardSortings.Chat: @@ -531,7 +531,7 @@ export class CollectionCardView extends CollectionSubView() { case '6': doc.chatIndex = index; break; - case '1': + case '1': { const allHotKeys = StrListCast(Doc.UserDoc().myFilterHotKeyTitles); let myTag = ''; @@ -552,6 +552,7 @@ export class CollectionCardView extends CollectionSubView() { } } break; + } case '2': case '4': doc['chatFilter'] = true; @@ -581,7 +582,6 @@ export class CollectionCardView extends CollectionSubView() { const sortedDocs = this.sortedDocs; const anySelected = this.childDocs.some(doc => DocumentView.SelectedDocs().includes(doc)); const isEmpty = this.childDocsWithoutLinks.length === 0; - const isDesc = BoolCast(this.Document.cardSort_isDesc); if (isEmpty) { return ( |
