1import{d as M,u as L,c as f,a as V,b as d,e as T,f as t,j as n,g as u,h as i,n as w,k as b,t as p,v as C,y as I,m as S,_ as P,p as U}from"./index-CvDJwzA3.js";import H from"./IconShape-ezjQNvVc.js";import{_ as N}from"./IconUploader.vue_vue_type_script_setup_true_lang-BH566peP.js";const W={class:"bg-white rounded-2xl shadow-2xl w-full overflow-hidden"},D={class:"p-6 space-y-6 max-h-[70vh] overflow-y-auto"},F={class:"flex gap-3 mb-3"},R=["value"],q=["value"],A={class:"flex items-center justify-between bg-gray-50 p-3 rounded-lg border border-gray-100"},E={class:"relative inline-flex items-center cursor-pointer"},O=["checked"],J={class:"text-sm font-bold text-gray-800 mb-4 flex items-center gap-2"},K={key:0,class:"text-[10px] px-2 py-0.5 bg-blue-100 text-blue-600 rounded-full"},Q={class:"space-y-4"},X={class:"flex gap-2 bg-gray-100 p-1 rounded-lg"},Y={class:"flex justify-between mb-2"},Z={class:"text-xs font-mono text-blue-600 bg-blue-50 px-1.5 rounded"},ee=["value"],te={class:"flex justify-between mb-2"},oe={class:"text-xs font-mono text-blue-600 bg-blue-50 px-1.5 rounded"},le=["value"],se={class:"flex justify-between mb-2"},ae={class:"text-xs font-mono text-blue-600 bg-blue-50 px-1.5 rounded"},re=["value"],ne={class:"text-sm font-bold text-gray-800 mb-4 flex items-center gap-2"},de={key:0,class:"text-[10px] px-2 py-0.5 bg-purple-100 text-purple-600 rounded-full"},ue={class:"space-y-4"},ie={class:"flex items-center justify-between"},pe={class:"flex items-center gap-3"},ge={class:"flex flex-col items-center gap-1",title:"å¡çæ é¢é¢è²"},ce=["value"],be={class:"flex flex-col items-center gap-1",title:"å¡çèæ¯é¢è²"},xe={key:0,class:"flex flex-col items-center gap-1 w-16"},fe={class:"text-[10px] text-gray-400"},ve={class:"flex flex-col items-center gap-1"},ye={class:"relative inline-flex items-center cursor-pointer"},me=["checked"],he={class:"border-t border-gray-100 pt-4"},ke={class:"space-y-3"},we={class:"flex items-center gap-2"},Ce=["value"],Ie={key:0,class:"grid grid-cols-2 gap-4 mt-2 p-3 bg-gray-50 rounded-lg"},Se={class:"block text-[10px] text-gray-400 mb-1 flex justify-between"},Be=["value"],$e={class:"block text-[10px] text-gray-400 mb-1 flex justify-between"},ze=["value"],je={class:"flex gap-3 items-center"},Ge=["value"],_e={class:"w-10 h-10 flex items-center justify-center bg-gray-100 rounded-lg"},Me=M({__name:"GroupSettingsModal",props:{show:{type:Boolean},groupId:{}},emits:["update:show"],setup(h,{emit:B}){const v=h,$=B,a=L(),o=f(()=>a.groups.find(s=>s.id===v.groupId)),y=()=>$("update:show",!1),r=s=>{v.groupId&&a.updateGroup(v.groupId,s)},z=()=>{o.value&&confirm(`ç¡®å®è¦å é¤åç» "${o.value.title}" åå
¶ææå
容åï¼`)&&(a.deleteGroup(o.value.id,!0),y())},j=()=>
1{if(o.value&&confirm("ç¡®å®è¦éç½®æ¤åç»çææè®¾ç½®ï¼æ¢å¤ä¸ºå
¨å±é»è®¤åï¼")){const{id:s}=o.value;a.updateGroup(s,{titleColor:void 0,cardLayout:void 0,cardSize:void 0,gridGap:void 0,cardBgColor:void 0,showCardBackground:void 0,iconShape:void 0,backgroundImage:void 0,backgroundBlur:void 0,backgroundMask:void 0,autoHideTitle:void 0})}},G=()=>{if(!o.value)return;const s={isPublic:!0};if(o.value.items){const e=o.value.items.map(l=>({...l,isPublic:!0}));s.items=e}r(s)},_=()=>{if(!o.value||!o.value.items)return;const s=o.value.items.map(e=>({...e,isPublic:!1}));r({isPublic:!1,items:s})},k=f(()=>o.value?.cardBgColor||a.appConfig.cardBgColor||"#ffffff"),m=f({get:()=>{const s=k.value;if(s.startsWith("#"))return s.substring(0,7);if(s.startsWith("rgba")||s.startsWith("rgb")){const e=s.match(/\d+/g);if(e&&e.length>=3){const l=parseInt(e[0]).toString(16).padStart(2,"0"),g=parseInt(e[1]).toString(16).padStart(2,"0"),c=parseInt(e[2]).toString(16).padStart(2,"0");return`#${l}${g}${c}`}}return"#ffffff"},set:s=>{const e=x.value,l=parseInt(s.slice(1,3),16),g=parseInt(s.slice(3,5),16),c=parseInt(s.slice(5,7),16);r({cardBgColor:`rgba(${l}, ${g}, ${c}, ${e})`})}}),x=f({get:()=>{const s=k.value;if(s.startsWith("rgba")){const e=s.match(/[\d\.]+/g);if(e&&e.length>=4)return parseFloat(e[3])}return 1},set:s=>{const e=m.value,l=parseInt(e.slice(1,3),16),g=parseInt(e.slice(3,5),16),c=parseInt(e.slice(5,7),16);r({cardBgColor:`rgba(${l}, ${g}, ${c}, ${s})`})}});return(s,e)=>(d(),V(P,{show:h.show&&!!o.value,"z-index":50,"close-on-overlay":"","overlay-class":"bg-black/40 backdrop-blur-sm p-4","panel-class":"max-w-md",onClose:y},{default:T(()=>[t("div",W,[t("div",{class:"px-6 py-4 border-b border-gray-100 flex justify-between items-center bg-gray-50/50"},[e[18]||(e[18]=t("h3",{class:"text-lg font-bold text-gray-800"},"åç»è®¾ç½®",-1)),t("button",{onClick:y,class:"text-gray-400 hover:text-gray-600 text-2xl leading-none"}," à ")]),t("div",D,[t("div",null,[e[22]||(e[22]=t("label",{class:"block text-sm font-bold text-gray-600 mb-2"},"åç»æ é¢",-1)),t("div",F,[t("input",{value:o.value.title,onInput:e[0]||(e[0]=l=>r({title:l.target.value})),type:"text",class:"flex-1 px-4 py-2 rounded-lg border border-gray-200 focus:border-blue-500 outline-none transition-colors"},null,40,R),t("input",{type:"color",value:o.value.titleColor||n(a).appConfig.titleColor||"#374151",onInput:e[1]||(e[1]=l=>r({titleColor:l.target.value})),class:"w-10 h-10 rounded cursor-pointer border-0 p-0",title:"æ é¢é¢è²"},null,40,q)]),t("div",{class:"flex items-center justify-between bg-gray-50 p-3 rounded-lg border border-gray-100"},[e[19]||(e[19]=t("div",{class:"flex flex-col"},[t("span",{class:"text-xs font-bold text-gray-700"},"å
¬å¼æ¤åç»ï¼ä¸æ¬¡æ§æ§è¡ï¼"),t("span",{class:"text-[10px] text-gray-400"},"å
许æªç»å½è®¿å®¢æ¥çæ¤åç»å
容")],-1)),t("div",{class:"flex gap-2"},[t("button",{onClick:_,class:"px-3 py-1.5 bg-white border border-gray-200 text-gray-600 text-xs font-bold rounded-lg shadow-sm hover:bg-red-50 hover:text-red-600 hover:border-red-200 transition-colors"}," ä¸å
¬å¼ "),t("button",{onClick:G,class:"px-3 py-1.5 bg-white border border-gray-200 text-gray-600 text-xs font-bold rounded-lg shadow-sm hover:bg-blue-50 hover:text-blue-600 hover:border-blue-200 transition-colors"}," å
¬å¼ ")])]),t("div",A,[e[21]||(e[21]=t("div",{class:"flex flex-col"},[t("span",{class:"text-xs font-bold text-gray-700"},"èªå¨éèæ é¢"),t("span",{class:"text-[10px] text-gray-400"},"é¼ æ æ¬åæ¶ææ¾ç¤ºç»ååæä½æé®")],-1)),t("label",E,[t("input",{type:"checkbox",checked:!!o.value.autoHideTitle,onChange:e[2]||(e[2]=l=>r({autoHideTitle:l.target.checked})),class:"sr-only peer"},null,40,O),e[20]||(e[20]=t("div",{class:"w-9 h-5 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-blue-500"},null,-1))])])]),e[44]||(e[44]=t("div",{class:"border-t border-gray-100"},null,-1)),t("div",null,[t("h4",J,[e[23]||(e[23]=t("span",null,"ð å¸å±ä¸é´è·",-1)),o.value.cardLayout||o.value.gridGap?(d(),u("span",K,"å·²èªå®ä¹")):i("",!0)]),t("div",Q,[t("div",null,[e[26]||(e[26]=t("label",{class:"text-xs font-bold text-gray-500 mb-2 block"},"å¡çå¸å±",-1)),t("div",X,[t("button",{onClick:e[3]||(e[3]=l=>r({cardLayout:"vertical"})),class:w(["flex-1 py-1.5 text-xs rounded-md transition-all flex items-center justify-center gap-1",(o.value.cardLayout||n(a).appConfig.cardLayout)==="vertical"?"bg-white shadow-sm text-blue-600 font-bold":"text-gray-500 hover:text-gray-700"])},[...e[24]||(e[24]=[t("span",{class:"text-base"},"ð±",-1),b(" åç´ ",-1)])],2),t("button",{onClick:e[4]||(e[4]=l=>r({cardLayout:"horizontal"})),class:w(["flex-1 py-1.5 text-xs rounded-md transition-all flex items-center justify-center gap-1",(o.value.cardLayout||n(a).appConfig.cardLayout)==="horizontal"?"bg-white shadow-sm text-blue-600 font-bold":"text-gray-500 hover:text-gray-700"])},[...e[25]||(e[25]=[t("span",{class:"text-base"},"ð³",-1),b(" æ°´å¹³ ",-1)])],2)])]),t("div",null,[t("div",Y,[e[27]||(e[27]=t("label",{class:"text-xs font-bold text-gray-500"},"å¡çé´è·",-1)),t("span",Z,p(o.value.gridGap??n(a).appConfig.gridGap)+"px",1)]),t("input",{type:"range",value:o.value.gridGap??n(a).appConfig.gridGap,onInput:e[5]||(e[5]=l=>r({gridGap:parseInt(l.target.value)})),min:"4",max:"32",step:"2",class:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-blue-400"},null,40,ee)]),t("div",null,[t("div",te,[e[28]||(e[28]=t("label",{class:"text-xs font-bold text-gray-500"},"å¡ç大å°",-1)),t("span",oe,p(o.value.cardSize??n(a).appConfig.cardSize??120)+"px",1)]),t("input",{type:"range",value:o.value.cardSize??n(a).appConfig.cardSize??120,onInput:e[6]||(e[6]=l=>r({cardSize:parseInt(l.target.value)})),min:"60",max:"216",step:"4",class:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-blue-400"}
1,null,40,le)]),t("div",null,[t("div",se,[e[29]||(e[29]=t("label",{class:"text-xs font-bold text-gray-500"},"徿 大å°",-1)),t("span",ae,p(o.value.iconSize??n(a).appConfig.iconSize??48)+"px",1)]),t("input",{type:"range",value:o.value.iconSize??n(a).appConfig.iconSize??48,onInput:e[7]||(e[7]=l=>r({iconSize:parseInt(l.target.value)})),min:"20",max:"100",step:"2",class:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-blue-400"},null,40,re)])])]),e[45]||(e[45]=t("div",{class:"border-t border-gray-100"},null,-1)),t("div",null,[t("h4",ne,[e[30]||(e[30]=t("span",null,"ð¨ å¡çæ ·å¼",-1)),o.value.cardBgColor||o.value.showCardBackground!==void 0||o.value.iconShape?(d(),u("span",de,"å·²èªå®ä¹")):i("",!0)]),t("div",ue,[t("div",ie,[e[36]||(e[36]=t("div",null,[t("div",{class:"text-xs font-bold text-gray-600"},"å¡çå¤è§"),t("div",{class:"text-[10px] text-gray-400"},"èæ¯è² / åä½é¢è²")],-1)),t("div",pe,[t("div",ge,[e[31]||(e[31]=t("span",{class:"text-[10px] text-gray-400"},"æå",-1)),t("input",{type:"color",value:o.value.cardTitleColor||n(a).appConfig.cardTitleColor||"#111827",onInput:e[8]||(e[8]=l=>r({cardTitleColor:l.target.value})),class:"w-6 h-6 rounded-full cursor-pointer border-0 p-0 overflow-hidden shadow-sm"},null,40,ce)]),e[35]||(e[35]=t("div",{class:"w-px h-8 bg-gray-200 mx-1"},null,-1)),t("div",be,[e[32]||(e[32]=t("span",{class:"text-[10px] text-gray-400"},"èæ¯",-1)),o.value.showCardBackground??n(a).appConfig.showCardBackground?C((d(),u("input",{key:0,type:"color","onUpdate:modelValue":e[9]||(e[9]=l=>m.value=l),class:"w-6 h-6 rounded-full cursor-pointer border-0 p-0 overflow-hidden shadow-sm"},null,512)),[[I,m.value]]):i("",!0)]),o.value.showCardBackground??n(a).appConfig.showCardBackground?(d(),u("div",xe,[t("span",fe,"éæåº¦ "+p(Math.round(x.value*100))+"%",1),C(t("input",{type:"range",min:"0",max:"1",step:"0.05","onUpdate:modelValue":e[10]||(e[10]=l=>x.value=l),class:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-blue-400"},null,512),[[I,x.value,void 0,{number:!0}]])])):i("",!0),t("div",ve,[e[34]||(e[34]=t("span",{class:"text-[10px] text-gray-400"},"æ¾ç¤º",-1)),t("label",ye,[t("input",{type:"checkbox",checked:o.value.showCardBackground??n(a).appConfig.showCardBackground,onChange:e[11]||(e[11]=l=>r({showCardBackground:l.target.checked})),class:"sr-only peer"},null,40,me),e[33]||(e[33]=t("div",{class:"w-9 h-5 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-blue-500"},null,-1))])])])]),t("div",he,[e[39]||(e[39]=t("label",{class:"text-xs font-bold text-gray-500 mb-2 block"},[b(" å¡çèæ¯å¾ "),t("span",{class:"text-[10px] font-normal text-gray-400"},"(åºç¨å°ç»å
ææå¡ç)")],-1)),t("div",ke,[t("div",we,[t("input",{value:o.value.backgroundImage,onInput:e[12]||(e[12]=l=>r({backgroundImage:l.target.value})),type:"text",placeholder:"èæ¯å¾ URL...",class:"flex-1 px-3 py-2 bg-gray-50 border border-gray-200 rounded-lg text-sm outline-none focus:border-blue-500"},null,40,Ce),o.value.backgroundImage?(d(),u("button",{key:0,onClick:e[13]||(e[13]=l=>r({backgroundImage:""})),class:"text-gray-400 hover:text-red-500 px-2",title:"æ¸
é¤èæ¯"}," â ")):i("",!0)]),S(N,{modelValue:o.value.backgroundImage,"onUpdate:modelValue":e[14]||(e[14]=l=>r({backgroundImage:l})),crop:!1,uploadOnly:!0,previewStyle:{filter:`blur(${o.value.backgroundBlur??6}px)`,transform:"scale(1.1)"},overlayStyle:{backgroundColor:`rgba(0,0,0,${o.value.backgroundMask??.3})`}},null,8,["modelValue","previewStyle","overlayStyle"]),o.value.backgroundImage?(d(),u("div",Ie,[t("div",null,[t("label",Se,[e[37]||(e[37]=t("span",null,"模ç³åå¾",-1)),t("span",null,p(o.value.backgroundBlur??6)+"px",1)]),t("input",{type:"range",value:o.value.backgroundBlur??6,onInput:e[15]||(e[15]=l=>r({backgroundBlur:parseInt(l.target.value)})),min:"0",max:"20",step:"1",class:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-blue-400"},null,40,Be)]),t("div",null,[t("label",$e,[e[38]||(e[38]=t("span",null,"é®ç½©æµåº¦",-1)),t("span",null,p(Math.round((o.value.backgroundMask??.3)*100))+"%",1)]),t("input",{type:"range",value:o.value.backgroundMask??.3,onInput:e[16]||(e[16]=l=>r({backgroundMask:parseFloat(l.target.value)})),min:"0",max:"1",step:"0.1",class:"w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer accent-blue-400"},null,40,ze)])])):i("",!0)])]),t("div",null,[e[41]||(e[41]=t("label",{class:"text-xs font-bold text-gray-500 mb-2 block"},"徿 å½¢ç¶",-1)),t("div",je,[t("select",{value:o.value.iconShape||n(a).appConfig.iconShape,onCh
1ange:e[17]||(e[17]=l=>r({iconShape:l.target.value})),class:"flex-1 px-3 py-2 bg-gray-50 border border-gray-200 rounded-lg text-sm outline-none focus:border-blue-500"},[...e[40]||(e[40]=[t("option",{value:"none"},"æ å½¢ç¶",-1),t("option",{value:"hidden"},"ä¸ä½¿ç¨å¾æ ",-1),t("option",{value:"rounded"},"åè§ç©å½¢",-1),t("option",{value:"square"},"æ¹å½¢",-1),t("option",{value:"circle"},"åå½¢",-1),t("option",{value:"leaf"},"å¶å½¢",-1),t("option",{value:"diamond"},"è±å½¢",-1),t("option",{value:"pentagon"},"äºè§å½¢",-1),t("option",{value:"hexagon"},"å
边形",-1),t("option",{value:"octagon"},"å
«è¾¹å½¢",-1)])],40,Ge),t("div",_e,[S(H,{shape:o.value.iconShape||n(a).appConfig.iconShape,size:24,bgClass:"fill-blue-500",icon:""},null,8,["shape"])])])])])]),e[46]||(e[46]=t("div",{class:"border-t border-gray-100"},null,-1)),t("div",{class:"space-y-3"},[t("button",{onClick:j,class:"w-full py-2.5 rounded-xl text-sm font-bold text-gray-600 bg-gray-100 hover:bg-gray-200 transition-colors flex items-center justify-center gap-2"},[...e[42]||(e[42]=[t("span",null,"ð",-1),b(" æ¢å¤é»è®¤è®¾ç½® ",-1)])]),t("button",{onClick:z,class:"w-full py-2.5 rounded-xl text-sm font-bold text-red-600 bg-red-50 hover:bg-red-100 transition-colors flex items-center justify-center gap-2"},[...e[43]||(e[43]=[t("span",null,"ðï¸",-1),b(" å 餿¤åç» ",-1)])])])])])]),_:1},8,["show"]))}}),Pe=U(Me,[["__scopeId","data-v-14dcc267"]]);export{Pe 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.