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