PageSourceSearch

https://enthub.it/build/assets/Notifications-DkvUs-0x.js

js enthub.it collected 2026-10-02 17:05:11 UTC 2,947 bytes, 2 lines download raw bytes

1import{f as e,l as s,a1 as t,A as n}from"./app-CICyuc6M.js";import{_ as a}from"./SettingsHeader-C_--AIjR.js";import{aD as o,r as i,s as c,c as l,o as r,f as d,x as m,u,h as p,z as _,w as f,y as v,N as g,a as w,l as k}from"./vendor-_ETPJXLX.js";import{s as b}from"./axiosErrors-CEKVqskX.js";/* empty css            */import"./media-vendor-B3MfMz-y.js";const h={class:"block bg-background sm:rounded-lg pb-2 w-full"},j={class:"flex flex-col gap-4 lg:gap-6 p-4 lg:p-6"},y={class:"flex items-center justify-between gap-2"},x={class:"flex items-center justify-between gap-2"},N={class:"flex items-center justify-between gap-2"},O={class:"flex items-center justify-between gap-2"},S={class:"flex items-center justify-between gap-2"},U={class:"flex items-center gap-4"},J={layout:e},C=Object.assign(J,{__name:"Notifications",props:{user:Object,userNotificationSettings:Object},setup(e){const J=e,C=()=>{const e=J.userNotificationSettings?.notify_settings??{};return{new_comments:e.new_comments??!1,replies_comments:e.replies_comments??!1,voted:e.voted??!1,new_follower:e.new_follower??!1,mentions:e.mentions??!1}},E=o(C()),z=i(C()),A=o({}),D=i(!1);let F=JSON.stringify(E);c(()=>J.userNotificationSettings,()=>{const e=C(),s=JSON.stringify(e);s!==F&&(F=s,Object.assign(E,e),z.value={...e})});const H=l(()=>Object.keys(E).some(e=>E[e]!==z.value[e])),K=async()=>{if(!D.value){D.value=!0,Object.keys(A).forEach(e=>delete A[e]);try{await w.post(route("user.settings.notifications.update",J.user),{...E}),z.value={...E},k.success(s("Settings saved"),{autoClose:3e3})}catch(e){e.response?.data?.errors&&Object.assign(A,e.response.data.errors),b(e,s("Failed to save"))}finally{D.value=!1}}};return(o,i)=>{const c=a,l=t,w=n;return r(),d("div",h,[m(c,{user:e.user,title:("__"in o?o.__:u(s))("Notifications")},null,8,["user","title"]),p("div",j,[p("div",y,[p("span",null,_(("__"in o?o.__:u(s))("New comments to my posts")),1),m(l,{checked:E.new_comments,"onUpdate:checked":i[0]||(i[0]=e=>E.new_comments=e)},null,8,["checked"])]),p("div",x,[p("span",null,_(("__"in o?o.__:u(s))("Replies to my comments")),1),m(l,{checked:E.replies_comments,"onUpdate:checked":i[1]||(i[1]=e=>E.replies_comments=e)},null,8,["checked"])]),p("div",N,[p("span",null,_(("__"in o?o.__:u(s))("Votes on my stories and comments")),1),m(l,{checked:E.voted,"onUpdate:checked":i[2]||(i[2]=e=>E.voted=e)},null,8,["checked"])]),p("div",O,[p("span",null,_(("__"in o?o.__:u(s))("New follower")),1),m(l,{checked:E.new_follower,"onUpdate:checked":i[3]||(i[3]=e=>E.new_follower=e)},null,8,["checked"])]),p("div",S,[p("span",null,_(("__"in o?o.__:u(s))("Mentions in comments")),1),m(l,{checked:E.mentions,"onUpdate:checked":i[4]||(i[4]=e=>E.mentions=e)},null,8,["checked"])]),p("div",U,[m(w,{disabled:D.value||!H.value,onClick:g(K,["prevent"])},{default:f(()=>[v(_(("__"in o?o.__:u(s))("Save")),1)]),_:1},8,["disabled"])])])])}}});export{C as default};
2//# sourceMappingURL=Notifications-DkvUs-0x.js.map

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.