@scalar/api-client
Version:
the open source API testing client
51 lines (50 loc) • 1.62 kB
JavaScript
import { defineComponent as c, ref as n, computed as l, watch as p, createBlock as _, openBlock as d, withCtx as s, createVNode as r, createElementVNode as h, unref as x } from "vue";
import { useScroll as v } from "@vueuse/core";
import { useRouter as w, RouterView as k } from "vue-router";
import y from "../../components/ViewLayout/ViewLayout.vue.js";
import q from "../../components/ViewLayout/ViewLayoutSection.vue.js";
import C from "./CollectionNavigation.vue.js";
import { useActiveEntities as R } from "../../store/active-entities.js";
import { PathId as S } from "../../routes.js";
const V = { class: "w-full md:mx-auto md:max-w-[720px]" }, g = /* @__PURE__ */ c({
__name: "Collection",
setup($) {
const { activeCollection: i } = R(), m = w(), o = n(null), { y: a } = v(o), f = l(() => a.value > 104);
return p(
i,
(t) => {
var e;
if (((e = t == null ? void 0 : t.info) == null ? void 0 : e.title) === "Drafts") {
const u = t.requests[0];
m.push({
name: "request",
params: { [S.Request]: u }
});
}
},
{
immediate: !0
}
), (t, e) => (d(), _(y, {
ref_key: "el",
ref: o,
class: "h-fit overflow-auto pb-6 xl:overflow-auto"
}, {
default: s(() => [
r(q, { class: "xl:h-fit" }, {
default: s(() => [
r(C, { isSticky: f.value }, null, 8, ["isSticky"]),
h("div", V, [
r(x(k))
])
]),
_: 1
})
]),
_: 1
}, 512));
}
});
export {
g as default
};