-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
41 changed files
with
639 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
class ArticleFormatError extends Error { | ||
constructor(message: string) { | ||
super(message) | ||
} | ||
} | ||
|
||
class ArticleContentError extends Error { | ||
constructor(message: string) { | ||
super(message) | ||
} | ||
} | ||
|
||
class ArticleHasNoUUIDError extends Error { | ||
constructor(message: string) { | ||
super(message) | ||
} | ||
} | ||
|
||
class ArticleHasNoHTMLError extends Error { | ||
constructor(message: string) { | ||
super(message) | ||
} | ||
} | ||
|
||
export { ArticleFormatError, ArticleContentError, ArticleHasNoUUIDError, ArticleHasNoHTMLError } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class DocHasNoContentError extends Error { | ||
constructor(message: string) { | ||
super(message) | ||
} | ||
} | ||
|
||
class DocHasNoArticleError extends Error { | ||
constructor(message: string) { | ||
super(message) | ||
} | ||
} | ||
|
||
export { DocHasNoContentError, DocHasNoArticleError } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import EditorNode from "../model/EditorNode" | ||
|
||
class EditorNodeNoParentIdError extends Error { | ||
block: EditorNode | ||
|
||
constructor(message: string = 'Parent ID is not set', block: EditorNode) { | ||
super(message) | ||
this.block = block | ||
} | ||
} | ||
|
||
class EditorNodeNoUUIDError extends Error { | ||
block: EditorNode | ||
|
||
constructor(message: string = 'UUID is not set', block: EditorNode) { | ||
super(message) | ||
this.block = block | ||
} | ||
} | ||
|
||
export { | ||
EditorNodeNoParentIdError, | ||
EditorNodeNoUUIDError | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class ParamErrorNoUUID extends Error { | ||
public stage: string | ||
|
||
constructor(message: string, stage: string) { | ||
super(message) | ||
this.stage = stage | ||
} | ||
} | ||
|
||
export { ParamErrorNoUUID } |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<template> | ||
<div class="pl-4"> | ||
<div v-for="node in nodes" :key="node.getUUID()" class="my-1"> | ||
<div class="flex items-center gap-2"> | ||
<span class="text-blue-600">{{ node.type }}</span> | ||
<span class="text-gray-500 text-sm">({{ node.getUUID() }})</span> | ||
<span v-if="node.title" class="text-emerald-600">"{{ node.title }}"</span> | ||
</div> | ||
|
||
<div v-if="node.children?.length" class="border-l border-red-500 ml-2"> | ||
<Tree :nodes="node.children" /> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent, PropType } from 'vue' | ||
import EditorNode from '../../model/EditorNode' | ||
export default defineComponent({ | ||
name: 'Tree', | ||
props: { | ||
nodes: { | ||
type: Array as PropType<EditorNode[]>, | ||
required: true | ||
} | ||
} | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.