mirror of https://github.com/fantasticit/think.git
refactor: format code
parent
8b098285f9
commit
6b7a6d648f
|
@ -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'>;
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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';
|
||||
|
||||
/**
|
||||
* 所有消息
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 = () => {
|
||||
|
|
|
@ -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>;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { IDocument, IUser, IWiki } from '@think/domains';
|
||||
import { HttpClient } from './HttpClient';
|
||||
import { HttpClient } from './http-client';
|
||||
|
||||
/**
|
||||
* 更新文档阅读量
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { HttpClient } from './HttpClient';
|
||||
import { HttpClient } from './http-client';
|
||||
|
||||
const ONE_MB = 1 * 1024 * 1024;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -6,10 +6,4 @@ export class Blockquote extends Node {
|
|||
matching() {
|
||||
return this.DOMNode.nodeName === 'BLOCKQUOTE';
|
||||
}
|
||||
|
||||
// data() {
|
||||
// return {
|
||||
// type: 'blockquote',
|
||||
// };
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
import { Node } from './node';
|
||||
|
||||
export class Blockquote extends Node {
|
||||
type = 'blockquote';
|
||||
|
||||
matching() {
|
||||
return this.DOMNode.nodeName === 'BLOCKQUOTE';
|
||||
}
|
||||
}
|
|
@ -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';
|
||||
|
|
Loading…
Reference in New Issue