Skip to content

Commit

Permalink
refactor: introduce status API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ninoseki committed Mar 9, 2024
1 parent 56319be commit 32063a3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 112 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/Upload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
The MSG file will be converted to the EML file before analyzing. The conversion might be
lossy.
</li>
<li v-if="status.cache === false">This app doesn't store EML/MSG file you upload.</li>
<li v-if="!status.cache">This app doesn't store EML/MSG file you upload.</li>
</ul>
</div>
</article>
Expand Down
11 changes: 10 additions & 1 deletion frontend/src/components/attachments/Attachment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@
:submitter="vt"
@set-error="onSetError"
@set-reference-url="onSetReferenceUrl"
v-if="status.vt"
/>
<AttachmentSubmissionButton
:attachment="attachment"
:submitter="inquest"
@set-error="onSetError"
@set-reference-url="onSetReferenceUrl"
v-if="status.inquest"
/>
<AttachmentDownloadButton :attachment="attachment" />
</span>
Expand Down Expand Up @@ -65,6 +67,7 @@ import AttachmentSubmissionButton from '@/components/attachments/AttachmentSubmi
import AttachmentSubmissionNotification from '@/components/attachments/AttachmentSubmissionNotification.vue'
import ErrorMessage from '@/components/ErrorMessage.vue'
import IndicatorButton from '@/components/IndicatorButton.vue'
import { useStatusStore } from '@/store'
import { InQuest, VirusTotal } from '@/submitters'
import type { Attachment } from '@/types'
Expand All @@ -88,6 +91,11 @@ export default defineComponent({
IndicatorButton
},
setup(props) {
const store = useStatusStore()
const status = computed(() => {
return store.$state
})
const error = ref<AxiosError>()
const referenceUrl = ref<string>()
Expand Down Expand Up @@ -119,7 +127,8 @@ export default defineComponent({
onSetReferenceUrl,
error,
referenceUrl,
onDisposeError
onDisposeError,
status
}
}
})
Expand Down
56 changes: 0 additions & 56 deletions frontend/src/components/submitters/Submitter.vue

This file was deleted.

54 changes: 0 additions & 54 deletions frontend/src/components/submitters/Submitters.vue

This file was deleted.

0 comments on commit 32063a3

Please sign in to comment.