-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #233 from ninoseki/renew-frontend
refactor: refacotring frontend
- Loading branch information
Showing
25 changed files
with
1,088 additions
and
1,671 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
Large diffs are not rendered by default.
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<script setup lang="ts"> | ||
import { type PropType } from 'vue' | ||
import Attachments from '@/components/attachments/AttachmentsItem.vue' | ||
import Bodies from '@/components/bodies/BodiesItem.vue' | ||
import Headers from '@/components/headers/Headers.vue' | ||
import type { EmlType } from '@/schemas' | ||
defineProps({ | ||
eml: { | ||
type: Object as PropType<EmlType>, | ||
required: true | ||
} | ||
}) | ||
</script> | ||
|
||
<template> | ||
<Headers :header="eml.header" /> | ||
<Bodies :bodies="eml.bodies" v-if="eml.bodies.length > 0" /> | ||
<Attachments :attachments="eml.attachments" v-if="eml.attachments.length > 0" /> | ||
</template> |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<script setup lang="ts"> | ||
import { onMounted } from 'vue' | ||
import { useAsyncTask } from 'vue-concurrency' | ||
import { API } from '@/api' | ||
import ErrorMessage from '@/components/ErrorMessage.vue' | ||
import Loading from '@/components/Loading.vue' | ||
import Response from '@/components/ResponseItem.vue' | ||
import type { ResponseType } from '@/schemas' | ||
const props = defineProps({ | ||
id: { | ||
type: String, | ||
required: true | ||
} | ||
}) | ||
const lookupTask = useAsyncTask<ResponseType, []>(async () => { | ||
return await API.lookup(props.id) | ||
}) | ||
onMounted(async () => { | ||
await lookupTask.perform() | ||
}) | ||
</script> | ||
|
||
<template> | ||
<Loading v-if="lookupTask.isRunning" /> | ||
<ErrorMessage :error="lookupTask.last?.error" v-if="lookupTask.isError" /> | ||
<Response :response="lookupTask.last.value" v-if="lookupTask.last?.value" /> | ||
</template> |
Oops, something went wrong.