PageSourceSearch

https://www.travelgirls.com/tgv2_app_fe/static/PhotoRequests-CbS1nyeU.js

js travelgirls.com collected 2026-09-24 12:18:44 UTC 5,546 bytes, 6 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="56e57c5c-c84c-5c72-b246-d4a904d0db1d")}catch(e){}}();
3import{u as C,x as g,r as n,j as s,a as R,M as E,g as k,i as _,aI as P,C as A,L as G,b as U}from"./index-7suTBJ_-.js";import{t as f}from"./Tabs.module-tCtf9ytW.js";import{a as B}from"./NavigateToUser-DmU-NwvA.js";import{B as I}from"./Button-CwoNUgMZ.js";import{G as D}from"./GalleryList-DuoLW2Pr.js";import{T as b,a as q,c as y,U as N,b as M,d as T}from"./Config-CL3pxx_F.js";import"./Dates-BKjP7x9v.js";const w="_Area_1hvdm_1",H="_BackBtn_1hvdm_8",Y="_RequestsEmpty_1hvdm_15",O="_Requests_1hvdm_15",Q="_Item_1hvdm_19",V="_Link_1hvdm_29",W="_ItemImg_1hvdm_33",$="_Text_1hvdm_39",z="_Buttons_1hvdm_42",F="_ButtonDeny_1hvdm_49",J="_LoadMore_1hvdm_62",K="_MobileTitle_1hvdm_76",e={Area:w,BackBtn:H,RequestsEmpty:Y,Requests:O,Item:Q,Link:V,ItemImg:W,Text:$,Buttons:z,ButtonDeny:F,LoadMore:J,MobileTitle:K},X="deny",Z="allow",ss=()=>{const i=C(),r=g(o=>o.auth.user),m=g(o=>o.counters),[t,d]=n.useState(!1),[c,v]=n.useState([]),[x,u]=n.useState(!1),[L,l]=n.useState(!1),a=()=>{t&&l(!0),_.get("/private-photo-requests/"+r.id+"?from="+c.length).then(o=>{d(!0),v([...c,...o.data.list]),l(!1),x!==o.data.hasMore&&u(o.data.hasMore)}).catch(o=>{d(!0),l(!1)})},h=(o,j)=>{_.post("/private-photo-requests/"+r.id+"/"+j+"/response",{action:o}),i(P.set({name:"photoRequests",count:m.photoRequests-1}));const p=c.filter(S=>S.user.id!==j);v(p)};return n.useEffect(a,[]),t?s.jsx("div",{children:c.length===0?s.jsx("div",{className:e.RequestsEmpty,children:"No photo requests."}):s.jsxs("div",{className:e.Requests,children:[s.jsx("p",{className:e.Text,children:"Wants to see your private photos"}),c.map((o,j)=>{const p=o.user;return s.jsxs("div",{className:e.Item,children:[s.jsxs(E,{to:B(p).pathname,state:{fromRequests:!0},className:e.Link,children:[s.jsx("img",{className:e.ItemImg,src:k(p.photo,100,p),alt:""}),p.name]}),s.jsxs("div",{className:e.Buttons,children:[s.jsx("button",{className:"ButtonRounded",onClick:()=>h(Z,p.id),children:"Allow"}),s.jsx("button",{className:["ButtonRounded",e.ButtonDeny].join(" "),onClick:()=>h(X,p.id),children:s.jsx("i",{className:"tg-icon icon-close-big"})})]})]},j)}),x?s.jsx("div",{className:e.LoadMore,children:s.jsx(I,{onClick:a,isLoading:L,btnType:"GalleryLoadMore",children:"Load more"})}):null]})}):s.jsx(R,{})},es=()=>{const i=g(l=>l.auth.user),[r,m]=n.useState(!1),[t,d]=n.useState([]),[c,v]=n.useState(!1),[x,u]=n.useState(!1),L=()=>{r&&u(!0),_.get("/private-photo-permits/"+i.id+"?from="+t.length).then(l=>{m(!0);const a=l.data.list.map(h=>h.user);d([...t,...a]),u(!1),c!==l.data.hasMore&&v(l.data.hasMore)}).catch(l=>{m(!0),u(!1)})};return n.useEffect(L,[]),r?s.jsxs("div",{className:e.Requests,children:[s.jsx("p",{className:e.Text,children:"You have access to view private photos"}),s.jsx(D,{userList:t,isLoading:x,fromPermits:!0}),c?s.jsx("div",{className:e.LoadMore,children:s.jsx(I,{onClick:L,isLoading:x,btnType:"GalleryLoadMore",children:"Load more"})}):null]}):s.jsx(R,{})},ts=()=>{const i=g(a=>a.auth.user),[r,m]=n.useState(!1),[t,d]=n.useState([]),[c,v]=n.useState(!1),[x,u]=n.useState(!1),L=()=>{r&&u(!0),_.get("/given_private_photo_permissions/"+i.id+"?from="+t.length).then(a=>{m(!0),d([...t,...a.data.list]),u(!1),c!==a.data.hasMore&&v(a.data.hasMore)}).catch(a=>{m(!0),u(!1)})},l=a=>{_.post("/given_private_photo_permissions/"+i.id+"/"+a+"/remove");const h=t.filter(o=>o.user.id!==a);d(h)};return n.useEffect(L,[]),r?s.jsx("div",{children:t.length===0?s.jsx("div",{className:e.RequestsEmpty,children:"You have not given access to private photos."}):s.jsxs("div",{className:e.Requests,children:[s.jsx("p",{className:e.Text,children:"Has access to view your private photos"}),t.map((a,h)=>{const o=a.user;return s.jsxs("div",{className:e.Item,children:[s.jsxs(E,{to:B(o).pathname,state:{fromGivenPermits:!0},className:e.Link,children:[s.jsx("img",{className:e.ItemImg,src:k(o.photo,100,o),alt:""}),o.name]}),s.jsx("div",{className:e.Buttons,children:s.jsx("button",{className:["ButtonRounded",e.ButtonDeny].join(" "),onClick:()=>l(o.id),children:s.jsx("i",{className:"tg-icon icon-close-big"})})})]},h)}),c?s.jsx("div",{className:e.LoadMore,children:s.jsx(I,{onClick:L,isLoading:x,btnType:"GalleryLoadMore",children:"Load more"})}):null]})}):s.jsx(R,{})},us=()=>{const i=A(),r=G(),t=U().pathname,d=()=>
3{if(r==="PUSH"){i(-1);return}i("/conversations")};return s.jsxs("div",{className:e.Area,children:[s.jsx("button",{className:e.BackBtn,onClick:d,children:s.jsx("i",{className:"tg-icon icon-tick-back"})}),s.jsxs("h2",{children:[s.jsx("span",{className:"HiddenMobile",children:"Photo requests"}),s.jsxs("span",{className:e.MobileTitle,children:[t===N&&b,t===M&&q,t===T&&y]})]}),s.jsx(os,{activeTab:t,goTo:c=>i(c)}),t===N?s.jsx(ss,{}):null,t===M?s.jsx(es,{}):null,t===T?s.jsx(ts,{}):null]})},os=({goTo:i,activeTab:r})=>s.jsxs("div",{className:f.Tabs,children:[s.jsx("button",{onClick:()=>i("/photo-requests"),className:r===N?f.Selected:null,children:b}),s.jsx("button",{onClick:()=>i("/photo-requests/permits"),className:r===M?f.Selected:null,children:q}),s.jsx("button",{onClick:()=>i("/photo-requests/my-given-permits"),className:r===T?f.Selected:null,children:y})]});export{us as default};
4//# sourceMappingURL=PhotoRequests-CbS1nyeU.js.map
5
6//# debugId=56e57c5c-c84c-5c72-b246-d4a904d0db1d

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.