mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 09:56:36 +01:00
refactor(react/dialogs): deduplicate data types
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { NoteType } from "@triliumnext/commons";
|
||||
import type { FullRevision, RevisionItem } from "@triliumnext/commons";
|
||||
import appContext, { EventData } from "../../components/app_context";
|
||||
import FNote from "../../entities/fnote";
|
||||
import dialog, { closeActiveDialog, openDialog } from "../../services/dialog";
|
||||
@@ -21,22 +21,6 @@ interface RevisionsDialogProps {
|
||||
note?: FNote;
|
||||
}
|
||||
|
||||
interface RevisionItem {
|
||||
noteId: string;
|
||||
revisionId: string;
|
||||
dateLastEdited: string;
|
||||
contentLength: number;
|
||||
type: NoteType;
|
||||
title: string;
|
||||
isProtected: boolean;
|
||||
mime: string;
|
||||
}
|
||||
|
||||
interface FullRevision {
|
||||
content: string;
|
||||
mime: string;
|
||||
}
|
||||
|
||||
function RevisionsDialogComponent({ note }: RevisionsDialogProps) {
|
||||
const [ revisions, setRevisions ] = useState<RevisionItem[]>([]);
|
||||
const [ currentRevision, setCurrentRevision ] = useState<RevisionItem>();
|
||||
|
||||
Reference in New Issue
Block a user