214 lines
9.5 KiB
JavaScript
214 lines
9.5 KiB
JavaScript
import { a as useConfigStore, u as useRouter, A as APP_Milady_Date } from './server.mjs';
|
|
import { defineComponent, ref, mergeProps, unref, withCtx, createVNode, createBlock, openBlock, Fragment, renderList, useSSRContext } from 'vue';
|
|
import { ssrRenderAttrs, ssrRenderComponent, ssrInterpolate, ssrRenderList, ssrRenderAttr } from 'vue/server-renderer';
|
|
import { Swiper, SwiperSlide } from 'swiper/vue';
|
|
import { EffectCoverflow, Pagination } from 'swiper/modules';
|
|
import { m as mediaFilesUrl } from './handle-DbjkEnGN.mjs';
|
|
import { B as BasicIconOld } from './BasicIconOld-I4c2ShMu.mjs';
|
|
import { _ as _sfc_main$1, a as _sfc_main$2 } from './BaseDatePicker-CBTFfZPt.mjs';
|
|
import { u as useMediaStore } from './media-kxpEX2xr.mjs';
|
|
import { _ as __nuxt_component_1 } from './FormItem-DY7uTw8_.mjs';
|
|
|
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
__name: "index",
|
|
__ssrInlineRender: true,
|
|
props: {
|
|
visible: { type: Boolean, default: false },
|
|
isEdit: { type: Boolean, default: false },
|
|
data: {}
|
|
},
|
|
emits: ["update:visible", "update:isEdit", "success"],
|
|
setup(__props, { emit: __emit }) {
|
|
const config = useConfigStore();
|
|
const isVideo = (file) => file.includes(".mp4") || file.includes("video");
|
|
const router = useRouter();
|
|
const modules = [EffectCoverflow, Pagination];
|
|
const expire_Time = ref(/* @__PURE__ */ new Date());
|
|
ref(false);
|
|
useMediaStore();
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
const _component_a_form_item = __nuxt_component_1;
|
|
_push(`<div${ssrRenderAttrs(mergeProps({ class: "h-screen relative" }, _attrs))}><div class="flex absolute top-0 right-0 left-0 gap-8 items-center justify-between p-4"><div class="flex gap-4">`);
|
|
_push(ssrRenderComponent(BasicIconOld, {
|
|
icon: unref(config).isRTL ? "vuesax-linear:arrow-right" : "vuesax-linear:arrow-left",
|
|
onClick: ($event) => unref(router).back()
|
|
}, null, _parent));
|
|
_push(`<div font-semibold>${ssrInterpolate(unref(config).useString("newStory"))}</div></div><div class="text-primary text-sm">${ssrInterpolate(unref(config).useString("create"))}</div></div><div class="swiper-container pt-4rem">`);
|
|
_push(ssrRenderComponent(unref(Swiper), {
|
|
effect: "coverflow",
|
|
grabCursor: true,
|
|
centeredSlides: true,
|
|
slidesPerView: "auto",
|
|
coverflowEffect: {
|
|
rotate: 50,
|
|
stretch: -10,
|
|
depth: 90,
|
|
modifier: 1,
|
|
slideShadows: true
|
|
},
|
|
pagination: true,
|
|
modules,
|
|
class: "mySwiper"
|
|
}, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
_push2(`<!--[-->`);
|
|
ssrRenderList(unref(mediaFilesUrl), (media, index) => {
|
|
_push2(ssrRenderComponent(unref(SwiperSlide), {
|
|
key: index,
|
|
class: "small-slide"
|
|
}, {
|
|
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
if (_push3) {
|
|
_push3(`<div class="media-wrapper"${_scopeId2}>`);
|
|
if (isVideo(media)) {
|
|
_push3(`<video${ssrRenderAttr("src", media)} controls class="media video"${_scopeId2}></video>`);
|
|
} else {
|
|
_push3(`<img${ssrRenderAttr("src", media)} class="media"${_scopeId2}>`);
|
|
}
|
|
_push3(`</div>`);
|
|
} else {
|
|
return [
|
|
createVNode("div", { class: "media-wrapper" }, [
|
|
isVideo(media) ? (openBlock(), createBlock("video", {
|
|
key: 0,
|
|
src: media,
|
|
controls: "",
|
|
class: "media video"
|
|
}, null, 8, ["src"])) : (openBlock(), createBlock("img", {
|
|
key: 1,
|
|
src: media,
|
|
class: "media"
|
|
}, null, 8, ["src"]))
|
|
])
|
|
];
|
|
}
|
|
}),
|
|
_: 2
|
|
}, _parent2, _scopeId));
|
|
});
|
|
_push2(`<!--]-->`);
|
|
_push2(ssrRenderComponent(unref(SwiperSlide), { class: "small-slide" }, {
|
|
default: withCtx((_2, _push3, _parent3, _scopeId2) => {
|
|
if (_push3) {
|
|
_push3(`<div class="h-full w-full flex justify-center items-center"${_scopeId2}><div class="rounded-full bg-gray-50 flex items-center justify-center aspect-square w-16 shadow-lg text-xl text-gray-400"${_scopeId2}><span${_scopeId2}>+</span></div></div>`);
|
|
} else {
|
|
return [
|
|
createVNode("div", { class: "h-full w-full flex justify-center items-center" }, [
|
|
createVNode("div", {
|
|
class: "rounded-full bg-gray-50 flex items-center justify-center aspect-square w-16 shadow-lg text-xl text-gray-400",
|
|
onClick: ($event) => unref(router).back()
|
|
}, [
|
|
createVNode("span", null, "+")
|
|
], 8, ["onClick"])
|
|
])
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent2, _scopeId));
|
|
} else {
|
|
return [
|
|
(openBlock(true), createBlock(Fragment, null, renderList(unref(mediaFilesUrl), (media, index) => {
|
|
return openBlock(), createBlock(unref(SwiperSlide), {
|
|
key: index,
|
|
class: "small-slide"
|
|
}, {
|
|
default: withCtx(() => [
|
|
createVNode("div", { class: "media-wrapper" }, [
|
|
isVideo(media) ? (openBlock(), createBlock("video", {
|
|
key: 0,
|
|
src: media,
|
|
controls: "",
|
|
class: "media video"
|
|
}, null, 8, ["src"])) : (openBlock(), createBlock("img", {
|
|
key: 1,
|
|
src: media,
|
|
class: "media"
|
|
}, null, 8, ["src"]))
|
|
])
|
|
]),
|
|
_: 2
|
|
}, 1024);
|
|
}), 128)),
|
|
createVNode(unref(SwiperSlide), { class: "small-slide" }, {
|
|
default: withCtx(() => [
|
|
createVNode("div", { class: "h-full w-full flex justify-center items-center" }, [
|
|
createVNode("div", {
|
|
class: "rounded-full bg-gray-50 flex items-center justify-center aspect-square w-16 shadow-lg text-xl text-gray-400",
|
|
onClick: ($event) => unref(router).back()
|
|
}, [
|
|
createVNode("span", null, "+")
|
|
], 8, ["onClick"])
|
|
])
|
|
]),
|
|
_: 1
|
|
})
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent));
|
|
_push(`</div><div class="px3 mt5">`);
|
|
_push(ssrRenderComponent(_component_a_form_item, {
|
|
label: unref(config).useString("expireTime")
|
|
}, {
|
|
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
|
if (_push2) {
|
|
if (unref(config).lang === "en" && ("APP_Milady_Date" in _ctx ? _ctx.APP_Milady_Date : unref(APP_Milady_Date))) {
|
|
_push2(ssrRenderComponent(_sfc_main$1, {
|
|
value: expire_Time.value,
|
|
"onUpdate:value": ($event) => expire_Time.value = $event,
|
|
size: "large",
|
|
"disabled-date": true,
|
|
inputReadOnly: "",
|
|
placeHolder: unref(config).useString("birthdate")
|
|
}, null, _parent2, _scopeId));
|
|
} else {
|
|
_push2(ssrRenderComponent(_sfc_main$2, {
|
|
value: expire_Time.value,
|
|
"onUpdate:value": ($event) => expire_Time.value = $event,
|
|
size: "large",
|
|
"disabled-date": true,
|
|
inputReadOnly: "",
|
|
placeHolder: unref(config).useString("birthdate")
|
|
}, null, _parent2, _scopeId));
|
|
}
|
|
} else {
|
|
return [
|
|
unref(config).lang === "en" && ("APP_Milady_Date" in _ctx ? _ctx.APP_Milady_Date : unref(APP_Milady_Date)) ? (openBlock(), createBlock(_sfc_main$1, {
|
|
key: 0,
|
|
value: expire_Time.value,
|
|
"onUpdate:value": ($event) => expire_Time.value = $event,
|
|
size: "large",
|
|
"disabled-date": true,
|
|
inputReadOnly: "",
|
|
placeHolder: unref(config).useString("birthdate")
|
|
}, null, 8, ["value", "onUpdate:value", "placeHolder"])) : (openBlock(), createBlock(_sfc_main$2, {
|
|
key: 1,
|
|
value: expire_Time.value,
|
|
"onUpdate:value": ($event) => expire_Time.value = $event,
|
|
size: "large",
|
|
"disabled-date": true,
|
|
inputReadOnly: "",
|
|
placeHolder: unref(config).useString("birthdate")
|
|
}, null, 8, ["value", "onUpdate:value", "placeHolder"]))
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent));
|
|
_push(`</div></div>`);
|
|
};
|
|
}
|
|
});
|
|
const _sfc_setup = _sfc_main.setup;
|
|
_sfc_main.setup = (props, ctx) => {
|
|
const ssrContext = useSSRContext();
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("views/add/story/information/index.vue");
|
|
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
};
|
|
|
|
export { _sfc_main as _ };
|
|
//# sourceMappingURL=index-hzNIXD77.mjs.map
|