���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
/
.nuxt.1
/
dist
/
server
/
_nuxt
/
Viewing: settings-BhaNuX4m.js
import { _ as _sfc_main$1 } from "./Loading-C2dGXV1S.js"; import { b as useI18n, c as useRoute, d as useLocalePath, u as useHead, n as navigateTo, k as __nuxt_component_4, p as __nuxt_component_2, e as __nuxt_component_2$1 } from "../server.mjs"; import { _ as __nuxt_component_3 } from "./Input-q9mM-aQy.js"; import { defineComponent, reactive, ref, withAsyncContext, unref, mergeProps, withCtx, createVNode, toDisplayString, useSSRContext } from "vue"; import { u as useAPI } from "./useAPI-CQCl9J4m.js"; import "hookable"; import { ssrRenderAttrs, ssrRenderComponent, ssrRenderAttr, ssrInterpolate, ssrRenderList, ssrRenderClass } from "vue/server-renderer"; import { u as useMainStore } from "./index-CJ-QPhVh.js"; import "ofetch"; import "#internal/nuxt/paths"; import "unctx"; import "h3"; import "unhead"; import "@unhead/shared"; import "vue-router"; import "radix3"; import "defu"; import "devalue"; import "@vue/devtools-api"; import "destr"; import "klona"; import "cookie-es"; import "ohash"; import "@vueuse/core"; import "tailwind-merge"; import "@iconify/vue"; import "@iconify/utils/lib/css/icon"; import "./fetch-5zL7LryB.js"; import "js-cookie"; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "settings", __ssrInlineRender: true, async setup(__props) { let __temp, __restore; const { t, locale } = useI18n(); useRoute(); const MainStore = useMainStore(); let form = reactive([]); let state = reactive([{ dd: 0, du: 0, dh: 0, dw: 0 }]); const localePath = useLocalePath(); const loading = ref(true); const fields = ref([]); async function getAnalyzeSettings() { var _a, _b; const { data } = await useAPI("/analyze/setting/get", { immediate: true, server: true }); fields.value = (_b = (_a = data.value) == null ? void 0 : _a.setting) == null ? void 0 : _b.data; } [__temp, __restore] = withAsyncContext(() => getAnalyzeSettings()), await __temp, __restore(); 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, id, key) => { var obj = form.find(function(entry) { return entry.id === id; }); if (obj) { obj.value = e.target.value; } else { form.push({ id, 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/setting/update", { method: "POST", body: form, immediate: true, server: true }); return navigateTo(localePath("/analyze/start")); }; useHead({ title: t("advanced_settings") }); return (_ctx, _push, _parent, _attrs) => { const _component_SharedLoading = _sfc_main$1; const _component_UButton = __nuxt_component_4; const _component_UIcon = __nuxt_component_2; const _component_client_only = __nuxt_component_2$1; const _component_UInput = __nuxt_component_3; if (unref(loading)) { _push(`<div${ssrRenderAttrs(mergeProps({ class: "block text-center" }, _attrs))}>`); _push(ssrRenderComponent(_component_SharedLoading, null, null, _parent)); _push(`</div>`); } else { _push(`<section${ssrRenderAttrs(mergeProps({ class: "w-[95%] mx-auto lg:w-10/12" }, _attrs))}><div${ssrRenderAttr("dir", unref(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)("advanced_settings"))}</span></label></div><div${ssrRenderAttr("dir", unref(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", unref(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 (unref(form).length) { _push(`<div class="w-full"><!--[-->`); ssrRenderList(unref(fields), (row, index) => { _push(`<!--[-->`); if (!["du", "dd", "dw", "dh"].includes(row.key)) { _push(`<div${ssrRenderAttr("dir", unref(locale) == "en" ? "ltr" : "rtl")} class="${ssrRenderClass([{ "bg-gray-200": index % 2 == 0 }, "w-full flex justify-between items-center p-2"])}"><label class="${ssrRenderClass([[unref(locale) == "en" ? "mr-2 text-left" : "ml-2 text-right", index % 2 == 0 ? "bg-gray-200" : ""], "block w-5/12 text-gray-900 text-sm"])}">${ssrInterpolate(unref(locale) == "en" ? row.title_en : row.title)}</label><div class="w-7/12">`); _push(ssrRenderComponent(_component_UInput, { onKeypress: unref(MainStore).NumbersOnly, variant: "outline", color: "white", inputClass: " w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 text-sm rounded p-2", value: unref(form)[index].value, type: "number", onInput: ($event) => onInput($event, row.id, row.key) }, null, _parent)); _push(`</div></div>`); } else { _push(`<!---->`); } _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>`); } else { _push(`<div class="w-full"><h2 class="text-red-500 block mx-auto w-full text-center">${ssrInterpolate(unref(t)("there_is_no_record_to_showing"))}</h2></div>`); } _push(`</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/settings.vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; export { _sfc_main as default }; //# sourceMappingURL=settings-BhaNuX4m.js.map
Coded With 💗 by
0x6ick Mod By V1rus_Alfa