���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
.trash
/
.output.2
/
server
/
chunks
/
build
/
Viewing: _id_-DLyarS7A.mjs
import { b as useI18n, u as useHead, i as useNuxtApp, c as useLocalePath, q as useRoute, x as useAsyncData, s as useRuntimeConfig, n as navigateTo, k as __nuxt_component_4$1, p as __nuxt_component_2$1, d as __nuxt_component_2$3 } from './server.mjs'; import { _ as __nuxt_component_3 } from './Input-A71d90Ub.mjs'; import { defineComponent, reactive, ref, withAsyncContext, mergeProps, unref, withCtx, createVNode, toDisplayString, useSSRContext } from 'vue'; import { u as useAPI } from './useAPI-dGPJZ6yO.mjs'; import { ssrRenderAttrs, ssrRenderAttr, ssrInterpolate, ssrRenderComponent, ssrRenderList, ssrRenderClass } from 'vue/server-renderer'; import { u as useMainStore } from './index-DviQ8Cgo.mjs'; import '../runtime.mjs'; import 'node:http'; import 'node:https'; import 'fs'; import 'path'; import 'node:fs'; import 'node:url'; import '@iconify/utils'; import 'consola/core'; import '../routes/renderer.mjs'; import 'vue-bundle-renderer/runtime'; import 'devalue'; import '@unhead/ssr'; import 'unhead'; import '@unhead/shared'; import 'vue-router'; import '@vueuse/core'; import 'tailwind-merge'; import '@iconify/vue'; import '@iconify/utils/lib/css/icon'; import './fetch-5zL7LryB.mjs'; import 'js-cookie'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "[id]", __ssrInlineRender: true, async setup(__props) { let __temp, __restore; const { t } = useI18n(); useHead({ title: t("SettingsStart") }); const MainStore = useMainStore(); let form = reactive([]); let state = reactive([{ dd: 0, du: 0, dh: 0, dw: 0 }]); const { $api } = useNuxtApp(); const localePath = useLocalePath(); const config = useRuntimeConfig(); const { id } = useRoute().params; const loading = ref(false); const { data } = ([__temp, __restore] = withAsyncContext(async () => useAsyncData(`user:${id}`, async () => { const [result] = await Promise.all([ $api(config.public.API_URL + "/analyze/list/setting", { query: { list_id: id } }) ]); const feildsOptions = JSON.parse(result).data.setting; return { feilds: feildsOptions }; }, { server: true })), __temp = await __temp, __restore(), __temp); const handelProcess = (type, name) => { let num = 0; if (type == "increment") { num = 0.1; } else { num = -0.1; } if (name == "dd") { state.dd = Number(Number(state.dd) + num).toFixed(1); } if (name == "du") { state.du = Number(Number(state.du) + num).toFixed(1); } if (name == "dh") { state.dh = Number(Number(state.dh) + num).toFixed(1); } if (name == "dw") { state.dw = Number(Number(state.dw) + num).toFixed(1); } }; const onInput = (e, id2, key) => { var obj = form.find(function(entry) { return entry.id === id2; }); if (obj) { obj.value = e.target.value; } else { form.push({ id: id2, key, value: e.target.value }); } }; const computing = async () => { loading.value = true; for (let index = 0; index < form.length; index++) { const element = form[index]; if (element["key"] == "dd") { element["value"] = state.dd; } if (element["key"] == "du") { element["value"] = state.du; } if (element["key"] == "dh") { element["value"] = state.dh; } if (element["key"] == "dw") { element["value"] = state.dw; } } await useAPI("/analyze/list/update-setting", { method: "POST", body: form, query: { list_id: id }, immediate: true, server: true }); return navigateTo(localePath("/analyze/list")); }; return (_ctx, _push, _parent, _attrs) => { const _component_UButton = __nuxt_component_4$1; const _component_UIcon = __nuxt_component_2$1; const _component_client_only = __nuxt_component_2$3; const _component_UInput = __nuxt_component_3; _push(`<section${ssrRenderAttrs(mergeProps({ class: "w-[95%] mx-auto lg:w-10/12" }, _attrs))}><div${ssrRenderAttr("dir", _ctx.$i18n.locale == "en" ? "ltr" : "rtl")} class="w-full gap-3 flex justify-start !pt-1 items-center flex-col"><div class="w-full"><label class="w-8/12 mx-auto flex px-2 h-10 text-black rounded-lg bg-[#f7941d] items-center justify-center"><span class="block px-2 text-sm">${ssrInterpolate(unref(t)("SettingsStart"))}</span></label></div><div${ssrRenderAttr("dir", _ctx.$i18n.locale == "en" ? "ltr" : "rtl")} class="w-full border rounded-xl gap-3 bg-gray-100 flex justify-start !pt-4 items-center flex-col border-gray-500 p-2 min-h-48"><label class="block text-sm text-right w-full bold text-black mb-3">${ssrInterpolate(unref(t)("Ground unit door"))} : </label><div class="w-full flex flex-col justify-start items-start"><label class="block text-sm text-right bold text-black mb-3">${ssrInterpolate(unref(t)("difference unit"))}</label><div class="w-full flex justify-center items-center"><div class="flex justify-start items-center">`); _push(ssrRenderComponent(_component_UButton, { square: "", onClick: ($event) => handelProcess("increment", "dd"), class: "w-8 h-8 flex px-2 text-black rounded-lg hover:bg-yellow-500 bg-[#f7941d] items-center justify-center" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(ssrRenderComponent(_component_UIcon, { name: "i-heroicons-plus", class: "text-black text-lg" }, null, _parent2, _scopeId)); } else { return [ createVNode(_component_UIcon, { name: "i-heroicons-plus", class: "text-black text-lg" }) ]; } }), _: 1 }, _parent)); _push(` \` </div><div class="w-[30%] mx-2 flex justify-start items-center">`); _push(ssrRenderComponent(_component_client_only, null, {}, _parent)); _push(`</div><div class="flex justify-start items-center">`); _push(ssrRenderComponent(_component_UButton, { onClick: ($event) => handelProcess("decrement", "dd"), class: "flex px-2 w-8 h-8 text-black rounded-lg hover:bg-yellow-500 bg-[#f7941d] items-center justify-center" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(ssrRenderComponent(_component_UIcon, { name: "i-heroicons-minus", class: "text-black text-lg" }, null, _parent2, _scopeId)); } else { return [ createVNode(_component_UIcon, { name: "i-heroicons-minus", class: "text-black text-lg" }) ]; } }), _: 1 }, _parent)); _push(`</div></div></div><div class="w-full flex flex-col justify-start items-start"><label class="block text-sm text-right bold text-black mb-3">${ssrInterpolate(unref(t)("difference width unit"))}</label><div class="w-full flex justify-center items-center"><div class="flex justify-start items-center">`); _push(ssrRenderComponent(_component_UButton, { onClick: ($event) => handelProcess("increment", "du"), class: "w-8 h-8 flex px-2 text-black rounded-lg hover:bg-yellow-500 bg-[#f7941d] items-center justify-center" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(ssrRenderComponent(_component_UIcon, { name: "i-heroicons-plus", class: "text-black text-lg" }, null, _parent2, _scopeId)); } else { return [ createVNode(_component_UIcon, { name: "i-heroicons-plus", class: "text-black text-lg" }) ]; } }), _: 1 }, _parent)); _push(`</div><div class="w-[30%] mx-2 flex justify-start items-center">`); _push(ssrRenderComponent(_component_client_only, null, {}, _parent)); _push(`</div><div class="flex justify-start items-center">`); _push(ssrRenderComponent(_component_UButton, { onClick: ($event) => handelProcess("decrement", "du"), class: "flex px-2 w-8 h-8 text-black rounded-lg hover:bg-yellow-500 bg-[#f7941d] items-center justify-center" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(ssrRenderComponent(_component_UIcon, { name: "i-heroicons-minus", class: "text-black text-lg" }, null, _parent2, _scopeId)); } else { return [ createVNode(_component_UIcon, { name: "i-heroicons-minus", class: "text-black text-lg" }) ]; } }), _: 1 }, _parent)); _push(`</div></div></div></div><div${ssrRenderAttr("dir", _ctx.$i18n.locale == "en" ? "ltr" : "rtl")} class="w-full border rounded-xl gap-3 mb-3 bg-gray-100 flex justify-start !pt-4 items-center flex-col border-gray-500 p-2 min-h-48"><label class="block text-sm text-right w-full bold text-black mb-3">${ssrInterpolate(unref(t)("Air unit door"))} : </label><div class="w-full flex flex-col justify-start items-start"><label class="block text-sm text-right bold text-black mb-3">${ssrInterpolate(unref(t)("difference unit"))}</label><div class="w-full flex justify-center items-center"><div class="flex justify-start items-center">`); _push(ssrRenderComponent(_component_UButton, { onClick: ($event) => handelProcess("increment", "dh"), class: "w-8 h-8 flex px-2 text-black rounded-lg hover:bg-yellow-500 bg-[#f7941d] items-center justify-center" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(ssrRenderComponent(_component_UIcon, { name: "i-heroicons-plus", class: "text-black text-lg" }, null, _parent2, _scopeId)); } else { return [ createVNode(_component_UIcon, { name: "i-heroicons-plus", class: "text-black text-lg" }) ]; } }), _: 1 }, _parent)); _push(`</div><div class="w-[30%] mx-2 flex justify-start items-center">`); _push(ssrRenderComponent(_component_client_only, null, {}, _parent)); _push(`</div><div class="flex justify-start items-center">`); _push(ssrRenderComponent(_component_UButton, { onClick: ($event) => handelProcess("decrement", "dh"), class: "flex px-2 w-8 h-8 text-black rounded-lg hover:bg-yellow-500 bg-[#f7941d] items-center justify-center" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(ssrRenderComponent(_component_UIcon, { name: "i-heroicons-minus", class: "text-black text-lg" }, null, _parent2, _scopeId)); } else { return [ createVNode(_component_UIcon, { name: "i-heroicons-minus", class: "text-black text-lg" }) ]; } }), _: 1 }, _parent)); _push(`</div></div></div><div class="w-full flex flex-col justify-start items-start"><label class="block text-sm text-right bold text-black mb-3">${ssrInterpolate(unref(t)("difference width unit"))}</label><div class="w-full flex justify-center items-center"><div class="flex justify-start items-center">`); _push(ssrRenderComponent(_component_UButton, { onClick: ($event) => handelProcess("increment", "dw"), class: "w-8 h-8 flex px-2 text-black rounded-lg hover:bg-yellow-500 bg-[#f7941d] items-center justify-center" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(ssrRenderComponent(_component_UIcon, { name: "i-heroicons-plus", class: "text-black text-lg" }, null, _parent2, _scopeId)); } else { return [ createVNode(_component_UIcon, { name: "i-heroicons-plus", class: "text-black text-lg" }) ]; } }), _: 1 }, _parent)); _push(`</div><div class="w-[30%] mx-2 flex justify-start items-center">`); _push(ssrRenderComponent(_component_client_only, null, {}, _parent)); _push(`</div><div class="flex justify-start items-center">`); _push(ssrRenderComponent(_component_UButton, { onClick: ($event) => handelProcess("decrement", "dw"), class: "flex px-2 w-8 h-8 text-black rounded-lg hover:bg-yellow-500 bg-[#f7941d] items-center justify-center" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(ssrRenderComponent(_component_UIcon, { name: "i-heroicons-minus", class: "text-black text-lg" }, null, _parent2, _scopeId)); } else { return [ createVNode(_component_UIcon, { name: "i-heroicons-minus", class: "text-black text-lg" }) ]; } }), _: 1 }, _parent)); _push(`</div></div></div></div>`); if (0 < unref(form).length) { _push(`<!--[-->`); ssrRenderList(unref(data).feilds, (row, index) => { _push(`<!--[-->`); if (!["du", "dd", "dw", "dh"].includes(row.key)) { _push(`<div${ssrRenderAttr("dir", _ctx.$i18n.locale == "en" ? "ltr" : "rtl")} class="w-full flex justify-between items-center mb-3"><label class="${ssrRenderClass([_ctx.$i18n.locale == "en" ? "mr-2 text-left" : "ml-2 text-right", "block w-5/12 text-gray-500 bg-white text-xs"])}">${ssrInterpolate(_ctx.$i18n.locale == "en" ? row.setting.title_en : row.setting.title)}</label><div class="w-7/12">`); _push(ssrRenderComponent(_component_UInput, { onKeypress: unref(MainStore).NumbersOnly, variant: "outline", type: "number", inputClass: " w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 py-0 text-xs", value: unref(form)[index].value, onInput: ($event) => onInput($event, row.id, row.key) }, null, _parent)); _push(`</div></div>`); } else { _push(`<!---->`); } _push(`<!--]-->`); }); _push(`<!--]-->`); } else { _push(`<!---->`); } _push(`<footer class="bg-white flex justify-between items-center pb-2 pt-1 sm:border-r sm:border-l w-full sm:w-9/12 md:w-7/12 lg:w-6/12 2xl:w-5/12 mx-auto fixed bottom-0 right-0 left-0 border-t"><div class="px-1 w-full">`); _push(ssrRenderComponent(_component_UButton, { loading: unref(loading), onClick: computing, square: "", class: "w-full flex text-white rounded-sm border h-10 bg-main-700 items-center justify-center" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`<span class="block px-2 text-xs bold truncate"${_scopeId}>${ssrInterpolate(unref(t)("Edit settings"))}</span>`); } else { return [ createVNode("span", { class: "block px-2 text-xs bold truncate" }, toDisplayString(unref(t)("Edit settings")), 1) ]; } }), _: 1 }, _parent)); _push(`</div></footer></div></section>`); }; } }); const _sfc_setup = _sfc_main.setup; _sfc_main.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/unit/setting/[id].vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; export { _sfc_main as default }; //# sourceMappingURL=_id_-DLyarS7A.mjs.map
Coded With 💗 by
0x6ick Mod By V1rus_Alfa