PageSourceSearch

https://0x.kz/build/assets/ProjectItem-BZrrvW95.js

js 0x.kz collected 2026-10-09 04:37:47 UTC 3,373 bytes, 1 lines download raw bytes

1import{o as n,c as i,a as r,_ as x,B as h,n as a,t as l,d as p,w as c,b}from"./app-DVhk9hEg.js";/* empty css            */function m(t,e){return n(),i("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[r("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 12.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 18.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5Z"})])}const g={name:"ProjectItem",components:{EllipsisVerticalIcon:m},props:{project:{type:Object,required:!0},index:{type:Number,default:0}},emits:["open"],data(){return{showMenu:!1}},computed:{projectName(){return this.project.name||this.project.title||this.project.project_name||"Без названия"},projectSubtitle(){return this.project.description||this.project.status||this.project.type||""},initials(){const t=this.projectName.trim();if(!t)return"?";const e=t.split(/\s+/);return e.length===1?e[0].slice(0,2).toUpperCase():(e[0].charAt(0)+e[1].charAt(0)).toUpperCase()},accentColor(){const t=["bg-[#4f46e5]","bg-[#10b981]","bg-[#f97316]","bg-[#3b82f6]","bg-[#a855f7]"];return t[this.index%t.length]},avatarColor(){const t=["bg-[#eef0ff] text-[#4f46e5]","bg-[#eafbf5] text-[#10b981]","bg-[#fff4eb] text-[#f97316]","bg-[#eef4ff] text-[#3b82f6]","bg-[#f5edff] text-[#a855f7]"];return t[this.index%t.length]}},methods:{toggleMenu(){this.showMenu=!this.showMenu},openProject(){console.log(123),this.$emit("open",this.project)}}},j={class:"flex min-h-[58px] cursor-pointer items-center px-3 py-2.5 sm:px-4"},w={class:"min-w-0 flex-1"},v={class:"truncate text-[13px] font-semibold leading-5 text-[#273142]"},_={key:0,class:"mt-0.5 truncate text-[11px] text-[#8991a1]"},y={key:0,class:"absolute right-3 top-[calc(100%-4px)] z-20 w-40 overflow-hidden rounded-lg border border-[#e5e7eb] bg-white py-1 shadow-lg"};function k(t,e,d,C,f,o){const u=h("EllipsisVerticalIcon");return n(),i("div",{class:"group relative overflow-hidden rounded-xl border border-[#e8ebf1] bg-white transition-all duration-200 hover:-translate-y-[1px] hover:border-[#d9ddff] hover:shadow-[0_6px_20px_rgba(30,35,90,0.06)]",onClick:e[3]||(e[3]=s=>t.$emit("open",d.project))},[r("div",{class:a(["absolute inset-y-0 left-0 w-[2px]",o.accentColor])},null,2),r("div",j,[r("div",{class:a(["mr-3 flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-[11px] font-semibold",o.avatarColor])},l(o.initials),3),r("div",w,[r("p",v,l(o.projectName),1),o.projectSubtitle?(n(),i("p",_,l(o.projectSubtitle),1)):p("",!0)]),r("button",{type:"button",class:"ml-3 flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-[#697386] transition-colors hover:bg-[#f4f5f8] hover:text-[#202737]",onClick:e[0]||(e[0]=c((...s)=>o.openProject&&o.openProject(...s),["stop"]))},[b(u,{class:"h-5 w-5"})])]),f.showMenu?(n(),i("div",y,[r("button",{type:"button",class:"flex w-full items-center px-3 py-2 text-left text-xs text-[#374151] hover:bg-[#f6f7fb]",onClick:e[1]||(e[1]=c((...s)=>o.openProject&&o.openProject(...s),["stop"]))}," Открыть "),r("button",{type:"button",class:"flex w-full items-center px-3 py-2 text-left text-xs text-red-500 hover:bg-red-50",onClick:e[2]||(e[2]=c(()=>{},["stop"]))}," Удалить ")])):p("",!0)])}const P=x(g,[["render",k]]);export{P as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.