From c17d9c1fc900487f93aba57fcd904981ed516b60 Mon Sep 17 00:00:00 2001 From: Kuchuk Andrey Date: Fri, 7 Jun 2024 21:07:11 +0400 Subject: [PATCH] add "open json" button to event id pages --- pages/http-dumps/[id].vue | 18 +---- pages/inspector/[id].vue | 18 +---- pages/monolog/[id].vue | 22 +----- pages/profiler/[id].vue | 19 +----- pages/ray/[id].vue | 18 +---- pages/sentry/[id].vue | 18 +---- pages/smtp/[id].vue | 18 +---- pages/var-dump/[id].vue | 18 +---- src/widgets/ui/index.ts | 1 + src/widgets/ui/page-event-header/index.ts | 3 + .../page-event-header.stories.ts | 16 +++++ .../page-event-header/page-event-header.vue | 67 +++++++++++++++++++ 12 files changed, 103 insertions(+), 133 deletions(-) create mode 100644 src/widgets/ui/page-event-header/index.ts create mode 100644 src/widgets/ui/page-event-header/page-event-header.stories.ts create mode 100644 src/widgets/ui/page-event-header/page-event-header.vue diff --git a/pages/http-dumps/[id].vue b/pages/http-dumps/[id].vue index 1a5920d8..61f8c842 100644 --- a/pages/http-dumps/[id].vue +++ b/pages/http-dumps/[id].vue @@ -2,7 +2,7 @@ import { computed, onMounted, ref } from "vue"; import { HttpDumpPage } from "~/src/screens/http-dump"; import { useFetch, useRoute, useRouter, useHead, useNuxtApp } from "#app"; // eslint-disable-line @conarti/feature-sliced/layers-slices -import { PageHeader } from "~/src/widgets/ui"; +import { PageEventHeader } from "~/src/widgets/ui"; import { useHttpDump } from "~/src/entities/http-dump"; import type { HttpDump } from "~/src/entities/http-dump/types"; import { useEvents } from "~/src/shared/lib/use-events"; @@ -32,12 +32,6 @@ const event = computed(() => : null ); -const onDelete = () => { - events.removeById(eventId); - - router.push("/"); -}; - const getEvent = async () => { await useFetch(events.getUrl(eventId), { headers: { "X-Auth-Token": $authToken.token || "" }, @@ -62,15 +56,7 @@ onMounted(getEvent);