chore: fix duplicate file name error when exporting notes and refactor file name utils (#2877) [skip e2e]
This commit is contained in:
@@ -8,8 +8,7 @@ import ImagePreview from './ImagePreview'
|
||||
import { ImageZoomLevelProps } from './ImageZoomLevelProps'
|
||||
import { PreviewableTextFileTypes, RequiresNativeFilePreview } from './isFilePreviewable'
|
||||
import TextPreview from './TextPreview'
|
||||
import { parseFileName } from '@standardnotes/filepicker'
|
||||
import { sanitizeFileName } from '@standardnotes/ui-services'
|
||||
import { parseFileName, sanitizeFileName } from '@standardnotes/utils'
|
||||
import VideoPreview from './VideoPreview'
|
||||
|
||||
type Props = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { alertDialog, sanitizeFileName } from '@standardnotes/ui-services'
|
||||
import { alertDialog } from '@standardnotes/ui-services'
|
||||
import {
|
||||
STRING_IMPORT_SUCCESS,
|
||||
STRING_INVALID_IMPORT_FILE,
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
STRING_ENC_NOT_ENABLED,
|
||||
} from '@/Constants/Strings'
|
||||
import { BackupFile } from '@standardnotes/snjs'
|
||||
import { sanitizeFileName } from '@standardnotes/utils'
|
||||
import { ChangeEventHandler, MouseEventHandler, useCallback, useEffect, useRef, useState } from 'react'
|
||||
import { WebApplication } from '@/Application/WebApplication'
|
||||
import { observer } from 'mobx-react-lite'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { DecoratorBlockNode, SerializedDecoratorBlockNode } from '@lexical/react/LexicalDecoratorBlockNode'
|
||||
import { parseAndCreateZippableFileName } from '@standardnotes/ui-services'
|
||||
import { parseAndCreateZippableFileName } from '@standardnotes/utils'
|
||||
import { DOMExportOutput, Spread } from 'lexical'
|
||||
|
||||
type SerializedFileExportNode = Spread<
|
||||
|
||||
@@ -18,7 +18,7 @@ import { $createFileExportNode } from '../Lexical/Nodes/FileExportNode'
|
||||
import { $createInlineFileNode } from '../Plugins/InlineFilePlugin/InlineFileNode'
|
||||
import { $convertFromMarkdownString } from '../Lexical/Utils/MarkdownImport'
|
||||
import { $convertToMarkdownString } from '../Lexical/Utils/MarkdownExport'
|
||||
import { parseFileName } from '@standardnotes/filepicker'
|
||||
import { parseFileName } from '@standardnotes/utils'
|
||||
|
||||
export class HeadlessSuperConverter implements SuperConverterServiceInterface {
|
||||
private importEditor: LexicalEditor
|
||||
|
||||
Reference in New Issue
Block a user