PageSourceSearch

https://velaflow.com/_next/static/chunks/pages/settings/privacy-security/muted-tags-c211af969859dfa7.js

js velaflow.com collected 2026-09-24 13:03:27 UTC 8,706 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3389],{13229:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/privacy-security/muted-tags",function(){return t(58406)}])},25035:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});var l=t(37876);t(14232);var a=t(96145);let r=e=>{let{onBack:s,text:t}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex items-center ml-7 space-x-2 mb-6",children:[(0,l.jsx)(a.In,{onClick:s,id:"arrow-left-icn",className:"w-5 h-5 align-middle inline-block cursor-pointer"}),(0,l.jsx)(a.DZ,{type:"h2",text:t,className:"text-14 text-black"})]}),(0,l.jsx)("hr",{className:"my-2 pl-0 border-dividerGrey"})]})}},58406:(e,s,t)=>{"use strict";t.r(s),t.d(s,{__N_SSP:()=>N,default:()=>b});var l=t(37876),a=t(14232),r=t(25035),n=t(89099),i=t(96145),d=t(81220),c=t(15234),u=t(10841),o=t.n(u),x=t(91408);let m=x.Ik().shape({hashtag:x.Yj().required("Hashtag or tag is required"),mute_duration:x.Yj().required("Mute Duration is required"),mute_in:x.Yj().required("Mute In is required")}),h=[{label:"24 Hours",value:"1"},{label:"7 Days",value:"2"},{label:"30 Days",value:"3"}],p=[{label:"Tags",value:"1"},{label:"Text & Tags",value:"2"}],j={hashtag:"",mute_duration:"",mute_in:"",exclude_users:!1},v=e=>{let{handleAddTagsModal:s,addTagsModal:t,fetchMutedTags:r}=e,[n,u]=(0,a.useState)(j),[x,v]=(0,a.useState)(null),[g,f]=(0,a.useState)(!1),y=e=>{let{target:s}=e,{type:t,checked:l,name:a}=s,r="checkbox"===t?l:s.value;u({...n,[a]:r})},N=async()=>{f(!0);let{exclude_users:e,hashtag:t,mute_duration:l,mute_in:a}=n;try{await m.validate(n,{abortEarly:!1}),v({});let i=1===parseInt(a,10)?"tags":"text_tags",c=function(e){let s=0;switch(e){case 1:s=1;break;case 2:s=7;break;case 3:s=30;break;default:throw Error("Invalid code. Must be 1, 2, or 3.")}return o()().add(s,"days").format("YYYY-MM-DD")}(parseInt(l,10));(await (0,d.mn)({hashtag:t,mute_duration:c,mute_in:i,exclude_users:+!!e})).error||(u(j),f(!1),s(),r())}catch(s){f(!1);let e={};s.inner?s.inner.forEach(s=>{e[s.path]=s.message}):e[s.path]=s.message,v(e)}},{exclude_users:b,hashtag:w,mute_duration:_,mute_in:k}=n;return(0,l.jsx)(c.A,{isOpen:t,onClose:()=>{v({}),s()},header:"Take control of your feed by hiding posts that contain certain words or hashtags.",headerClass:"text-[24px]",children:(0,l.jsxs)("div",{className:"mt-3",children:[(0,l.jsx)("p",{className:"text-14 text-grey",children:"Mute specific words or tags to refine your feed."}),(0,l.jsxs)("div",{className:"w-full mt-5 rounded-[5px]",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(i.pd,{name:"hashtag",value:w,onChange:y,className:"w-full h-40 px-4 py-3 text-12 text-black border border-grey rounded outline-none focus:ring-2 focus:primary",placeholder:"Enter word or tag"}),(null==x?void 0:x.hashtag)&&(0,l.jsx)("p",{className:"text-12 text-red",children:x.hashtag})]}),(0,l.jsxs)("div",{className:"flex w-full mt-4",children:[(0,l.jsxs)("div",{className:"w-1/2",children:[(0,l.jsxs)("select",{name:"mute_duration",value:_,onChange:y,className:"w-full h-40 px-4 text-12 text-grey border border-grey rounded outline-none focus:ring-2 focus:primary",children:[(0,l.jsx)("option",{value:"",disabled:!0,children:"Duration"}),null==h?void 0:h.map(e=>(0,l.jsx)("option",{value:null==e?void 0:e.value,children:null==e?void 0:e.label},null==e?void 0:e.value))]}),(null==x?void 0:x.mute_duration)&&(0,l.jsx)("p",{className:"text-12 text-red",children:x.mute_duration})]}),(0,l.jsxs)("div",{className:"w-1/2",children:[(0,l.jsxs)("select",{name:"mute_in",value:k,onChange:y,className:"w-full ml-3 h-40 px-4 text-12 text-grey border border-grey rounded outline-none focus:ring-2 focus:primary",children:[(0,l.jsx)("option",{value:"",disabled:!0,children:"Mute in"}),null==p?void 0:p.map(e=>(0,l.jsx)("option",{value:null==e?void 0:e.value,children:null==e?void 0:e.label},null==e?void 0:e.value))]}),(null==x?void 0:x.mute_in)&&(0,l.jsx)("p",{className:"ml-3 text-12 text-red",children:x.mute_in})]})]}),(0,l.jsxs)("div",{className:"flex mt-4",children:[(0,l.jsx)(i.pd,{type:"checkbox",checked:b,name:"exclude_users",onChange:y,className:"mt-[2px] accent-primary w-[14px] focus:border-none h-[14px]"}),(0,l.jsx)(i.JU,{className:"text-left text-grey text-[13px] pl-3",children:"Exclude user you follow"})]})]}),(0,l.jsx)("div",{className:"flex flex-col gap-4 mt-6",children:(0,l.jsx)(i.$n,{onClick:N,className:"w-full text-12 bg-primary px-6 py-2 text-white rounded-[5px]",children:g?(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.jsx)(i.aH,{})}):(0,l.jsxs)("div",{className:"flex justify-center items-center",children:[(0,l.jsx)("div",{children:"Add"}),(0,l.jsx)("div",{className:"items-center p-2 mt-1",children:(0,l.jsx)(i.In,{id:"add-icn",className:"text-white w-5 h-5 align-middle inline-block"})})]})})})]})})},g=e=>{let{mutedTagsList:s}=e,[t,u]=(0,a.useState)(!1),[x,m]=(0,a.useState)(s),[h,p]=(0,a.useState)(!1),[j,g]=(0,a.useState)({}),[f,y]=(0,a.useState)(!1),N=(0,n.useRouter)(),b=()=>{p(!h)},w=async()=>{try{let e=await (0,d.Ff)({show_all:1}),s=(null==e?void 0:e.content)||[];e.error||(m(s),u(!1),p(!1))}catch(e){console.error(e,"error"),u(!1)}},_=()=>{y(!1)},k=async()=>{u(!0);try{(await (0,d._R)(null==j?void 0:j.id)).error||(y(!1),g({}),w())}catch(e){console.error(e,"error"),u(!1)}},C=(e,s)=>{let t=(null==e?void 0:e.mute_in)==="text_tags"?"text and tags":"tags";return"".concat("hashtag"===s&&(null==e?void 0:e.mute_in)==="tags"?"#":"").concat("mute_in"===s?t:e[
1s])||""};return(0,l.jsxs)("div",{className:"w-full mt-6 rounded-md",children:[(0,l.jsx)("div",{children:(0,l.jsx)(r.A,{onBack:()=>{N.push("/settings/privacy-security")},text:"Muted Words and tags"})}),(0,l.jsx)("div",{className:"flex justify-end pr-4 mt-4",children:(0,l.jsx)(i.$n,{onClick:b,className:"bg-primary px-6 py-2 text-12 text-white rounded-[5px]",children:"Add"})}),(null==x?void 0:x.length)===0?(0,l.jsx)("div",{className:"flex  justify-center",children:(0,l.jsx)("p",{className:"bg-dividerGrey rounded-lg text-center text-14 mt-3 px-20 py-5",children:"You haven't muted any words or tags yet."})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"ml-4 p-4",children:[(0,l.jsx)("p",{className:"text-14",children:"Your muted words and tags"}),t?(0,l.jsx)("div",{className:"flex justify-center mt-5 items-center",children:(0,l.jsx)(i.aH,{className:"text-black"})}):null==x?void 0:x.map((e,s)=>(0,l.jsxs)("div",{className:"bg-white flex justify-between rounded-[5px] mt-3",children:[(0,l.jsxs)("p",{className:"px-4 py-3 text-grey text-12",children:[(0,l.jsx)("span",{className:"text-black",children:C(e,"hashtag")}),(0,l.jsx)("span",{children:" in"}),(0,l.jsxs)("span",{className:"text-black",children:[" ",C(e,"mute_in")]}),(0,l.jsx)("br",{}),(0,l.jsx)("span",{className:"inline-block mt-1",children:function(e){let s=o().utc(),t=o().utc(e).diff(s,"hours");if(t<=0)return"Expired";let l=Math.ceil(t/24);return"Expires in ".concat(l," day").concat(l>1?"s":"")}(null==e?void 0:e.mute_duration)}),(null==e?void 0:e.exclude_users)&&(0,l.jsx)("span",{className:"mx-1",children:"• Excludes users you follow"})]}),(0,l.jsx)(i.$n,{onClick:s=>{y(!0),g(e)},className:"pr-2",children:(0,l.jsx)(i.In,{id:"close-cross-icn",className:"w-5 h-5 inline-block text-primary align-middle"})})]},"close-".concat(s)))]})}),(0,l.jsx)(v,{addTagsModal:h,handleAddTagsModal:b,fetchMutedTags:w}),(0,l.jsx)(c.A,{isOpen:f,onClose:_,children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col mt-6",children:[(0,l.jsx)(i.DZ,{className:"font-bold text-[20px]",type:"h2",text:"Are you sure?"}),(0,l.jsxs)("p",{className:"text-14 text-black",children:["This will delete ","“".concat(null==j?void 0:j.hashtag,"”")," from your muted words. You can add it back later."]})]}),(0,l.jsxs)("div",{className:"mt-4 flex justify-end",children:[(0,l.jsx)(i.$n,{className:"bg-grey text-14 px-5 py-2 rounded-[5px]",onClick:_,children:"Cancel"}),(0,l.jsx)(i.$n,{disabled:t,className:"ml-3 bg-red text-14 px-5 py-2 rounded-[5px] text-white",onClick:k,children:t?(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.jsx)(i.aH,{})}):"Remove"})]})]})})]})};var f=t(23555),y=t(80612),N=!0;function b(e){let{userDetails:s,mutedTagsList:t,suggestionList:a,tagsList:r}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.A,{title:"Muted Tags"}),(0,l.jsx)(f.A,{userDetails:s,tagsList:r,suggestionList:a,children:(0,l.jsx)(g,{mutedTagsList:t})})]})}},80612:(e,s,t)=>{"use strict";t.d(s,{A:()=>n});var l=t(37876),a=t(77328),r=t.n(a);function n(e){let{title:s}=e;return(0,l.jsx)(r(),{children:(0,l.jsx)("title",{children:s?"".concat(s," | Velaflow"):"Velaflow"})})}}},e=>{e.O(0,[3716,9634,1408,3555,636,6593,8792],()=>e(e.s=13229)),_N_E=e.O()}]);

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.