mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
refactor(editor): should not rely on doc collection type (#9501)
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
||||
} from '@blocksuite/affine-components/icons';
|
||||
import { openFileOrFiles } from '@blocksuite/affine-shared/utils';
|
||||
import { WithDisposable } from '@blocksuite/global/utils';
|
||||
import type { DocCollection } from '@blocksuite/store';
|
||||
import type { Workspace } from '@blocksuite/store';
|
||||
import { html, LitElement, type PropertyValues } from 'lit';
|
||||
import { query, state } from 'lit/decorators.js';
|
||||
|
||||
@@ -30,7 +30,7 @@ export class ImportDoc extends WithDisposable(LitElement) {
|
||||
static override styles = styles;
|
||||
|
||||
constructor(
|
||||
private readonly collection: DocCollection,
|
||||
private readonly collection: Workspace,
|
||||
private readonly onSuccess?: OnSuccessHandler,
|
||||
private readonly onFail?: OnFailHandler,
|
||||
private readonly abortController = new AbortController()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { DocCollection } from '@blocksuite/store';
|
||||
import type { Workspace } from '@blocksuite/store';
|
||||
|
||||
import {
|
||||
ImportDoc,
|
||||
@@ -13,7 +13,7 @@ export function showImportModal({
|
||||
container = document.body,
|
||||
abortController = new AbortController(),
|
||||
}: {
|
||||
collection: DocCollection;
|
||||
collection: Workspace;
|
||||
onSuccess?: OnSuccessHandler;
|
||||
onFail?: OnFailHandler;
|
||||
multiple?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user