feat: tab service added (#3367)

This commit is contained in:
Anwarul Islam
2023-10-11 18:51:07 +06:00
committed by GitHub
parent 51510566bc
commit ba31cdabea
60 changed files with 1112 additions and 841 deletions

View File

@@ -327,7 +327,8 @@ import { useColorMode } from "@composables/theming"
import { pipe } from "fp-ts/function"
import * as O from "fp-ts/Option"
import { Picked } from "~/helpers/types/HoppPicked.js"
import { currentActiveTab } from "~/helpers/rest/tab"
import { useService } from "dioc/vue"
import { RESTTabService } from "~/services/tab/rest"
export type Collection = {
type: "collections"
@@ -535,7 +536,8 @@ const isSelected = ({
}
}
const active = computed(() => currentActiveTab.value.document.saveContext)
const tabs = useService(RESTTabService)
const active = computed(() => tabs.currentActiveTab.value.document.saveContext)
const isActiveRequest = (folderPath: string, requestIndex: number) => {
return pipe(