Merge pull request #24 from fantasticit/feat/format

pull/25/head
fantasticit 2022-04-01 12:14:12 +08:00 committed by GitHub
commit 5fe787d371
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 33 additions and 30 deletions

View File

@ -1,7 +1,7 @@
import type { IComment } from '@think/domains';
import { useState } from 'react';
import useSWR from 'swr';
import { HttpClient } from 'services/HttpClient';
import { HttpClient } from 'services/http-client';
export type CreateCommentDto = Pick<IComment, 'parentCommentId' | 'html' | 'replyUserId'>;

View File

@ -2,7 +2,7 @@ import type { IUser, IDocument, IWiki } from '@think/domains';
import useSWR from 'swr';
import { useState, useCallback, useEffect } from 'react';
import { useAsyncLoading } from 'hooks/use-async-loading';
import { HttpClient } from 'services/HttpClient';
import { HttpClient } from 'services/http-client';
import { getPublicDocumentDetail } from 'services/document';
interface IAuthority {

View File

@ -1,7 +1,7 @@
import type { IMessage } from '@think/domains';
import { useState } from 'react';
import useSWR from 'swr';
import { HttpClient } from 'services/HttpClient';
import { HttpClient } from 'services/http-client';
/**
*

View File

@ -1,7 +1,7 @@
import type { ITemplate } from '@think/domains';
import { useState } from 'react';
import useSWR from 'swr';
import { HttpClient } from 'services/HttpClient';
import { HttpClient } from 'services/http-client';
export const usePublicTemplates = () => {
const [page, setPage] = useState(1);

View File

@ -2,7 +2,7 @@ import type { IUser, ILoginUser } from '@think/domains';
import useSWR from 'swr';
import { useCallback, useEffect } from 'react';
import Router, { useRouter } from 'next/router';
import { HttpClient } from 'services/HttpClient';
import { HttpClient } from 'services/http-client';
import { getStorage, setStorage } from 'helpers/storage';
export const useUser = () => {

View File

@ -1,7 +1,7 @@
import { CollectType, IDocument, IUser, IWiki, IWikiUser } from '@think/domains';
import useSWR from 'swr';
import { useState } from 'react';
import { HttpClient } from 'services/HttpClient';
import { HttpClient } from 'services/http-client';
export type ICreateWiki = Pick<IWiki, 'name' | 'description'>;
export type IUpdateWiki = Partial<IWiki>;

View File

@ -1,5 +1,5 @@
import { IDocument, IUser, IWiki } from '@think/domains';
import { HttpClient } from './HttpClient';
import { HttpClient } from './http-client';
/**
*

View File

@ -1,4 +1,4 @@
import { HttpClient } from './HttpClient';
import { HttpClient } from './http-client';
const ONE_MB = 1 * 1024 * 1024;

View File

@ -1,5 +1,5 @@
import type { IUser } from '@think/domains';
import { HttpClient } from './HttpClient';
import { HttpClient } from './http-client';
export const register = (data: Partial<IUser>): Promise<IUser> => {
return HttpClient.post('/user/register', data);

View File

@ -6,10 +6,4 @@ export class Blockquote extends Node {
matching() {
return this.DOMNode.nodeName === 'BLOCKQUOTE';
}
// data() {
// return {
// type: 'blockquote',
// };
// }
}

View File

@ -0,0 +1,9 @@
import { Node } from './node';
export class Blockquote extends Node {
type = 'blockquote';
matching() {
return this.DOMNode.nodeName === 'BLOCKQUOTE';
}
}

View File

@ -3,17 +3,17 @@ import { Iframe } from './nodes/iframe';
import { Attachment } from './nodes/attachment';
import { Banner } from './nodes/banner';
import { Status } from './nodes/status';
import { DocumentReference } from './nodes/documentReference';
import { DocumentChildren } from './nodes/documentChildren';
import { DocumentReference } from './nodes/document-reference';
import { DocumentChildren } from './nodes/document-children';
import { Mind } from './nodes/mind';
// 通用
import { CodeBlock } from './nodes/codeBlock';
import { CodeBlockWrapper } from './nodes/codeBlockWrapper';
import { HardBreak } from './nodes/hardBreak';
import { CodeBlock } from './nodes/code-block';
import { CodeBlockWrapper } from './nodes/code-block-wrapper';
import { HardBreak } from './nodes/hard-break';
import { Heading } from './nodes/heading';
import { Image } from './nodes/image';
import { HorizontalRule } from './nodes/horizontalRule';
import { Blockquote } from './nodes/blockQuote';
import { HorizontalRule } from './nodes/horizontal-rule';
import { Blockquote } from './nodes/blockquote';
// 文本
import { Title } from './nodes/title';
import { Katex } from './nodes/katex';
@ -21,15 +21,15 @@ import { Paragraph } from './nodes/paragraph';
import { Text } from './nodes/text';
// 表格
import { Table } from './nodes/table';
import { TableHeader } from './nodes/tableHeader';
import { TableRow } from './nodes/tableRow';
import { TableCell } from './nodes/tableCell';
import { TableHeader } from './nodes/table-header';
import { TableRow } from './nodes/table-row';
import { TableCell } from './nodes/table-cell';
// 列表
import { TaskList } from './nodes/taskList';
import { TaskListItem } from './nodes/taskListItem';
import { ListItem } from './nodes/listItem';
import { OrderedList } from './nodes/orderedList';
import { BulletList } from './nodes/bulletList';
import { TaskList } from './nodes/task-list';
import { TaskListItem } from './nodes/task-list-item';
import { ListItem } from './nodes/list-item';
import { OrderedList } from './nodes/ordered-list';
import { BulletList } from './nodes/bullet-list';
// marks
import { Bold } from './marks/bold';