���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: index-DwAHSgES.js
import { _ as _sfc_main$1 } from "./Loading-C2dGXV1S.js"; import { b as useI18n, c as useRoute, d as useLocalePath, j as useToast, u as useHead, p as __nuxt_component_2, o as __nuxt_component_1, k as __nuxt_component_4 } from "../server.mjs"; import { _ as _sfc_main$2 } from "./ConfirmationDialog-BW8yE_nx.js"; import { _ as __nuxt_component_2$1 } from "./Card-Dw9IkhD2.js"; import { _ as __nuxt_component_3 } from "./Input-q9mM-aQy.js"; import { defineComponent, ref, reactive, withAsyncContext, unref, mergeProps, withCtx, createVNode, toDisplayString, isRef, useSSRContext } from "vue"; import { u as useAPI } from "./useAPI-CQCl9J4m.js"; import "hookable"; import { ssrRenderAttrs, ssrRenderComponent, ssrRenderAttr, ssrRenderList, ssrInterpolate, ssrRenderClass } from "vue/server-renderer"; 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 "./id-srWinFsL.js"; import "./keyboard-DxZwAodF.js"; import "./fetch-5zL7LryB.js"; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "index", __ssrInlineRender: true, async setup(__props) { let __temp, __restore; const { t, locale } = useI18n(); useRoute(); const localePath = useLocalePath(); const toast = useToast(); const isOpenProject = ref(false); const loading = ref(true); const selectedProject = ref(null); const deleteConfirmationDialogIsOpen = ref(false); function toggleDeleteDialog(row = null) { selectedProject.value = row; deleteConfirmationDialogIsOpen.value = !deleteConfirmationDialogIsOpen.value; } const state = reactive({ project_id: void 0, name: void 0, name_employer: void 0, page: 1 }); const projects = ref([ { id: null, name: "" } ]); async function getAllAnalyzeProjects() { var _a, _b; const { data } = await useAPI("/analyze/project/get", { immediate: true, server: true }); projects.value = (_b = (_a = data.value) == null ? void 0 : _a.projects) == null ? void 0 : _b.data; } [__temp, __restore] = withAsyncContext(() => getAllAnalyzeProjects()), await __temp, __restore(); console.log("projects", projects); const toggleModal = (obj) => { state.project_id = obj["id"]; state.name = obj["name"]; state.name_employer = obj["name_employer"]; isOpenProject.value = true; }; async function ProjectReq() { if (!state.name) { return toast.add({ title: t("project_name"), color: "orange" }); } if (!state.name_employer) { return toast.add({ title: t("employer_name"), color: "orange" }); } if (!state.project_id) { return toast.add({ title: t("refresh page"), color: "orange" }); } loading.value = true; await useAPI("/analyze/project/edit", { method: "POST", body: { project_id: state.project_id, name: state.name, name_employer: state.name_employer }, immediate: true, server: true }); loading.value = false; isOpenProject.value = false; } async function Delete(id) { var _a; loading.value = true; await useAPI("/analyze/project/delete", { method: "POST", body: { project_id: id ?? ((_a = selectedProject.value) == null ? void 0 : _a.id) }, immediate: true, server: true }); await getAllAnalyzeProjects(); deleteConfirmationDialogIsOpen.value = !deleteConfirmationDialogIsOpen.value; loading.value = false; } useHead({ title: t("projects_list") }); return (_ctx, _push, _parent, _attrs) => { const _component_SharedLoading = _sfc_main$1; const _component_UIcon = __nuxt_component_2; const _component_ULink = __nuxt_component_1; const _component_SharedConfirmationDialog = _sfc_main$2; const _component_UModal = __nuxt_component_2$1; const _component_UButton = __nuxt_component_4; const _component_UInput = __nuxt_component_3; if (unref(loading)) { _push(`<div${ssrRenderAttrs(mergeProps({ class: "flex items-center justify-center" }, _attrs))}>`); _push(ssrRenderComponent(_component_SharedLoading, null, null, _parent)); _push(`</div>`); } else { _push(`<div${ssrRenderAttrs(_attrs)}><section${ssrRenderAttr("dir", unref(locale) == "en" ? "ltr" : "rtl")} class="mt-6 mb-10"><ul><!--[-->`); ssrRenderList(unref(projects), (row, idx) => { _push(`<li class="py-4 w-full border-b-2 odd:bg-gray-100 even:bg-white even:text-gray-900"><div class="pb-2 px-2 cursor-pointer flex justify-between items-center"><label class="block w-full text-main-700 cursor-pointer text-xs">${ssrInterpolate(row.name)}</label><div class="flex justify-end items-center">`); _push(ssrRenderComponent(_component_UIcon, { onClick: ($event) => toggleModal(row), name: "i-heroicons-pencil-square", class: [unref(locale) == "en" ? "mr-4" : "ml-4", "text-green-600 cursor-pointer ml-4 text-base"] }, null, _parent)); _push(ssrRenderComponent(_component_ULink, { square: "", loading: unref(loading), onClick: ($event) => toggleDeleteDialog(row), class: "flex items-center !text-red-600 !shadow-none justify-center" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(ssrRenderComponent(_component_UIcon, { name: "i-heroicons-trash", class: [unref(locale) == "en" ? "mr-4" : "ml-4", "text-red-600 cursor-pointer text-base"] }, null, _parent2, _scopeId)); } else { return [ createVNode(_component_UIcon, { name: "i-heroicons-trash", class: [unref(locale) == "en" ? "mr-4" : "ml-4", "text-red-600 cursor-pointer text-base"] }, null, 8, ["class"]) ]; } }), _: 2 }, _parent)); _push(ssrRenderComponent(_component_ULink, { to: unref(localePath)("/projects/" + row.id), square: "", class: "flex text-white rounded bg-red-700 items-center justify-center" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`<span class="block p-1 text-xs truncate"${_scopeId}>${ssrInterpolate(unref(t)("View_Details"))}</span>`); } else { return [ createVNode("span", { class: "block p-1 text-xs truncate" }, toDisplayString(unref(t)("View_Details")), 1) ]; } }), _: 2 }, _parent)); _push(`</div></div></li>`); }); _push(`<!--]--></ul></section>`); _push(ssrRenderComponent(_component_SharedConfirmationDialog, { "toggle-show-up": unref(deleteConfirmationDialogIsOpen), message: unref(t)("are_you_sure_to_do_this_operation"), onOnClosed: toggleDeleteDialog, onOnConfirmed: Delete }, null, _parent)); _push(ssrRenderComponent(_component_UModal, { modelValue: unref(isOpenProject), "onUpdate:modelValue": ($event) => isRef(isOpenProject) ? isOpenProject.value = $event : null, class: "!top-0" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`<div${ssrRenderAttr("dir", unref(locale) == "en" ? "ltr" : "rtl")} class="flex justify-between items-center p-2"${_scopeId}><span class="block bold text-xs truncate !top-0 !bottom-auto !justify-start"${_scopeId}>${ssrInterpolate(unref(t)("project_information"))}</span>`); _push2(ssrRenderComponent(_component_UButton, { color: "gray", variant: "ghost", icon: "i-heroicons-x-mark-20-solid", class: "-my-1", onClick: ($event) => isOpenProject.value = false }, null, _parent2, _scopeId)); _push2(`</div><div${ssrRenderAttr("dir", unref(locale) == "en" ? "ltr" : "rtl")} class="h-96 w-full mb-6 mt-3 px-4 pt-3 max-h-full overflow-y-auto"${_scopeId}><div class="flex justify-start items-center w-full mb-3"${_scopeId}><label class="${ssrRenderClass([unref(locale) == "en" ? " text-left" : " text-right", "block w-4/12 text-gray-500 bg-white text-xs"])}"${_scopeId}>${ssrInterpolate(unref(t)("project_name"))}</label>`); _push2(ssrRenderComponent(_component_UInput, { variant: "outline", class: "w-9/12", inputClass: " w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 pl-2 py-0 text-xs", modelValue: unref(state).name, "onUpdate:modelValue": ($event) => unref(state).name = $event }, null, _parent2, _scopeId)); _push2(`</div><div class="flex justify-start items-center w-full mb-3"${_scopeId}><label class="${ssrRenderClass([unref(locale) == "en" ? " text-left" : " text-right", "block w-4/12 text-gray-500 bg-white text-xs"])}"${_scopeId}>${ssrInterpolate(unref(t)("employer_name"))}</label>`); _push2(ssrRenderComponent(_component_UInput, { loading: false, variant: "outline", class: "w-9/12", inputClass: " w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 pl-2 py-0 text-xs", modelValue: unref(state).name_employer, "onUpdate:modelValue": ($event) => unref(state).name_employer = $event }, null, _parent2, _scopeId)); _push2(`</div></div><div class="flex justify-around mb-2 items-center"${_scopeId}>`); _push2(ssrRenderComponent(_component_UButton, { onClick: ($event) => isOpenProject.value = false, square: "", class: "w-5/12 flex px-2 text-white rounded bg-blue-700 items-center justify-center" }, { default: withCtx((_2, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(`<span class="block px-2 text-xs truncate"${_scopeId2}>${ssrInterpolate(unref(t)("Cancel"))}</span>`); } else { return [ createVNode("span", { class: "block px-2 text-xs truncate" }, toDisplayString(unref(t)("Cancel")), 1) ]; } }), _: 1 }, _parent2, _scopeId)); _push2(ssrRenderComponent(_component_UButton, { loading: unref(loading), onClick: ($event) => ProjectReq(), square: "", class: "w-5/12 flex px-2 h-8 text-white rounded bg-main-700 items-center justify-center" }, { default: withCtx((_2, _push3, _parent3, _scopeId2) => { if (_push3) { _push3(`<span class="block px-2 text-xs truncate"${_scopeId2}>${ssrInterpolate(unref(t)("Edit"))}</span>`); } else { return [ createVNode("span", { class: "block px-2 text-xs truncate" }, toDisplayString(unref(t)("Edit")), 1) ]; } }), _: 1 }, _parent2, _scopeId)); _push2(`</div>`); } else { return [ createVNode("div", { dir: unref(locale) == "en" ? "ltr" : "rtl", class: "flex justify-between items-center p-2" }, [ createVNode("span", { class: "block bold text-xs truncate !top-0 !bottom-auto !justify-start" }, toDisplayString(unref(t)("project_information")), 1), createVNode(_component_UButton, { color: "gray", variant: "ghost", icon: "i-heroicons-x-mark-20-solid", class: "-my-1", onClick: ($event) => isOpenProject.value = false }, null, 8, ["onClick"]) ], 8, ["dir"]), createVNode("div", { dir: unref(locale) == "en" ? "ltr" : "rtl", class: "h-96 w-full mb-6 mt-3 px-4 pt-3 max-h-full overflow-y-auto" }, [ createVNode("div", { class: "flex justify-start items-center w-full mb-3" }, [ createVNode("label", { class: [unref(locale) == "en" ? " text-left" : " text-right", "block w-4/12 text-gray-500 bg-white text-xs"] }, toDisplayString(unref(t)("project_name")), 3), createVNode(_component_UInput, { variant: "outline", class: "w-9/12", inputClass: " w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 pl-2 py-0 text-xs", modelValue: unref(state).name, "onUpdate:modelValue": ($event) => unref(state).name = $event }, null, 8, ["modelValue", "onUpdate:modelValue"]) ]), createVNode("div", { class: "flex justify-start items-center w-full mb-3" }, [ createVNode("label", { class: [unref(locale) == "en" ? " text-left" : " text-right", "block w-4/12 text-gray-500 bg-white text-xs"] }, toDisplayString(unref(t)("employer_name")), 3), createVNode(_component_UInput, { loading: false, variant: "outline", class: "w-9/12", inputClass: " w-full !shadow-none focus:ring-1 rounded-sm focus:ring-orange-600 h-7 pl-2 py-0 text-xs", modelValue: unref(state).name_employer, "onUpdate:modelValue": ($event) => unref(state).name_employer = $event }, null, 8, ["modelValue", "onUpdate:modelValue"]) ]) ], 8, ["dir"]), createVNode("div", { class: "flex justify-around mb-2 items-center" }, [ createVNode(_component_UButton, { onClick: ($event) => isOpenProject.value = false, square: "", class: "w-5/12 flex px-2 text-white rounded bg-blue-700 items-center justify-center" }, { default: withCtx(() => [ createVNode("span", { class: "block px-2 text-xs truncate" }, toDisplayString(unref(t)("Cancel")), 1) ]), _: 1 }, 8, ["onClick"]), createVNode(_component_UButton, { loading: unref(loading), onClick: ($event) => ProjectReq(), square: "", class: "w-5/12 flex px-2 h-8 text-white rounded bg-main-700 items-center justify-center" }, { default: withCtx(() => [ createVNode("span", { class: "block px-2 text-xs truncate" }, toDisplayString(unref(t)("Edit")), 1) ]), _: 1 }, 8, ["loading", "onClick"]) ]) ]; } }), _: 1 }, _parent)); _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-6/12">`); _push(ssrRenderComponent(_component_ULink, { external: "", to: unref(localePath)("/analyze/start"), class: "w-full flex bg-green-700 hover:bg-green-600 rounded border h-7 text-white items-center justify-center" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`<span class="block px-2 text-sm truncate"${_scopeId}>${ssrInterpolate(unref(t)("New Project"))}</span>`); } else { return [ createVNode("span", { class: "block px-2 text-sm truncate" }, toDisplayString(unref(t)("New Project")), 1) ]; } }), _: 1 }, _parent)); _push(`</div><div class="px-1 w-6/12">`); _push(ssrRenderComponent(_component_ULink, { to: unref(localePath)("/"), class: "w-full flex bg-red-700 rounded border h-7 text-white items-center justify-center", color: "red" }, { default: withCtx((_, _push2, _parent2, _scopeId) => { if (_push2) { _push2(`<span class="block px-2 text-sm truncate"${_scopeId}>${ssrInterpolate(unref(t)("Main Page"))}</span>`); } else { return [ createVNode("span", { class: "block px-2 text-sm truncate" }, toDisplayString(unref(t)("Main Page")), 1) ]; } }), _: 1 }, _parent)); _push(`</div></footer></div>`); } }; } }); const _sfc_setup = _sfc_main.setup; _sfc_main.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/projects/index.vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; export { _sfc_main as default }; //# sourceMappingURL=index-DwAHSgES.js.map
Coded With 💗 by
0x6ick Mod By V1rus_Alfa