@dcl/builder-site 7.21.2 → 7.21.3-19896835659.commit-bb1d19a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{Back-DBc-1vBx.js → Back-Bt1TpmNC.js} +1 -1
- package/assets/{CollectionProvider.container-CrHF62H9.js → CollectionProvider.container-CdZDU931.js} +1 -1
- package/assets/{CollectionStatus.container-Ck64n9f3.js → CollectionStatus.container-D7SF6GBG.js} +1 -1
- package/assets/{ConfirmDelete-BQd9EOmm.js → ConfirmDelete-BvCbqgkr.js} +1 -1
- package/assets/{FileSaver.min-bsL10Ro_.js → FileSaver.min-DkBGT7wg.js} +1 -1
- package/assets/{ItemProvider.container-Cbkly4MW.js → ItemProvider.container-BE8u0Rvw.js} +2 -2
- package/assets/{JumpIn.container-jVEKSOXg.js → JumpIn.container-BA-hVJA8.js} +1 -1
- package/assets/{LandAction-BN__6nk1.js → LandAction-ClUpTbS0.js} +1 -1
- package/assets/{LandProviderPage-6uFqDW1t.js → LandProviderPage-Cle8Kso_.js} +1 -1
- package/assets/{LoggedInDetailPage.container-CzPOYbHr.js → LoggedInDetailPage.container-DWMoMSsT.js} +1 -1
- package/assets/{Navigation-UvvLkIhO.css → Navigation-BvYpwaZ8.css} +1 -1
- package/assets/{Navigation.container-zriX5zTq.js → Navigation.container-9A40G-C8.js} +1 -1
- package/assets/{NotFound-Bvndb2kC.js → NotFound-BGRBV5Uq.js} +1 -1
- package/assets/{OptionsDropdown-DGUcotEU.js → OptionsDropdown-CG8mCbxa.js} +1 -1
- package/assets/{RentalPeriod-BNaqZG4R.js → RentalPeriod-Em0xOmR0.js} +1 -1
- package/assets/{SDKTag-BQW0-0PP.js → SDKTag--yigH3bT.js} +1 -1
- package/assets/{SceneStats.container-D9cC9CyJ.js → SceneStats.container-CFQr-vWl.js} +1 -1
- package/assets/{SignInRequired-BesSl-uu.js → SignInRequired-B_3SXeXM.js} +1 -1
- package/assets/{ThirdPartyKindBadge-SbI32IAq.js → ThirdPartyKindBadge-BClaXwJI.js} +1 -1
- package/assets/{dataReader-Ba0Qfm0C.js → dataReader-BLycT3A3.js} +1 -1
- package/assets/{date-CQFozb1v.js → date-BuuPIXis.js} +1 -1
- package/assets/{fortmatic-DhMsr8rd.js → fortmatic-DJEz0rp3.js} +1 -1
- package/assets/{hooks-B7lAA488.js → hooks-aEto244t.js} +1 -1
- package/assets/index-3fCnTMv0.css +1 -0
- package/assets/{index-Cr_mRm0f.js → index-8iYCGnTs.js} +1 -1
- package/assets/{index-DRjHz-4W.js → index-BD8iJDzG.js} +1 -1
- package/assets/{index-DTDyEcLh.js → index-BHRIVcTs.js} +19 -19
- package/assets/{index-DGSF2LKw.js → index-BICUfUCl.js} +1 -1
- package/assets/{index-BfkmPalb.js → index-BQ0GFn_M.js} +1 -1
- package/assets/{index-CXldJysI.js → index-Bhseic3g.js} +1 -1
- package/assets/{index-B1s4cab3.js → index-BknYlUwd.js} +1 -1
- package/assets/{index-B8ErdMLy.css → index-BosWvral.css} +7 -7
- package/assets/{index-bX1evXRS.js → index-Br6hHsA1.js} +1 -1
- package/assets/{index-CSeYYmb9.js → index-CG8pSyWD.js} +1 -1
- package/assets/{index-CvE4yvoR.js → index-CGrCbrif.js} +1 -1
- package/assets/{index-larBLSdP.js → index-CJppakqi.js} +2 -2
- package/assets/{index-BNWFSvsr.css → index-CLw4Lv2v.css} +1 -1
- package/assets/{index-BGteFbti.css → index-CTAssOyf.css} +1 -1
- package/assets/index-CWPKklZI.js +2 -0
- package/assets/{index-jgmmEIg4.js → index-CZ8dfrU0.js} +1 -1
- package/assets/{index-CzzTGG0S.js → index-CbjNJ2Kx.js} +1 -1
- package/assets/{index-BxDlBBeP.js → index-CdewbTl9.js} +1 -1
- package/assets/{index-Bo5Cz4b1.js → index-CdmO0FNu.js} +1 -1
- package/assets/index-Cl_Vz47v.css +1 -0
- package/assets/index-Co_sF4mN.js +1 -0
- package/assets/{index-CqlRG6CV.js → index-D2M0UdRW.js} +1 -1
- package/assets/{index-D1gFlGB9.js → index-D39rSukq.js} +1 -1
- package/assets/{index-CcxrEafx.js → index-DAAeQbXS.js} +1 -1
- package/assets/{index-0Xvf2jZ3.js → index-DAx-r4m3.js} +1 -1
- package/assets/{index-D_rmY8ZP.js → index-DGucDtQe.js} +1 -1
- package/assets/{index-DirkaOPQ.js → index-DMJQXYRd.js} +1 -1
- package/assets/{index-DPyDxVwa.js → index-DOh8-nXu.js} +1 -1
- package/assets/index-DYzSJInl.js +1 -0
- package/assets/{index-BWDC11Ig.js → index-Db5vWMok.js} +1 -1
- package/assets/{index-QPDXbja9.js → index-DhWMukFk.js} +1 -1
- package/assets/{index-D_-h39nx.js → index-DlLGErhb.js} +1 -1
- package/assets/index-Dpo0OSlf.css +1 -0
- package/assets/index-DvQq0rNn.js +1 -0
- package/assets/{index-CLRLVYld.js → index-Gh2V6S8q.js} +1 -1
- package/assets/{index-CZsCbxPX.js → index-JkZS13Xr.js} +1 -1
- package/assets/{index-CzGYP0S7.js → index-LLu-0F-B.js} +1 -1
- package/assets/{index-BUMgfMPo.js → index-N5H4XX_z.js} +1 -1
- package/assets/{index-BUv13d3U.js → index-OtuvcX8Z.js} +1 -1
- package/assets/{index-CGN10OWJ.js → index-Pi8zH23Q.js} +1 -1
- package/assets/index-SoLXlPaG.css +1 -0
- package/assets/index-UXTmA8HS.js +1 -0
- package/assets/index-ZjF3iZ0v.js +1 -0
- package/assets/{index-YtR-0pg4.js → index-ik5xvgjC.js} +1 -1
- package/assets/{index-BvCC_SGc.js → index-koBO0cpK.js} +1 -1
- package/assets/{index-B8yYsZEA.js → index-mFsPtgxU.js} +1 -1
- package/assets/{index-BbHtKInt.js → index-rfdKGuam.js} +1 -1
- package/assets/{index-CEukFjIz.js → index-w9zwRdjL.js} +1 -1
- package/assets/{index.es-Cm5B-2RB.js → index.es-B5hd-vsJ.js} +4 -4
- package/assets/{selectors-DOsTc9Gc.js → selectors-RKMIkjNm.js} +1 -1
- package/index.html +3 -3
- package/package.json +3 -3
- package/assets/index-B6mllHGB.js +0 -1
- package/assets/index-BMoeUH8x.js +0 -1
- package/assets/index-Bb1rMbBB.js +0 -1
- package/assets/index-BsoWn_3b.js +0 -1
- package/assets/index-CASN6M_s.css +0 -1
- package/assets/index-Co2MBOkl.css +0 -1
- package/assets/index-D1zVEhUj.css +0 -1
- package/assets/index-DJne559o.css +0 -1
- package/assets/index-rRbpv6Pj.js +0 -1
- package/assets/index-sZDE9dZ6.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ak as N,N as s,a7 as P,M as x,dJ as k,S as l,dK as v,dL as H,J as j,bP as y,cf as w,bO as B,bQ as _,dM as z,dN as $,dO as F,b6 as i,Q as S,R as h,dP as K,dQ as V,dR as Q,dS as G,dT as J,dU as Y,dV as W,dW as A,dX as q,dY as f,dZ as X,d_ as Z,d$ as b,e0 as L,e1 as R,e2 as O,e3 as ss,e4 as es,e5 as as,e6 as ts,e7 as ns,e8 as is,e9 as cs,ea as os,eb as rs,ec as ls,ed as D,ee as M,ef as U,am as ds,ao as ms,T as xs,aj as us,aM as _s,eg as js,eh as Ss}from"./index-
|
|
1
|
+
import{ak as N,N as s,a7 as P,M as x,dJ as k,S as l,dK as v,dL as H,J as j,bP as y,cf as w,bO as B,bQ as _,dM as z,dN as $,dO as F,b6 as i,Q as S,R as h,dP as K,dQ as V,dR as Q,dS as G,dT as J,dU as Y,dV as W,dW as A,dX as q,dY as f,dZ as X,d_ as Z,d$ as b,e0 as L,e1 as R,e2 as O,e3 as ss,e4 as es,e5 as as,e6 as ts,e7 as ns,e8 as is,e9 as cs,ea as os,eb as rs,ec as ls,ed as D,ee as M,ef as U,am as ds,ao as ms,T as xs,aj as us,aM as _s,eg as js,eh as Ss}from"./index-BHRIVcTs.js";import{b as hs}from"./Navigation.container-9A40G-C8.js";import{S as Cs}from"./SignInRequired-B_3SXeXM.js";import{a as Es}from"./date-BuuPIXis.js";import"./selectors-RKMIkjNm.js";import"./index-LLu-0F-B.js";const ps="_ensImage_er26d_1",gs="_name_er26d_15",Ns="_small_er26d_23",I={ensImage:ps,name:gs,small:Ns};class Ts extends N.PureComponent{render(){const{subdomain:a,isSmall:e}=this.props;return s.jsx("div",{className:P(I.ensImage,{[I.small]:e}),children:s.jsx("div",{className:I.name,children:a.slice(0,2)})})}}const vs=c=>{const a=c.replacedBy||c.hash;return a?H({txHash:a},c.chainId):""},ys=c=>{const{selection:a,address:e,collectionId:t,item:n,subdomain:r,slotsToyBuy:d}=c,u=j.useMemo(()=>new Set((a||[]).map(C=>y(C.x,C.y))),[a]),E=j.useCallback((C,T)=>u.has(y(C,T))?{color:"#ff0044",scale:1.4}:null,[u]),p=j.useCallback((C,T)=>u.has(y(C,T))?{color:"#ff9990",scale:1.2}:null,[u]),[m,g]=j.useMemo(()=>a?w(a):[0,0],[a]);return a?s.jsx(B,{x:m,y:g,layers:[E,p],width:48,height:48,size:9,isDraggable:!1}):e?s.jsx(_,{address:e,size:"huge",imageOnly:!0}):t?s.jsx(z,{collectionId:t}):n?s.jsx($,{item:n}):r?s.jsx(Ts,{subdomain:r,isSmall:!0}):d?s.jsx("div",{className:"slot-image"}):null},Is=c=>{const{text:a,tx:e}=c;return s.jsxs("div",{className:"TransactionDetail",children:[s.jsxs("div",{className:"left",children:[s.jsx("div",{className:"image",children:s.jsx(ys,{...c})}),s.jsxs("div",{className:"text",children:[s.jsx("div",{className:"description",children:a}),s.jsxs("div",{className:"timestamp",children:[Es(e.timestamp),"."]})]})]}),s.jsx("div",{className:"right",children:s.jsxs("a",{href:vs(e),className:e.status?"status "+e.status:"status",target:"_blank",rel:"noopener noreferrer",children:[s.jsx("div",{className:"description",children:e.status||x("global.loading")}),k(e.status)?s.jsx("div",{className:"spinner",children:s.jsx(l.Loader,{active:!0,size:"mini"})}):null,e.status===v.REVERTED?s.jsx(l.Icon,{name:"warning sign"}):null,e.status===v.CONFIRMED||e.status===v.REPLACED?s.jsx(l.Icon,{name:"check"}):null]})})]})},o=N.memo(Is),As=c=>{const{tx:a}=c;switch(a.actionType){case M:case ls:{const{authorization:e}=a.payload,t=D(e.authorizedAddress),n=D(e.contractAddress),r=a.actionType===M?x("transaction.approved"):x("transaction.unapproved");return s.jsx(o,{address:e.address,text:s.jsx(i,{id:"transaction.approve_token",values:{action:r,contract:s.jsx(U,{chainId:e.chainId,address:e.authorizedAddress,txHash:"",children:t}),token:s.jsx(U,{chainId:e.chainId,address:e.contractAddress,txHash:"",children:n})}}),tx:a})}case rs:{const{name:e,address:t,selection:n}=a.payload;return s.jsx(o,{selection:n,text:s.jsx(i,{id:"transaction.transfer",values:{name:s.jsx("strong",{children:e}),address:s.jsx(_,{address:t})}}),tx:a})}case os:{const{name:e,selection:t}=a.payload;return s.jsx(o,{selection:t,text:s.jsx(i,{id:"transaction.edit",values:{name:s.jsx("strong",{children:e})}}),tx:a})}case cs:{const{name:e,address:t,selection:n}=a.payload;return s.jsx(o,{selection:n,text:s.jsx(i,{id:t?"transaction.set_operator_assigned":"transaction.set_operator_revoked",values:{name:s.jsx("strong",{children:e}),address:s.jsx(_,{address:t})}}),tx:a})}case is:{const{name:e,selection:t}=a.payload;return s.jsx(o,{selection:t,text:s.jsx(i,{id:"transaction.create_estate",values:{name:s.jsx("strong",{children:e})}}),tx:a})}case ns:{const{name:e,count:t,type:n,selection:r}=a.payload;return s.jsx(o,{selection:r,text:s.jsx(i,{id:`transaction.edit_estate_${n}`,values:{name:s.jsx("strong",{children:e}),count:t}}),tx:a})}case ts:{const{name:e,selection:t}=a.payload;return s.jsx(o,{selection:t,text:s.jsx(i,{id:"transaction.dissolve_estate",values:{name:s.jsx("strong",{children:e})}}),tx:a})}case as:{const{address:e,type:t,isApproved:n}=a.payload;return s.jsx(o,{address:e,text:s.jsx(i,{id:n?"transaction.set_manager_assigned":"transaction.set_manager_revoked",values:{address:s.jsx(_,{address:e,textOnly:!0}),type:x(`global.${t}_plural`)}}),tx:a})}case es:{const{item:e}=a.payload;return s.jsx(o,{item:e,text:s.jsx(i,{id:"transaction.set_price_and_beneficiary",values:{name:s.jsx(S,{to:h.itemDetail(e.id),children:e.name})}}),tx:a})}case ss:{const{thirdPartyId:e,thirdPartyName:t}=a.payload;return s.jsx(o,{thirdPartyId:e,text:s.jsx(i,{id:"transaction.disable_third_party",values:{name:t}}),tx:a})}case L:case R:case O:case b:{const{collection:e}=a.payload,t={[L]:"collection_published",[R]:"collection_approved",[O]:"collection_rejected",[b]:"updated_collection_managers"}[a.actionType];return s.jsx(o,{collectionId:e.id,text:s.jsx(i,{id:`transaction.${t}`,values:{name:s.jsx(S,{to:h.collectionDetail(e.id),children:e.name})}}),tx:a})}case X:{const{collection:e,mints:t}=a.payload,n=t.length===1,r=t[0].item,d=n?{item:r}:{collection:e};return s.jsx(o,{...d,text:s.jsx(i,{id:n?"transaction.collection_item_minted":"transaction.collection_items_minted",values:{collectionName:s.jsx(S,{to:h.collectionDetail(e.id),children:e.name}),itemName:s.jsx(S,{to:h.itemDetail(r.id),children:r.name}),count:Z(t)}}),tx:a})}case W:{const{chainId:e}=a,{collection:t,minters:n}=a.payload,r=A(n,t.minters),d=A(t.minters,n),u=q(e),E=f(d,u),p=f(r,u);let m="";return E?m="transaction.unset_collection_on_sale":p?m="transaction.set_collection_on_sale":m="transaction.updated_collection_minters",s.jsx(o,{collectionId:t.id,text:s.jsx(i,{id:m,values:{name:s.jsx(S,{to:h.collectionDetail(t.id),children:t.name})}}),tx:a})}case Y:{const{address:e,ens:t}=a.payload;return s.jsx(o,{subdomain:t.subdomain,text:s.jsx(i,{id:"transaction.set_ens_resolver",values:{address:s.jsx(_,{address:e}),name:t.subdomain}}),tx:a})}case J:{const{address:e,ens:t,land:n}=a.payload;return s.jsx(o,{subdomain:t.subdomain,text:n?s.jsx(i,{id:"transaction.set_ens_content",values:{address:s.jsx(_,{address:e}),name:t.subdomain,land_link:s.jsx(S,{to:h.landDetail(n.id),children:n.name})}}):s.jsx(i,{id:"transaction.unset_ens_content",values:{address:s.jsx(_,{address:e}),name:t.subdomain}}),tx:a})}case Q:{const{address:e,allowance:t}=a.payload;return s.jsx(o,{address:e,text:G(t)?s.jsx(i,{id:"transaction.allowed_claim_mana",values:{address:s.jsx(_,{address:e})}}):s.jsx(i,{id:"transaction.disallowed_claim_mana",values:{address:s.jsx(_,{address:e})}}),tx:a})}case V:{const{subdomain:e}=a.payload;return s.jsx(o,{subdomain:e,text:s.jsx(i,{id:"transaction.claim_name",values:{name:e}}),tx:a})}case K:{const{ens:e}=a.payload;return s.jsx(o,{subdomain:e.subdomain,text:s.jsx(i,{id:"transaction.reclaim_name",values:{subdomain:e.subdomain}}),tx:a})}case F:{const{count:e,collectionId:t,collectionName:n}=a.payload;return s.jsx(o,{tx:a,collectionId:t,text:s.jsx(i,{id:"transaction.rescue_items",values:{count:e,collectionName:s.jsx(S,{to:h.collectionDetail(t),children:n})}})})}default:return null}},fs=N.memo(As),bs=c=>{const{address:a,transactions:e,onClearHistory:t,isLoggedIn:n}=c,[r,d]=j.useState(!1),u=j.useCallback(()=>{a&&t(a),d(!1)},[a,t]),E=j.useCallback(()=>d(!0),[d]),p=j.useCallback(()=>d(!1),[d]);let m=null;return n?e.length===0?m=s.jsx("div",{className:"center",children:s.jsx("p",{children:x("activity_page.empty")})}):m=s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"history-header",children:[s.jsx("div",{className:"left",children:s.jsx(l.Header,{sub:!0,children:x("activity_page.latest_activity")})}),s.jsx("div",{className:"right",children:s.jsx(l.Button,{basic:!0,onClick:E,children:x("activity_page.clear_history")})})]}),s.jsx("div",{className:"transactions",children:e.map(g=>s.jsx(fs,{tx:g},g.hash)).reverse()})]}):m=s.jsx(Cs,{}),s.jsxs(s.Fragment,{children:[s.jsx(ds,{}),s.jsx(hs,{}),s.jsx(l.Page,{className:"ActivityPage",children:m}),s.jsxs(l.Modal,{size:"tiny",open:r,children:[s.jsx(l.Modal.Header,{children:x("activity_page.clear_history_modal.title")}),s.jsx(l.Modal.Content,{children:x("activity_page.clear_history_modal.text")}),s.jsxs(l.Modal.Actions,{children:[s.jsx(l.Button,{onClick:p,children:x("global.cancel")}),s.jsx(l.Button,{primary:!0,onClick:u,children:x("global.proceed")})]})]}),s.jsx(ms,{})]})},Ls=N.memo(bs),Rs=c=>({isLoggedIn:us(c),address:_s(c),transactions:js(c)}),Os=c=>({onClearHistory:a=>c(Ss(a))}),ws=xs(Rs,Os)(Ls);export{ws as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var Y=Object.defineProperty;var J=(r,a,n)=>a in r?Y(r,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[a]=n;var P=(r,a,n)=>J(r,typeof a!="symbol"?a+"":a,n);import{J as c,N as e,P as X,a4 as Z,R as M,eB as F,e$ as V,f0 as w,f1 as I,eY as H,f2 as $,f3 as ee,f4 as S,f5 as se,f6 as ae,f7 as te,S as i,M as t,dN as ie,f8 as le,f9 as T,fa as ne,fb as ce,fc as re,Q as oe,eA as de,cN as ue,fd as me,fe as z,aR as he,ff as pe,cM as xe,fg as je,fh as ge,fi as ve,fj as Ne,aa as be,ab as g,ej as fe,fk as Ie,fl as _e,fm as Ce,eN as ye,fn as Ee,bq as D,fo as ke,fp as Se,ey as Te,a2 as Pe,eW as Me,fq as we,fr as De}from"./index-DTDyEcLh.js";import{d as Re}from"./hooks-B7lAA488.js";import{I as Le}from"./ItemProvider.container-Cbkly4MW.js";import{C as Be}from"./ConfirmDelete-BQd9EOmm.js";import{L as Ue}from"./LoggedInDetailPage.container-CzPOYbHr.js";import{N as Oe}from"./NotFound-Bvndb2kC.js";import{B as Ae}from"./Back-DBc-1vBx.js";import"./Navigation.container-zriX5zTq.js";import"./selectors-DOsTc9Gc.js";import"./SignInRequired-BesSl-uu.js";class qe extends c.PureComponent{constructor(n){super(n);P(this,"state",{isNoticeClosed:!1});P(this,"handleCloseNotice",()=>{const{storageKey:n}=this.props;this.setState({isNoticeClosed:!0}),localStorage.setItem(n,"1")});const{storageKey:o}=n;this.state={isNoticeClosed:localStorage.getItem(o)!==null}}render(){const{children:n}=this.props,{isNoticeClosed:o}=this.state;return o?null:e.jsxs("div",{className:"Notice",children:[e.jsx("div",{className:"text",children:n}),e.jsx(X,{name:"close",onClick:this.handleCloseNotice})]})}}const Fe="dcl-item-notice";function Ve(r){const{item:a,itemId:n,isLoading:o,status:v,collection:_,hasAccess:N,isWearableUtilityEnabled:C,onDelete:y,onSaveItem:p,onOpenModal:u}=r,j=c.useRef(null),b=Z(),f=c.useCallback(()=>{a&&b.push(M.itemEditor({itemId:a.id,collectionId:a.collectionId}),{fromParam:F(a.urn)?V.TP_COLLECTIONS:V.COLLECTIONS})},[b,a]),d=c.useCallback(async s=>{const l=await w({[I]:s}),h={...a,contents:{...a==null?void 0:a.contents,[I]:l[I]}};v&&[H.UNPUBLISHED,H.UNDER_REVIEW].includes(v)&&(h.video=l[I]),p(h,{[I]:s})},[p,a,v]),x=c.useCallback(()=>{u("EditVideoModal",{item:a,onSaveVideo:d})},[a,u,d]),R=c.useCallback(()=>{y(a)},[a,y]),E=c.useCallback(()=>{a&&$(a)?u("CreateSingleItemModal",{item:a,addRepresentation:!0}):u("CreateSingleItemModal",{item:a,changeItemFile:!0})},[u,a]),L=c.useCallback(()=>{u("EditItemURNModal",{item:a})},[a,u]),B=c.useCallback(async s=>{const l=ee(s);p({...a,contents:{...a==null?void 0:a.contents,...await w({[S]:l})}},{[S]:l})},[p,a]),U=c.useCallback(()=>{(a==null?void 0:a.type)===se.EMOTE?u("EditThumbnailModal",{onSaveThumbnail:B,item:a,collection:_}):j.current&&j.current.click()},[j.current,_,a,u,B]),O=c.useCallback(async s=>{const{files:l}=s.target;if(l&&l.length>0){const h=l[0],k=await ae(h,1024,1024);k&&a&&(a.contents={...a.contents,...await w({[S]:k})},p(a,{[S]:k}))}},[p,a]),A=c.useCallback(()=>{u("MoveItemToCollectionModal",{item:a})},[a,u]),W=c.useCallback((s,l)=>{var q;const h=s.data,K=!(l&&te(l));return e.jsxs(e.Fragment,{children:[e.jsx(i.Section,{children:e.jsx(i.Row,{children:e.jsx(Ae,{onClick:()=>b.push(M.collectionDetail(s.collectionId))})})}),e.jsxs(i.Narrow,{children:[!l&&!s.collectionId?e.jsx(qe,{storageKey:Fe,children:t("item_detail_page.notice")}):null,e.jsxs("div",{className:"item-data",children:[e.jsxs("div",{className:"item-data-left-panel",children:[e.jsx(ie,{item:s,hasBadge:!0,hasRarityBadge:!0,hasUtilityBadge:!0}),e.jsx("div",{children:e.jsxs(i.Button,{primary:!0,onClick:U,children:[e.jsx("input",{type:"file",ref:j,onChange:O,accept:"image/png"}),e.jsx(i.Icon,{name:"camera"}),t("item_detail_page.edit_thumbnail")]})}),e.jsxs("div",{className:"metrics",children:[e.jsx("span",{className:"subtitle",children:t("item_detail_page.properties")}),e.jsx(le,{item:s})]}),T(s)?e.jsx(ne,{item:s,onClick:x,children:(m,Q,G,$e)=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"overlay",children:e.jsx(i.Icon,{name:"play",className:"play-video-button",onClick:x})}),e.jsxs(i.Button,{primary:!0,onClick:x,children:[e.jsx(i.Icon,{name:"video"}),t("item_detail_page.edit_video")]}),e.jsxs("div",{className:"metrics",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.properties")}),e.jsx(ce,{duration:Q,size:G,showIcons:!1})]})]})}):null,e.jsxs("div",{className:"details",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.details")}),s.isPublished&&e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.details_info.id")}),e.jsxs("div",{className:"value",children:["#",s.tokenId]})]}),h.category?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.category")}),e.jsx("div",{className:"value",children:t(`${s.type}.category.${h.category}`)})]}):null,s.isPublished&&s.rarity?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.supply")}),e.jsxs("div",{className:"value",children:[s.totalSupply,"/",re(s)]})]}):null,l?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.collection")}),e.jsx(oe,{className:"collection-link",to:M.collectionDetail(l.id,de(l)),children:l.name})]}):null,s.urn?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("global.urn")}),e.jsxs("div",{className:"value urn",children:[e.jsxs("span",{children:[s.urn,e.jsx(ue,{role:"button",text:s.urn,children:e.jsx(i.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:"link copy",name:"copy outline"})})]}),e.jsx("div",{className:"urn-actions",children:F(s.urn)?e.jsx(i.Popup,{content:t("collection_item.cannot_edit_urn"),disabled:!s.isPublished,position:"top center",trigger:e.jsx("div",{children:e.jsx("button",{disabled:s.isPublished,className:"link",onClick:L,children:t("item.edit_urn")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):null})]})]}):null]})]}),e.jsxs("div",{className:"cards-container",children:[e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:s.name}),e.jsxs("div",{className:"actions",children:[T(s)&&e.jsx(i.Button,{className:"edit",inverted:!0,size:"small",onClick:E,children:t("global.edit")}),e.jsx(i.Button,{inverted:!0,size:"small",onClick:f,children:t("collection_detail_page.preview")}),K?e.jsx(i.Dropdown,{trigger:e.jsx(i.Button,{basic:!0,className:"more-actions-button",children:e.jsx(i.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(i.Dropdown.Menu,{children:[e.jsx(Be,{name:s.name,onDelete:R,trigger:s.isPublished?e.jsx(i.Popup,{content:t("item_detail_page.delete_published_item"),position:"right center",trigger:e.jsx(i.Dropdown.Item,{disabled:!0,text:t("global.delete")}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx(i.Dropdown.Item,{text:t("global.delete")})}),!s.collectionId&&e.jsx(i.Dropdown.Item,{text:t("collection_item.move_to_another_collection"),onClick:A})]})}):null]})]}),e.jsxs("div",{className:"attribute-row",children:[s.description&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("global.description")}),e.jsx("div",{className:"data",children:s.description})]}),s.utility&&C&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("global.utility")}),e.jsx("div",{className:"data",children:s.utility})]})]}),s.data.tags.length?e.jsx("div",{className:"attribute-row",children:e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.tags.title")}),e.jsx("div",{className:"data tags-container",children:s.data.tags.map(m=>e.jsx("span",{className:"tag",children:m},m))})]})}):null]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"title",children:t("item_detail_page.selling.title")}),e.jsxs("div",{className:"data",children:[me(s)?e.jsxs(i.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:t("item.price")}),e.jsx("div",{className:"value",children:t("global.free")})]}):s.price?e.jsxs(i.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:t("item.price")}),s.price&&s.price!==z.toString()?e.jsx(i.Mana,{showTooltip:!0,network:he.Network.MATIC,className:"mana-price-container",children:(()=>{const m=pe(s.price);return m.length>10?e.jsx(i.Popup,{content:m,position:"top center",trigger:e.jsx("span",{children:`${m.slice(0,3)}...${m.slice(-4)}`}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx("div",{className:"value",children:m})})()}):s.price===z.toString()?e.jsx("div",{className:"value",children:t("item.not_for_sale")}):"-"]}):null,e.jsxs(i.Section,{className:"beneficiary-container",children:[e.jsx("div",{className:"subtitle",children:t("item.beneficiary")}),s.beneficiary?e.jsx("div",{className:"value",children:xe(s.beneficiary)}):"-"]})]})]}),je(s)&&!T(s)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:t("item_detail_page.representations.title")}),e.jsx(i.Button,{className:"edit-button",inverted:!0,size:"small",onClick:E,children:$(s)?t("global.add"):t("global.edit")})]}),e.jsx("div",{className:"data",children:e.jsx("div",{className:"representations-container",children:s.data.representations.map(m=>e.jsxs("div",{className:"representation",children:[e.jsx("img",{className:"item-image",src:ge(s),alt:s.name}),m.mainFile,e.jsx(ve,{item:s,bodyShape:m.bodyShapes[0]})]},m.mainFile))})})]}):null,T(s)&&((q=s.data.requiredPermissions)!=null&&q.length)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:t("item_detail_page.required_permissions")}),e.jsx(i.Button,{inverted:!0,className:"learn-more-permissions",size:"small",href:"https://docs.decentraland.org/creator/development-guide/sdk7/scene-metadata/#required-permissions",rel:"noopener noreferrer",target:"_blank",content:t("global.learn_more")})]}),e.jsx("div",{className:"data",children:e.jsx(Ne,{requiredPermissions:s.data.requiredPermissions,basic:!0})})]}):null]})]})]})]})},[C,b,j,U,O,x,L,E,E,A,f,R,f]);return e.jsx(Le,{id:n,children:(s,l,h)=>e.jsx(Ue,{className:"ItemDetailPage",hasNavigation:!N&&!o,isLoading:o||h,children:N&&s?W(s,l):e.jsx(Oe,{})})})}const He=()=>{const r=be(),a=Re(),n=g(fe),o=g(d=>a?Ie(d,a):null),v=g(d=>o&&o.collectionId?_e(d,o.collectionId):null),_=g(Ce),N=g(ye),C=g(Ee),y=o?_[o.id]:null,p=D(N,Me)||D(N,we)||D(N,De),u=g(d=>o!==null&&ke(d,n.address,v,o)),j=c.useCallback((d,x)=>r(Se(d,x)),[r]),b=c.useCallback(d=>r(Te(d)),[r]),f=c.useCallback((d,x)=>r(Pe(d,x)),[r]);return e.jsx(Ve,{itemId:a,wallet:n,item:o,collection:v,status:y,isLoading:p,isWearableUtilityEnabled:C,hasAccess:u,onSaveItem:j,onDelete:b,onOpenModal:f})},as=He;export{as as default};
|
|
1
|
+
var Y=Object.defineProperty;var J=(r,a,n)=>a in r?Y(r,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[a]=n;var P=(r,a,n)=>J(r,typeof a!="symbol"?a+"":a,n);import{J as c,N as e,P as X,a4 as Z,R as M,eB as F,e$ as V,f0 as w,f1 as I,eY as H,f2 as $,f3 as ee,f4 as S,f5 as se,f6 as ae,f7 as te,S as i,M as t,dN as ie,f8 as le,f9 as T,fa as ne,fb as ce,fc as re,Q as oe,eA as de,cN as ue,fd as me,fe as z,aR as he,ff as pe,cM as xe,fg as je,fh as ge,fi as ve,fj as Ne,aa as be,ab as g,ej as fe,fk as Ie,fl as _e,fm as Ce,eN as ye,fn as Ee,bq as D,fo as ke,fp as Se,ey as Te,a2 as Pe,eW as Me,fq as we,fr as De}from"./index-BHRIVcTs.js";import{d as Re}from"./hooks-aEto244t.js";import{I as Le}from"./ItemProvider.container-BE8u0Rvw.js";import{C as Be}from"./ConfirmDelete-BvCbqgkr.js";import{L as Ue}from"./LoggedInDetailPage.container-DWMoMSsT.js";import{N as Oe}from"./NotFound-BGRBV5Uq.js";import{B as Ae}from"./Back-Bt1TpmNC.js";import"./Navigation.container-9A40G-C8.js";import"./selectors-RKMIkjNm.js";import"./SignInRequired-B_3SXeXM.js";class qe extends c.PureComponent{constructor(n){super(n);P(this,"state",{isNoticeClosed:!1});P(this,"handleCloseNotice",()=>{const{storageKey:n}=this.props;this.setState({isNoticeClosed:!0}),localStorage.setItem(n,"1")});const{storageKey:o}=n;this.state={isNoticeClosed:localStorage.getItem(o)!==null}}render(){const{children:n}=this.props,{isNoticeClosed:o}=this.state;return o?null:e.jsxs("div",{className:"Notice",children:[e.jsx("div",{className:"text",children:n}),e.jsx(X,{name:"close",onClick:this.handleCloseNotice})]})}}const Fe="dcl-item-notice";function Ve(r){const{item:a,itemId:n,isLoading:o,status:v,collection:_,hasAccess:N,isWearableUtilityEnabled:C,onDelete:y,onSaveItem:p,onOpenModal:u}=r,j=c.useRef(null),b=Z(),f=c.useCallback(()=>{a&&b.push(M.itemEditor({itemId:a.id,collectionId:a.collectionId}),{fromParam:F(a.urn)?V.TP_COLLECTIONS:V.COLLECTIONS})},[b,a]),d=c.useCallback(async s=>{const l=await w({[I]:s}),h={...a,contents:{...a==null?void 0:a.contents,[I]:l[I]}};v&&[H.UNPUBLISHED,H.UNDER_REVIEW].includes(v)&&(h.video=l[I]),p(h,{[I]:s})},[p,a,v]),x=c.useCallback(()=>{u("EditVideoModal",{item:a,onSaveVideo:d})},[a,u,d]),R=c.useCallback(()=>{y(a)},[a,y]),E=c.useCallback(()=>{a&&$(a)?u("CreateSingleItemModal",{item:a,addRepresentation:!0}):u("CreateSingleItemModal",{item:a,changeItemFile:!0})},[u,a]),L=c.useCallback(()=>{u("EditItemURNModal",{item:a})},[a,u]),B=c.useCallback(async s=>{const l=ee(s);p({...a,contents:{...a==null?void 0:a.contents,...await w({[S]:l})}},{[S]:l})},[p,a]),U=c.useCallback(()=>{(a==null?void 0:a.type)===se.EMOTE?u("EditThumbnailModal",{onSaveThumbnail:B,item:a,collection:_}):j.current&&j.current.click()},[j.current,_,a,u,B]),O=c.useCallback(async s=>{const{files:l}=s.target;if(l&&l.length>0){const h=l[0],k=await ae(h,1024,1024);k&&a&&(a.contents={...a.contents,...await w({[S]:k})},p(a,{[S]:k}))}},[p,a]),A=c.useCallback(()=>{u("MoveItemToCollectionModal",{item:a})},[a,u]),W=c.useCallback((s,l)=>{var q;const h=s.data,K=!(l&&te(l));return e.jsxs(e.Fragment,{children:[e.jsx(i.Section,{children:e.jsx(i.Row,{children:e.jsx(Ae,{onClick:()=>b.push(M.collectionDetail(s.collectionId))})})}),e.jsxs(i.Narrow,{children:[!l&&!s.collectionId?e.jsx(qe,{storageKey:Fe,children:t("item_detail_page.notice")}):null,e.jsxs("div",{className:"item-data",children:[e.jsxs("div",{className:"item-data-left-panel",children:[e.jsx(ie,{item:s,hasBadge:!0,hasRarityBadge:!0,hasUtilityBadge:!0}),e.jsx("div",{children:e.jsxs(i.Button,{primary:!0,onClick:U,children:[e.jsx("input",{type:"file",ref:j,onChange:O,accept:"image/png"}),e.jsx(i.Icon,{name:"camera"}),t("item_detail_page.edit_thumbnail")]})}),e.jsxs("div",{className:"metrics",children:[e.jsx("span",{className:"subtitle",children:t("item_detail_page.properties")}),e.jsx(le,{item:s})]}),T(s)?e.jsx(ne,{item:s,onClick:x,children:(m,Q,G,$e)=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"overlay",children:e.jsx(i.Icon,{name:"play",className:"play-video-button",onClick:x})}),e.jsxs(i.Button,{primary:!0,onClick:x,children:[e.jsx(i.Icon,{name:"video"}),t("item_detail_page.edit_video")]}),e.jsxs("div",{className:"metrics",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.properties")}),e.jsx(ce,{duration:Q,size:G,showIcons:!1})]})]})}):null,e.jsxs("div",{className:"details",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.details")}),s.isPublished&&e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.details_info.id")}),e.jsxs("div",{className:"value",children:["#",s.tokenId]})]}),h.category?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.category")}),e.jsx("div",{className:"value",children:t(`${s.type}.category.${h.category}`)})]}):null,s.isPublished&&s.rarity?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.supply")}),e.jsxs("div",{className:"value",children:[s.totalSupply,"/",re(s)]})]}):null,l?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("item.collection")}),e.jsx(oe,{className:"collection-link",to:M.collectionDetail(l.id,de(l)),children:l.name})]}):null,s.urn?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:t("global.urn")}),e.jsxs("div",{className:"value urn",children:[e.jsxs("span",{children:[s.urn,e.jsx(ue,{role:"button",text:s.urn,children:e.jsx(i.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:"link copy",name:"copy outline"})})]}),e.jsx("div",{className:"urn-actions",children:F(s.urn)?e.jsx(i.Popup,{content:t("collection_item.cannot_edit_urn"),disabled:!s.isPublished,position:"top center",trigger:e.jsx("div",{children:e.jsx("button",{disabled:s.isPublished,className:"link",onClick:L,children:t("item.edit_urn")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):null})]})]}):null]})]}),e.jsxs("div",{className:"cards-container",children:[e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:s.name}),e.jsxs("div",{className:"actions",children:[T(s)&&e.jsx(i.Button,{className:"edit",inverted:!0,size:"small",onClick:E,children:t("global.edit")}),e.jsx(i.Button,{inverted:!0,size:"small",onClick:f,children:t("collection_detail_page.preview")}),K?e.jsx(i.Dropdown,{trigger:e.jsx(i.Button,{basic:!0,className:"more-actions-button",children:e.jsx(i.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(i.Dropdown.Menu,{children:[e.jsx(Be,{name:s.name,onDelete:R,trigger:s.isPublished?e.jsx(i.Popup,{content:t("item_detail_page.delete_published_item"),position:"right center",trigger:e.jsx(i.Dropdown.Item,{disabled:!0,text:t("global.delete")}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx(i.Dropdown.Item,{text:t("global.delete")})}),!s.collectionId&&e.jsx(i.Dropdown.Item,{text:t("collection_item.move_to_another_collection"),onClick:A})]})}):null]})]}),e.jsxs("div",{className:"attribute-row",children:[s.description&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("global.description")}),e.jsx("div",{className:"data",children:s.description})]}),s.utility&&C&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("global.utility")}),e.jsx("div",{className:"data",children:s.utility})]})]}),s.data.tags.length?e.jsx("div",{className:"attribute-row",children:e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:t("item_detail_page.tags.title")}),e.jsx("div",{className:"data tags-container",children:s.data.tags.map(m=>e.jsx("span",{className:"tag",children:m},m))})]})}):null]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"title",children:t("item_detail_page.selling.title")}),e.jsxs("div",{className:"data",children:[me(s)?e.jsxs(i.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:t("item.price")}),e.jsx("div",{className:"value",children:t("global.free")})]}):s.price?e.jsxs(i.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:t("item.price")}),s.price&&s.price!==z.toString()?e.jsx(i.Mana,{showTooltip:!0,network:he.Network.MATIC,className:"mana-price-container",children:(()=>{const m=pe(s.price);return m.length>10?e.jsx(i.Popup,{content:m,position:"top center",trigger:e.jsx("span",{children:`${m.slice(0,3)}...${m.slice(-4)}`}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx("div",{className:"value",children:m})})()}):s.price===z.toString()?e.jsx("div",{className:"value",children:t("item.not_for_sale")}):"-"]}):null,e.jsxs(i.Section,{className:"beneficiary-container",children:[e.jsx("div",{className:"subtitle",children:t("item.beneficiary")}),s.beneficiary?e.jsx("div",{className:"value",children:xe(s.beneficiary)}):"-"]})]})]}),je(s)&&!T(s)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:t("item_detail_page.representations.title")}),e.jsx(i.Button,{className:"edit-button",inverted:!0,size:"small",onClick:E,children:$(s)?t("global.add"):t("global.edit")})]}),e.jsx("div",{className:"data",children:e.jsx("div",{className:"representations-container",children:s.data.representations.map(m=>e.jsxs("div",{className:"representation",children:[e.jsx("img",{className:"item-image",src:ge(s),alt:s.name}),m.mainFile,e.jsx(ve,{item:s,bodyShape:m.bodyShapes[0]})]},m.mainFile))})})]}):null,T(s)&&((q=s.data.requiredPermissions)!=null&&q.length)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:t("item_detail_page.required_permissions")}),e.jsx(i.Button,{inverted:!0,className:"learn-more-permissions",size:"small",href:"https://docs.decentraland.org/creator/development-guide/sdk7/scene-metadata/#required-permissions",rel:"noopener noreferrer",target:"_blank",content:t("global.learn_more")})]}),e.jsx("div",{className:"data",children:e.jsx(Ne,{requiredPermissions:s.data.requiredPermissions,basic:!0})})]}):null]})]})]})]})},[C,b,j,U,O,x,L,E,E,A,f,R,f]);return e.jsx(Le,{id:n,children:(s,l,h)=>e.jsx(Ue,{className:"ItemDetailPage",hasNavigation:!N&&!o,isLoading:o||h,children:N&&s?W(s,l):e.jsx(Oe,{})})})}const He=()=>{const r=be(),a=Re(),n=g(fe),o=g(d=>a?Ie(d,a):null),v=g(d=>o&&o.collectionId?_e(d,o.collectionId):null),_=g(Ce),N=g(ye),C=g(Ee),y=o?_[o.id]:null,p=D(N,Me)||D(N,we)||D(N,De),u=g(d=>o!==null&&ke(d,n.address,v,o)),j=c.useCallback((d,x)=>r(Se(d,x)),[r]),b=c.useCallback(d=>r(Te(d)),[r]),f=c.useCallback((d,x)=>r(Pe(d,x)),[r]);return e.jsx(Ve,{itemId:a,wallet:n,item:o,collection:v,status:y,isLoading:p,isWearableUtilityEnabled:C,hasAccess:u,onSaveItem:j,onDelete:b,onOpenModal:f})},as=He;export{as as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ProjectCard{position:relative;width:100%;max-width:var(--scenespage-card-width);height:var(--scenespage-card-height);border-radius:10px;background:rgba(var(--bluish-steel-raw),.16);cursor:pointer;display:flex;justify-content:flex-end;flex-direction:column}.ProjectCard .project-thumbnail{height:170px;width:100%;max-width:256px;background-size:100% 170px;border-top-left-radius:10px;border-top-right-radius:10px}.ProjectCard .deployment-status{align-self:flex-end;margin-right:8px;margin-bottom:8px;position:absolute;right:0;bottom:70px}.ProjectCard .project-data{height:70px;width:100%;padding:12px 9px 14px;background-color:#313131;align-self:flex-end;color:var(--text);z-index:1;border-bottom-left-radius:10px;border-bottom-right-radius:10px}.ProjectCard .title{font-size:18px;line-height:24px;font-weight:600;overflow:hidden;white-space:nowrap;width:240px;text-overflow:ellipsis}.ProjectCard .description{display:flex;align-items:center;font-size:14px;font-weight:400;line-height:24px;letter-spacing:0px;text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;user-select:none}.ProjectCard .description .Icon{margin-right:5px}.ProjectCard .description .Icon.scene-object{margin-left:11px}.ProjectCard .overlay{position:absolute;left:0;right:0;top:0;bottom:0;background:var(--background);opacity:.3}.ProjectCard:hover{z-index:999}.ProjectCard .options-container{display:flex;justify-content:space-between;align-items:center;position:absolute;top:0;width:100%;padding:8px}.ProjectCard .options-container .options-dropdown{visibility:hidden}.ProjectCard:hover .options-container .options-dropdown{visibility:visible}.ProjectCard .options-dropdown .icon:before{color:var(--text)!important}.ProjectCard.has-thumbnail{position:relative;background-size:cover;background-position:center}.ProjectCard .title-wrapper{display:flex}.ProjectCard .Icon.is-uploading{margin-left:4px;margin-top:2px}.ProjectCard .error-indicator{width:16px;height:16px;background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%3e%3cdefs%3e%3cfilter%20id='a'%20width='108.5%25'%20height='175%25'%20x='-4.2%25'%20y='-37.5%25'%20filterUnits='objectBoundingBox'%3e%3cfeOffset%20dy='2'%20in='SourceAlpha'%20result='shadowOffsetOuter1'/%3e%3cfeGaussianBlur%20in='shadowOffsetOuter1'%20result='shadowBlurOuter1'%20stdDeviation='2'/%3e%3cfeColorMatrix%20in='shadowBlurOuter1'%20result='shadowMatrixOuter1'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.16%200'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='shadowMatrixOuter1'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3ccircle%20id='c'%20cx='8'%20cy='8'%20r='8'/%3e%3cfilter%20id='b'%20width='187.5%25'%20height='187.5%25'%20x='-43.8%25'%20y='-31.2%25'%20filterUnits='objectBoundingBox'%3e%3cfeOffset%20dy='2'%20in='SourceAlpha'%20result='shadowOffsetOuter1'/%3e%3cfeGaussianBlur%20in='shadowOffsetOuter1'%20result='shadowBlurOuter1'%20stdDeviation='2'/%3e%3cfeComposite%20in='shadowBlurOuter1'%20in2='SourceAlpha'%20operator='out'%20result='shadowBlurOuter1'/%3e%3cfeColorMatrix%20in='shadowBlurOuter1'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.5%200'/%3e%3c/filter%3e%3c/defs%3e%3cg%20fill='none'%20fill-rule='evenodd'%20filter='url(%23a)'%20transform='translate(-2%20-6)'%3e%3cg%20transform='translate(8%208)'%3e%3cuse%20fill='%23000'%20filter='url(%23b)'%20xlink:href='%23c'/%3e%3ccircle%20cx='8'%20cy='8'%20r='7.25'%20fill='%23F00'%20stroke='%23FFF'%20stroke-linejoin='square'%20stroke-width='1.5'/%3e%3c/g%3e%3cpath%20fill='%23FFF'%20d='M17%2012.5v4a1%201%200%201%201-2%200v-4a1%201%200%201%201%202%200zm-2%207a1%201%200%201%201%202%200%201%201%200%200%201-2%200z'/%3e%3c/g%3e%3c/svg%3e");background-repeat:no-repeat;background-position:center -2px;margin-top:3px;margin-left:7px}.ScenesPageAd{padding-top:32px}.ScenesPage .ui.button.inverted,.ScenesPage .ui.button.inverted:hover{background-color:#fff;color:var(--shadows)}.ScenesPage .project-cards{position:relative}.ScenesPage .subtitle{display:flex;align-items:center;justify-content:space-between}.ScenesPage .empty-projects{display:flex;flex-direction:column;width:100%;border-radius:12px;border:1px solid var(--divider);align-items:center;justify-content:center;color:var(--text);background-color:var(--dark-two);-webkit-user-select:none;user-select:none;text-align:center;line-height:28px;padding-top:105px;padding-bottom:122px}.ScenesPage .empty-projects .empty-project-thumbnail{width:86px;height:86px;background:url(https://cdn.decentraland.org/@dcl/builder-site/7.21.3-19896835659.commit-bb1d19a/assets/scene-CZXq89b-.svg);background-size:contain;background-repeat:no-repeat;background-position:center;margin-bottom:30px}.ScenesPage .empty-projects .description{margin-bottom:40px}.ScenesPage .empty-projects .actions{display:flex;align-items:center;justify-content:center;gap:14px}.ScenesPage .template-cards{margin-top:80px}.ScenesPage .template-cards.animate .TemplateCard{animation:templateAnimation 2s}.ScenesPage .project-cards .subtitle,.ScenesPage .template-cards .subtitle{font-size:20px}.ScenesPage .CardList .ProjectCard,.ScenesPage .CardList .ProjectCard .project-thumbnail{max-width:unset}.ScenesPage .CardList{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:var(--scenespage-card-margin)}.ScenesPage .ProjectCard{transition:transform .2s ease-in-out;box-shadow:0 2px 4px #00000029}.ScenesPage .ProjectCard:hover{box-shadow:0 10px 20px #0000003d;transform:translateY(-4px)}.ScenesPage .dcl.tabs,.ScenesPage .dcl.tabs .ui.container{position:relative}.ScenesPage .projects-menu .items-count,.ScenesPage .scene-pool-menu .ui.header.sub{flex:1 0 auto;color:var(--secondary-text);text-transform:uppercase;font-size:13px;line-height:18px;font-weight:500}.ScenesPage .projects-menu .actions{display:flex;flex:1 0 auto;align-items:center;justify-content:flex-end;font-size:13px;line-height:18px;text-transform:uppercase;margin-bottom:8px}.ScenesPage .projects-menu .actions .ui.button{font-size:14px;font-weight:600}.ScenesPage .projects-menu .actions .ui.button+.ui.button{margin-left:16px}.ScenesPage .projects-menu .actions .ui.button.create-scene{display:flex;align-items:center}.ScenesPage .projects-menu .actions .ui.dropdown.active.visible{z-index:99999}.ScenesPage .projects-menu .actions .ui.dropdown+.ui.button{margin-left:24px}.ScenesPage .project-cards.has-pagination .CardList{min-height:606px}.ScenesPage .project-cards .ui.pagination{width:100%;display:flex;justify-content:center}.ScenesPage .project-cards .ui.pagination{margin-top:40px}.ScenesPage .project-cards .ui.pagination .item[type=nextItem],.ScenesPage .project-cards .ui.pagination .item[type=prevItem]{position:absolute;background-color:var(--secondary)}.ScenesPage .project-cards .ui.pagination .item[type=prevItem]{left:0}.ScenesPage .project-cards .ui.pagination .item[type=nextItem]{right:0}.ScenesPage .SyncToast{top:77px}.ScenesPage .scene-pool-projects{display:flex;overflow:auto;padding-top:20px;gap:var(--scenespage-card-margin)}.ScenesPage .scene-pool-projects .ProjectCard{flex:none}.ScenesPage .ui.button.import-scene,.ScenesPage .ui.button.create-scene{display:flex;align-items:center;justify-content:center;gap:10px;padding:12px 18px}.ScenesPage .import-scene:before,.ScenesPage .create-scene:before{content:"";width:20px;height:20px;background-position:center;background-repeat:no-repeat;display:block}.ScenesPage .import-scene:before{background-image:url("data:image/svg+xml,%3csvg%20width='19'%20height='18'%20viewBox='0%200%2019%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.25%203H14.75C15.1625%203%2015.5%203.3375%2015.5%203.75V5.25C15.5%205.6625%2015.1625%206%2014.75%206C14.3375%206%2014%205.6625%2014%205.25V4.5H5V5.25C5%205.6625%204.6625%206%204.25%206C3.8375%206%203.5%205.6625%203.5%205.25V3.75C3.5%203.3375%203.8375%203%204.25%203ZM6.50075%2010.5C6.272%2010.5%206.04775%2010.3965%205.9%2010.2C5.651%209.8685%205.7185%209.39825%206.05%209.15L9.05%206.9C9.3095%206.705%209.6665%206.69975%209.93125%206.8865L12.9312%208.997C13.2703%209.2355%2013.352%209.7035%2013.1135%2010.0417C12.875%2010.38%2012.4078%2010.4625%2012.0688%2010.224L10.2479%208.94308C10.2493%208.96187%2010.25%208.98085%2010.25%209V15C10.25%2015.414%209.91475%2015.75%209.5%2015.75C9.08525%2015.75%208.75%2015.414%208.75%2015V9.00013L6.95%2010.35C6.815%2010.4513%206.6575%2010.5%206.50075%2010.5Z'%20fill='black'/%3e%3c/svg%3e")}.ScenesPage .create-scene:before{background-image:url("data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.7829%2015.3424V16.7893C10.7824%2016.9117%2010.7338%2017.0289%2010.6479%2017.1152C10.562%2017.2015%2010.4457%2017.25%2010.3245%2017.25H8.48794C8.36653%2017.25%208.25008%2017.2014%208.16414%2017.1148C8.0782%2017.0283%208.02979%2016.9109%208.02954%2016.7883V15.3424H10.7829ZM13.1042%2011.8362L14.1897%2013.7281C14.2295%2013.7983%2014.2502%2013.8779%2014.25%2013.9588C14.2498%2014.0397%2014.2285%2014.1192%2014.1883%2014.1892C14.1481%2014.2592%2014.0905%2014.3174%2014.0211%2014.3579C13.9516%2014.3984%2013.8729%2014.4198%2013.7927%2014.42H4.95725C4.87708%2014.4198%204.79835%2014.3984%204.72894%2014.3579C4.65953%2014.3174%204.60186%2014.2592%204.56169%2014.1892C4.52152%2014.1192%204.50025%2014.0397%204.5%2013.9588C4.49976%2013.8779%204.52055%2013.7983%204.5603%2013.7281L5.64681%2011.8362H13.1042ZM12.3493%208.32899L13.4358%2010.2219C13.4755%2010.2921%2013.4963%2010.3717%2013.4961%2010.4526C13.4958%2010.5335%2013.4746%2010.613%2013.4344%2010.683C13.3942%2010.753%2013.3365%2010.8112%2013.2671%2010.8517C13.1977%2010.8922%2013.119%2010.9136%2013.0388%2010.9138H5.71216C5.63198%2010.9136%205.55326%2010.8922%205.48385%2010.8517C5.41443%2010.8112%205.35677%2010.753%205.31659%2010.683C5.27642%2010.613%205.25515%2010.5335%205.25491%2010.4526C5.25466%2010.3717%205.27545%2010.2921%205.3152%2010.2219L6.40074%208.32899H12.3493ZM9.77342%201.731L12.635%206.71468C12.6748%206.78496%2012.6956%206.86453%2012.6953%206.94545C12.6951%207.02636%2012.6738%207.1058%2012.6336%207.17583C12.5935%207.24586%2012.5358%207.30403%2012.4664%207.34454C12.397%207.38504%2012.3183%207.40647%2012.2381%207.40667H6.5129C6.43272%207.40647%206.354%207.38504%206.28459%207.34454C6.21518%207.30403%206.15751%207.24586%206.11734%207.17583C6.07716%207.1058%206.05589%207.02636%206.05565%206.94545C6.0554%206.86453%206.07619%206.78496%206.11594%206.71468L8.97755%201.731C9.01806%201.66073%209.07612%201.60241%209.14595%201.56187C9.21578%201.52133%209.29493%201.5%209.37549%201.5C9.45604%201.5%209.53519%201.52133%209.60502%201.56187C9.67485%201.60241%209.73292%201.66073%209.77342%201.731Z'%20fill='white'/%3e%3c/svg%3e")}.ScenesPage .no-scenes-container{display:flex;flex-direction:column;width:100%;padding:50px;background:#242129;border-radius:10px;align-items:center;justify-content:center}.ScenesPage .no-scenes-title{font-size:24px}.ScenesPage .no-scenes-description{color:#fff;width:100%;max-width:620px;font-size:14px;line-height:24px;text-align:center;margin-bottom:36px}.ScenesPage .no-scenes-description a{color:#fff;text-decoration:underline}@keyframes templateAnimation{0%{background:rgba(var(--bluish-steel-raw),.16)}25%{background:rgba(var(--bluish-steel-raw),.3)}50%{background:rgba(var(--bluish-steel-raw),.16)}75%{background:rgba(var(--bluish-steel-raw),.3)}to{background:rgba(var(--bluish-steel-raw),.16)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{T as g,aj as n,ac as a,ad as i}from"./index-BHRIVcTs.js";import{H as s}from"./Navigation.container-9A40G-C8.js";import"./selectors-RKMIkjNm.js";const e=o=>({isLoggedIn:n(o),isLoggingIn:a(o)||i(o)}),r=g(e)(s);export{r as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{J as l,a4 as E,dF as w,R as I,bP as h,N as e,S as t,M as r,bO as T,T as y,dq as B,dv as H,ad as R,bq as O,cT as P,bY as F,ca as A,cW as q}from"./index-
|
|
1
|
+
import{J as l,a4 as E,dF as w,R as I,bP as h,N as e,S as t,M as r,bO as T,T as y,dq as B,dv as H,ad as R,bq as O,cT as P,bY as F,ca as A,cW as q}from"./index-BHRIVcTs.js";import{L as z}from"./LoggedInDetailPage.container-DWMoMSsT.js";import{B as D}from"./Back-Bt1TpmNC.js";import{N as M}from"./NotFound-BGRBV5Uq.js";import"./Navigation.container-9A40G-C8.js";import"./selectors-RKMIkjNm.js";import"./SignInRequired-B_3SXeXM.js";function G(i){const[s,u]=l.useState(void 0),[g,L]=l.useState(void 0),{isLoading:b,ens:o,landTiles:c}=i,m=E(),x=l.useMemo(()=>{const a=Object.values(c||{});if(a.length===1)return a[0].land;let n;for(const d of a)if(d.land.id!==o.landId){n=d.land;break}return n},[c]);l.useEffect(()=>{!s&&!b&&o&&u(x)},[x]);const j=l.useCallback((a,n)=>{const d=h(a,n);return c&&d in c?c[d].land:void 0},[c]),f=l.useCallback((a,n)=>{const d=j(a,n);d&&u(d)},[]),v=l.useCallback(()=>{const a=w(c,s.id);u(a)},[s,c]),S=l.useCallback(()=>{s&&m.push(I.landAssignENS(s.id,o.subdomain))},[o,m,s]),C=l.useCallback((a,n)=>{const d=h(a,n);return(!s||s.id!==d)&&g===d},[]),_=l.useCallback((a,n)=>C(a,n)&&j(a,n)?{color:"#fcc6d1",scale:1.4}:null,[]),k=l.useCallback((a,n)=>{L(h(a,n))},[]),p=l.useCallback(()=>{m.goBack()},[m]),N=s&&o&&s.id===o.landId;return e.jsx(z,{className:"ENSSelectLandPage",hasNavigation:!1,children:b?e.jsx(t.Loader,{active:!0,size:"massive"}):o?e.jsxs(e.Fragment,{children:[e.jsx(D,{absolute:!0,onClick:p}),e.jsxs(t.Narrow,{children:[e.jsx(t.Row,{children:e.jsx(t.Column,{children:e.jsxs(t.Section,{children:[e.jsx(t.Header,{className:"title",size:"large",children:r("ens_select_land_page.title",{name:o?o.subdomain:r("global.name")})}),e.jsx("span",{className:"subtitle",children:r("ens_select_land_page.subtitle")})]})})}),e.jsx("div",{className:"atlas-wrapper",children:e.jsx(T,{showControls:!0,showOwner:!0,isDraggable:!0,landId:s?s.id:void 0,onClick:f,onHover:k,onLocateLand:v,layers:[_]})}),e.jsxs(t.Row,{className:"atlas-footer",children:[e.jsx(t.Column,{grow:!0,children:s?e.jsxs("div",{className:"selected-land",children:[e.jsx("div",{className:"label",children:r("ens_select_land_page.land_selected")}),e.jsxs("div",{className:"land",children:[s.name," (",s.id,")"]})]}):null}),e.jsx(t.Column,{grow:!1,children:e.jsxs("div",{className:"actions",children:[e.jsx(t.Button,{secondary:!0,onClick:p,children:r("global.cancel")}),e.jsx(t.Button,{primary:!0,disabled:!s||N,onClick:S,children:N?r("ens_select_land_page.already_assigned"):r("global.continue")})]})})]})]})]}):e.jsx(M,{})})}const J=(i,s)=>{const{subdomain:u}=s.match.params,g=B(i);return{ens:H(g,u),isLoading:R(i)||O(P(i),q)||F(i),landTiles:A(i)}},X=y(J)(G);export{X as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var y=Object.defineProperty;var b=(o,r,e)=>r in o?y(o,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[r]=e;var d=(o,r,e)=>b(o,typeof r!="symbol"?r+"":r,e);import{J as g,aF as E,N as s,Q as F,R as v,P as C,M as h,T as I,U as L,X as M,a2 as P,bu as i,am as A,S as l,ao as w,aa as D,a4 as T,b1 as B,ab as m,ah as R,bv as k,bw as O,bx as U,aj as W,by as _,bz as z,bn as G,bA as V,ai as $}from"./index-
|
|
1
|
+
var y=Object.defineProperty;var b=(o,r,e)=>r in o?y(o,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[r]=e;var d=(o,r,e)=>b(o,typeof r!="symbol"?r+"":r,e);import{J as g,aF as E,N as s,Q as F,R as v,P as C,M as h,T as I,U as L,X as M,a2 as P,bu as i,am as A,S as l,ao as w,aa as D,a4 as T,b1 as B,ab as m,ah as R,bv as k,bw as O,bx as U,aj as W,by as _,bz as z,bn as G,bA as V,ai as $}from"./index-BHRIVcTs.js";import{B as H}from"./Back-Bt1TpmNC.js";const K=["page","sortBy","sortOrder","group","ethAddress"];var j;let Z=(j=class extends g.PureComponent{constructor(){super(...arguments);d(this,"state",{isDeleting:!1});d(this,"handleOnClick",()=>{const{onClick:e,pool:t}=this.props;e&&e(t)});d(this,"handleConfirmDeleteProject",()=>{this.setState({isDeleting:!0})});d(this,"handleCancelDeleteProject",()=>{this.setState({isDeleting:!1})});d(this,"handleClearDeployment",()=>{const{pool:e,onOpenModal:t}=this.props;t("DeployModal",{view:E.CLEAR_DEPLOYMENT,projectId:e.id})})}render(){const{pool:e}=this.props,t=e.statistics?e.statistics.parcels:e.layout.cols*e.layout.rows;return s.jsxs(F,{to:v.poolView(e.id,"pool"),className:"PoolCard",children:[s.jsx("div",{className:"thumbnail",style:{backgroundImage:`url(${e.thumbnail})`}}),s.jsxs("div",{className:"project-data",children:[s.jsx("div",{className:"title-wrapper",children:s.jsx("div",{className:"title",children:e.title})}),s.jsx("div",{className:"description",title:e.description,children:s.jsxs("div",{className:"component-list",children:[s.jsxs("div",{className:"component",children:[s.jsx(C,{name:"scene-parcel"})," ",h("public_page.parcel_count",{parcels:t})]}),e.statistics&&s.jsxs("div",{className:"component",children:[s.jsx(C,{name:"scene-object"})," ",h("public_page.item_count",{items:e.statistics.transforms})]})]})})]})]})}},d(j,"defaultProps",{items:0}),j);const q=(o,r)=>{const{pool:e}=r,t=L(o)[e.sceneId];return{items:t&&t.sdk6?t.sdk6.metrics.entities:0,deploymentStatus:M(o)[r.pool.id]}},J=o=>({onOpenModal:(r,e)=>o(P(r,e))}),Q=I(q,J)(Z);let X=class extends g.PureComponent{constructor(){super(...arguments);d(this,"handleChangeGroup",(e,t)=>{const{group:n,...a}=this.getFilters(),c=1;t.value==="all"?this.handleChangeFilters({...a,page:c}):this.handleChangeFilters({...a,page:c,group:t.value})});d(this,"handleChangeUser",(e,t)=>{const{ethAddress:n,...a}=this.getFilters(),c=1;t.value==="all"?this.handleChangeFilters({...a,page:c}):this.handleChangeFilters({...a,page:c,ethAddress:t.value})});d(this,"handleChangeSort",(e,t)=>{const n=this.getFilters(),a=1;if(t.value&&n.sortBy!==t.value)switch(t.value){case i.NAME:this.handleChangeFilters({...n,page:a,sortBy:t.value,sortOrder:"asc"});break;default:this.handleChangeFilters({...n,page:a,sortBy:t.value,sortOrder:"desc"})}});d(this,"handlePageChange",(e,t)=>{const n=this.getFilters(),a=Number(t.activePage);!Number.isNaN(a)&&a>0&&this.handleChangeFilters({...n,page:a})});d(this,"handleNavigateToScenes",()=>{const{history:e}=this.props;e.push(v.scenes())})}componentDidMount(){const{location:e}=this.props,t=this.getFilters();(e.search===""||e.search==="?")&&(t.sortBy=i.NEWEST,t.sortOrder="desc"),this.handleChangeFilters(t)}getFilters(e=this.props){return K.reduce((t,n)=>{const a=e[n];return a!==void 0&&(t[n]=a),t},{})}handleChangeFilters(e){const{history:t,onLoadPools:n}=this.props;t.push(v.poolSearch(e)),n(e)}render(){const{pools:e,total:t,totalPages:n,isLoggedIn:a}=this.props,c=this.getFilters(),u={firstItem:null,lastItem:null};return c.page===1&&(u.prevItem=null),c.page===n&&(u.nextItem=null),s.jsxs(s.Fragment,{children:[s.jsx(A,{}),s.jsx(l.Page,{isFullscreen:!0,children:s.jsxs("div",{className:"SceneListPage",children:[s.jsxs(l.Container,{children:[s.jsx(l.Section,{className:"navigation",children:s.jsxs(l.Row,{children:[s.jsx(H,{absolute:!0,onClick:this.handleNavigateToScenes}),s.jsx(l.Narrow,{children:s.jsxs(l.Row,{children:[s.jsx(l.Column,{children:s.jsx(l.Row,{children:s.jsx(l.Header,{size:"large",children:h("scene_list_page.projects_title")})})}),s.jsx(l.Column,{align:"right",children:s.jsxs(l.Row,{children:[s.jsx(l.Responsive,{minWidth:1025,as:g.Fragment,children:a&&s.jsx(l.Dropdown,{direction:"left",value:c.ethAddress||"all",options:[{value:"all",text:h("scene_list_page.filters.all_users")},{value:"me",text:h("scene_list_page.filters.only_me")}],onChange:this.handleChangeUser})}),s.jsx(l.Dropdown,{direction:"left",value:c.sortBy,options:[{value:i.NEWEST,text:h("scene_list_page.filters.newest")},{value:i.NAME,text:h("scene_list_page.filters.name")},{value:i.LIKES,text:h("scene_list_page.filters.likes")},{value:i.ITEMS,text:h("scene_list_page.filters.items")},{value:i.SMART_ITEMS,text:h("scene_list_page.filters.smart_items")},{value:i.SIZE,text:h("scene_list_page.filters.size")}],onChange:this.handleChangeSort})]})})]})})]})}),s.jsx(l.Narrow,{children:s.jsxs("div",{className:"PoolCardList",children:[e===null&&s.jsx(l.Loader,{active:!0,size:"huge"}),Array.isArray(e)&&t===0&&s.jsx("div",{className:"empty-projects",children:h("scene_list_page.no_projects")}),Array.isArray(e)&&t!==0&&s.jsx(s.Fragment,{children:e.map(x=>s.jsx(Q,{pool:x},x.id))})]})})]}),s.jsx(l.Container,{children:t!==null&&n!==null&&s.jsx(l.Pagination,{totalPages:n,activePage:c.page,onPageChange:this.handlePageChange,...u})})]})}),s.jsx(w,{})]})}};const Y=()=>{const o=D(),r=T(),e=B(),t=m(R),n=m(k),a=m(O),c=m(U),u=m(W),x=g.useMemo(()=>{const p=new URLSearchParams(e.search);return{group:_(p.get("group")),ethAddress:_(p.get("eth_address")),page:z(p.get("page"),1),sortBy:G(p.get("sort_by")??"",[i.NEWEST,i.LIKES,i.NAME,i.SIZE,i.ITEMS,i.SMART_ITEMS],i.NEWEST),sortOrder:V(p.get("sort_order"),"desc")}},[e.search]),S=g.useCallback((p,N)=>o(P(p,N)),[o]),f=g.useCallback(p=>o($(p)),[o]);return s.jsx(X,{pools:t,poolGroups:n,total:a,totalPages:c,isLoggedIn:u,onOpenModal:S,onLoadPools:f,history:r,location:e,...x})},le=Y;export{le as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var C=Object.defineProperty;var b=(s,r,e)=>r in s?C(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var l=(s,r,e)=>b(s,typeof r!="symbol"?r+"":r,e);import{aG as v,J as u,W as P,N as t,aq as L,am as p,S as a,ao as g,M as d,bB as f,R as y,bC as k,bD as m,P as h,T as w,bE as N,as as S,av as F,au as j,bF as I,aj as R,ay as A,bG as E,U as T,bH as _,bI as M,bJ as O,bK as B,bL as D,aA as U,bM as V,a2 as $,a3 as q}from"./index-
|
|
1
|
+
var C=Object.defineProperty;var b=(s,r,e)=>r in s?C(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var l=(s,r,e)=>b(s,typeof r!="symbol"?r+"":r,e);import{aG as v,J as u,W as P,N as t,aq as L,am as p,S as a,ao as g,M as d,bB as f,R as y,bC as k,bD as m,P as h,T as w,bE as N,as as S,av as F,au as j,bF as I,aj as R,ay as A,bG as E,U as T,bH as _,bI as M,bJ as O,bK as B,bL as D,aA as U,bM as V,a2 as $,a3 as q}from"./index-BHRIVcTs.js";import{B as W}from"./Back-Bt1TpmNC.js";import{S as G}from"./SDKTag--yigH3bT.js";function J(s){return s?{id:s.id,title:s.title,description:s.description,thumbnail:s.thumbnail,isPublic:!1,sceneId:s.sceneId,ethAddress:s.ethAddress,createdAt:s.createdAt,updatedAt:s.updatedAt,layout:s.layout,isTemplate:!1,video:s.video,templateStatus:null}:null}const K=v.get("PROFILE_URL","");let z=class extends u.PureComponent{constructor(){super(...arguments);l(this,"handlePreview",()=>{this.props.onPreview()});l(this,"handleLike",()=>{const{currentPool:e,isLoggedIn:n,onOpenModal:o}=this.props;e&&(n?this.props.onLikePool(e.id,!e.like):o("LikeModal",{}))});l(this,"handleBack",()=>{const{history:e}=this.props;e.push(y.poolSearch())})}componentDidMount(){const{match:e,onLoadProject:n}=this.props;e.params.projectId&&n(e.params.projectId,this.getType())}componentDidUpdate(){const e=this.getCurrentProject(),n=this.getCurrentScene(),{isLoading:o,onLoadProjectScene:i}=this.props;e&&!n&&!o&&i(e,this.getType())}componentWillUnmount(){this.props.onCloseEditor()}getType(){return this.props.match&&this.props.match.params&&this.props.match.params.type||P.PUBLIC}getCurrentProject(){const{currentProject:e,currentPool:n}=this.props;switch(this.getType()){case"pool":return n;default:return e}}getCurrentScene(){const{scenes:e}=this.props,n=this.getCurrentProject();return n&&e[n.sceneId]||null}getCurrentPool(){const{currentPool:e}=this.props;switch(this.getType()){case"pool":return e;default:return null}}getParcelCount(){const e=this.getCurrentProject();return e?e.layout.cols*e.layout.rows:0}getObjectCount(){const e=this.getCurrentScene();if(!e||!e.sdk6)return 0;const n=this.getParcelCount();if(n===0)return 0;const o=Object.keys(e.sdk6.entities).length;return o<n?0:o-n}renderNotFount(){return t.jsx(L,{})}renderLoading(){return t.jsxs(t.Fragment,{children:[t.jsx(p,{}),t.jsx(a.Page,{isFullscreen:!0,children:t.jsx(a.Loader,{active:!0,size:"huge"})}),t.jsx(g,{isFullscreen:!0})]})}handleExportProject(){const{onOpenModal:e}=this.props;e("ExportModal",{project:J(this.getCurrentProject())})}renderAuthor(){const{currentAuthor:e}=this.props;if(!e)return null;const n=e.avatars[0].ethAddress;return t.jsxs("div",{className:"author",children:[d("public_page.made_by"),t.jsx(f,{address:n,as:"a",href:`${K}/accounts/${n}`})]})}render(){const{isFetching:e,isPreviewing:n,isReady:o}=this.props;if(e)return this.renderLoading();const i=this.getCurrentProject();if(!i)return this.renderNotFount();const c=this.getCurrentPool(),x=this.getCurrentScene();return t.jsxs(t.Fragment,{children:[!n&&t.jsxs(t.Fragment,{children:[t.jsx(p,{}),t.jsxs(a.Container,{className:"back-container",children:[t.jsx(W,{absolute:!0,onClick:this.handleBack}),t.jsxs(a.Button,{secondary:!0,onClick:this.handleExportProject.bind(this),loading:!i,disabled:!i,children:[t.jsx(a.Icon,{name:"download"}),d("scene_detail_page.download_scene")]})]})]}),t.jsxs("div",{className:"SceneViewPage"+(n?" preview":" mini"),children:[t.jsx("div",{className:"thumbnail",style:{backgroundImage:`url("${i.thumbnail}")`},children:t.jsx(a.Responsive,{minWidth:1025,as:u.Fragment,children:t.jsx(k,{isReadOnly:!0,type:this.getType()},i.id)})}),t.jsxs("div",{className:"scene-action-list",children:[c&&t.jsx("div",{className:"scene-action",children:t.jsx(m,{text:t.jsxs(t.Fragment,{children:[t.jsx(h,{name:c.like?"heart-full":"heart"}),c.likes>0&&t.jsx("span",{className:"LikeCount",children:c.likes})]}),type:"circle",onClick:this.handleLike})}),t.jsx("div",{style:{flex:1}}),t.jsx(a.Responsive,{minWidth:1025,as:u.Fragment,children:t.jsx("div",{className:"scene-action",children:t.jsx(m,{icon:"view",type:"circle",isActive:n,isDisabled:!o,onClick:this.handlePreview})})})]}),t.jsxs("div",{className:"detail",children:[t.jsxs("div",{className:"title",children:[t.jsx("h1",{children:i.title}),t.jsx(G,{scene:x})]}),this.renderAuthor(),i.description&&t.jsx("div",{className:"description",children:t.jsx("p",{children:i.description})}),t.jsxs("div",{className:"component-list",children:[t.jsxs("div",{className:"component",children:[t.jsx(h,{name:"scene-parcel"})," ",d("public_page.parcel_count",{parcels:this.getParcelCount()})]}),t.jsxs("div",{className:"component",children:[t.jsx(h,{name:"scene-object"})," ",d("public_page.item_count",{items:this.getObjectCount()})]})]})]})]}),!n&&t.jsx(g,{})]})}};const H=s=>({isPreviewing:S(s),isReady:!F(s)&&j(s),isFetching:I(s)&&!j(s),isLoggedIn:R(s),currentProject:A(s),currentPool:E(s),scenes:T(s),currentAuthor:_(s),isLoading:M(s)||!!O(s).length}),Q=s=>({onLikePool:(r,e=!0)=>s(B(r,e)),onPreview:()=>s(D(!0)),onCloseEditor:()=>s(U()),onLoadProject:(r,e=P.PUBLIC)=>s(V(r,e)),onOpenModal:(r,e)=>s($(r,e)),onLoadProjectScene:(r,e)=>s(q(r,e))}),se=w(H,Q)(N(z));export{se as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b1 as ye,ak as te,a4 as ae,N as e,c$ as z,M as a,T as Re,d0 as me,a7 as ne,d1 as G,S as s,d2 as Y,d3 as Pe,d4 as M,cN as De,J as l,R as k,aG as le,bQ as Ae,aa as ge,ab as _,d5 as We,d6 as pe,d7 as Oe,bq as L,d8 as Ue,cT as xe,d9 as se,da as Ce,db as je,dc as de,dd as ue,de as K,df as Q,P as be,a5 as he,cP as Be,dg as Me,dh as Ie,cQ as He,di as $e,cc as Fe,dj as ze,ac as Ke,aj as Qe,dk as Ge,dl as Ye,cU as Ve,a2 as X,dm as qe,cV as Je,cW as Xe,cd as Ze,dn as es}from"./index-DTDyEcLh.js";import{a as we,N as ss}from"./Navigation.container-zriX5zTq.js";import{L as ts}from"./LoggedInDetailPage.container-CzPOYbHr.js";import"./selectors-DOsTc9Gc.js";import"./SignInRequired-BesSl-uu.js";var B=(t=>(t.DESC="DESC",t.ASC="ASC",t))(B||{});const Ne="tab";var b=(t=>(t.DCL="dcl",t.ENS="ens",t.CONTRIBUTOR="contributor",t))(b||{});const Ee=()=>{const t=ye(),n=new URLSearchParams(t.search),d=n.get(Ne),m={urlSearchParams:n,pathname:t.pathname};switch(d){case"dcl":m.tab="dcl";break;case"ens":m.tab="ens";break;case"contributor":m.tab="contributor";break}return m},as=({isWorldContributorEnabled:t})=>{const{tab:n,pathname:d,urlSearchParams:m}=Ee(),c=ae(),g=o=>{const i=new URLSearchParams(m);i.set(Ne,o),c.push(`${d}?${i.toString()}`)};return!n||n===b.CONTRIBUTOR&&!t?(g(b.DCL),null):e.jsxs(z,{children:[e.jsx(z.Tab,{active:n===b.DCL,onClick:()=>g(b.DCL),children:a("worlds_list_page.name_tabs.dcl_names")}),e.jsx(z.Tab,{active:n===b.ENS,onClick:()=>g(b.ENS),children:a("worlds_list_page.name_tabs.ens_names")}),t&&e.jsx(z.Tab,{active:n===b.CONTRIBUTOR,onClick:()=>g(b.CONTRIBUTOR),children:a("worlds_list_page.name_tabs.contributor_names")})]})},ns=te.memo(as),ls=t=>({isWorldContributorEnabled:me(t)}),rs=Re(ls)(ns),os="_container_12bci_1",is="_used_12bci_7",cs="_description_12bci_13",ds="_link_12bci_20",us="_space_12bci_27",bs="_current_12bci_33",hs="_bar_12bci_38",S={container:os,used:is,description:cs,link:ds,space:us,current:bs,bar:hs},_s="worlds-storage-current-mbs",ms="worlds-storage-bar-front",gs="worlds-storage",ps=({maxBytes:t,currentBytes:n,className:d,onViewDetails:m})=>{const c=Y(t),g=Y(n),o=g*100/c;return e.jsxs("div",{"data-testid":gs,className:ne(S.container,d),children:[e.jsx("span",{className:S.used,children:a("worlds_list_page.worlds_storage.used")}),e.jsxs("div",{className:S.description,children:[e.jsx("span",{children:a("worlds_list_page.worlds_storage.description")})," ",e.jsx("span",{className:S.link,onClick:m,children:a("worlds_list_page.worlds_storage.link")})]}),e.jsxs("div",{className:S.space,children:[e.jsxs("div",{"data-testid":_s,children:[e.jsx("span",{className:S.current,children:G(g)})," / ",G(c)," Mb"]}),e.jsx(s.Progress,{"data-testid":ms,percent:Math.trunc(o),className:S.bar,size:"small"})]})]})},xs=te.memo(ps),Cs="_worldUrl_1sb6i_1",js="_rightContainer_1sb6i_7",ws="_copyUrn_1sb6i_13",Z={worldUrl:Cs,rightContainer:js,copyUrn:ws};function Te({ens:t,deploymentsByWorlds:n}){const d=Pe(t.subdomain);return M(n,t)?e.jsxs("div",{className:Z.worldUrl,children:[e.jsx("span",{children:d}),e.jsxs("div",{className:Z.rightContainer,children:[e.jsx(De,{role:"button",text:d,showPopup:!0,children:e.jsx(s.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:ne("copy",Z.copyUrn),name:"copy outline"})}),e.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:e.jsx(s.Icon,{name:"external alternate"})})]})]}):e.jsx("span",{className:"empty-url",children:a("worlds_list_page.table.empty_url")})}function Se({deploymentsByWorlds:t,ens:n,projects:d,onEditScene:m,onUnpublishScene:c,onPublishScene:g}){const o=t[n.subdomain];return M(t,n)?e.jsxs("div",{className:"publish-scene",children:[e.jsx(s.Popup,{content:o==null?void 0:o.name,on:"hover",trigger:e.jsx("span",{children:o==null?void 0:o.name})}),d.find(i=>i.id===(o==null?void 0:o.projectId))?m&&e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>m(n),children:a("worlds_list_page.table.edit_scene")}):c&&e.jsx(s.Popup,{content:a("worlds_list_page.table.scene_published_outside_builder"),on:"hover",position:"top center",trigger:e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>c(n),children:a("worlds_list_page.table.unpublish_scene")})})]}):e.jsxs("div",{className:"publish-scene",children:[e.jsx("span",{children:"-"}),g&&e.jsx(s.Button,{primary:!0,size:"small",onClick:g,children:a("worlds_list_page.table.publish_scene")})]})}function Ns({items:t,deploymentsByWorlds:n,projects:d,loading:m,error:c,onUnpublishWorld:g}){const o=ae(),i=l.useCallback(()=>{o.push(k.scenes())},[o]),N=l.useCallback(p=>{const{projectId:x}=n[p.subdomain];o.push(k.sceneDetail(x))},[n,k,o]),E=l.useCallback(p=>{var C;const x=(C=n[p.subdomain])==null?void 0:C.id;x&&g(x)},[n,g]);return c?e.jsx(s.Message,{error:!0,size:"tiny",visible:!0,content:c.message,header:a("worlds_list_page.error_title")}):m?e.jsx(s.Loader,{active:!0,size:"big"}):t.length?e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.owner")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.permissions")})]})}),e.jsx(s.Table.Body,{children:t.map((p,x)=>{var v,y;const C=(v=p.userPermissions)==null?void 0:v.includes("deployment"),f=(y=p.userPermissions)==null?void 0:y.map(R=>a(`worlds_list_page.table.user_permissions.${R}`)).join("/");return e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:1,children:p.name}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Ae,{address:p.nftOwnerAddress||""})}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Te,{deploymentsByWorlds:n,ens:p})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Se,{deploymentsByWorlds:n,ens:p,projects:d,onEditScene:C?N:void 0,onPublishScene:C?i:void 0,onUnpublishScene:C?E:void 0})}),e.jsx(s.Table.Cell,{width:1,children:G(Y(Number(p.size)||0))}),e.jsx(s.Table.Cell,{width:1,children:f})]},x)})})]}):e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:"empty-icon dcl-icon"}),e.jsx("div",{className:"empty-title",children:a("worlds_list_page.empty_contributor_list.title")}),e.jsx("div",{className:"empty-description",children:a("worlds_list_page.empty_contributor_list.description",{b:p=>e.jsx("b",{children:p})})}),e.jsx(s.Button,{as:"a",href:`${le.get("MARKETPLACE_WEB_URL")}/names/claim`,target:"_blank",className:"empty-action",primary:!0,children:a("worlds_list_page.empty_list.cta")})]})}const Es=()=>{const t=ge(),n=we(),d=_(We),m=_(pe),c=_(Oe),g=_(i=>L(xe(i),Ue)||L(Ce(i),se)),o=l.useCallback(i=>t(je(i)),[t]);return e.jsx(Ns,{items:d,deploymentsByWorlds:m,projects:n,loading:g,error:c,onUnpublishWorld:o})},_e="Worlds List Page Action",Ts=le.get("ENS_DOMAINS_URL",""),Ss=le.get("MARKETPLACE_WEB_URL"),ee=12,Ls=t=>{const{ensList:n,externalNames:d,error:m,deploymentsByWorlds:c,isLoading:g,projects:o,worldsWalletStats:i,isConnected:N,isWorldContributorEnabled:E,ensTotal:p,onOpenYourStorageModal:x,onOpenWorldsForENSOwnersAnnouncementModal:C,onUnpublishWorld:f,onOpenPermissionsModal:v,onFetchContributableNames:y,onFetchENSList:R}=t,[I,P]=l.useState(B.DESC),[O,U]=l.useState(1),{tab:h}=Ee(),D=ae();l.useEffect(()=>{N&&E&&y()},[N,E]),l.useEffect(()=>{h===b.DCL&&R(ee,(O-1)*ee)},[R,O]);const A=l.useCallback(()=>{h===b.DCL?(de(_e,{action:"Click Claim NAME"}),window.open(`${Ss}/names/claim`,"_blank","noopener,noreferrer")):(de(_e,{action:"Click Claim ENS Domain"}),window.open(Ts,"_blank","noopener,noreferrer"))},[h]),V=l.useCallback(()=>{D.push(k.scenes())},[k,D]),q=l.useCallback(u=>{const{projectId:r}=c[u.subdomain];D.push(k.sceneDetail(r))},[c,k,D]),w=l.useCallback(u=>{var j;const r=(j=c[u.subdomain])==null?void 0:j.id;r&&f(r)},[c,f]),W=l.useCallback((u,r)=>{U(+r.activePage)},[]),re=l.useCallback(()=>e.jsx(s.Dropdown,{direction:"left",value:I,options:[{value:B.ASC,text:a("global.order.name_asc")},{value:B.DESC,text:a("global.order.name_desc")}],onChange:(u,{value:r})=>P(r)}),[I,P]),oe=l.useCallback(u=>{let r=M(c,u)?"active":"inactive";if(r==="active"&&i&&!ue(u.subdomain))switch(K(i).status){case Q.BLOCKED:{r="blocked";break}case Q.TO_BE_BLOCKED:r="warning"}return e.jsx("span",{className:`world-status ${r}`,children:a(`worlds_list_page.table.status_${r}`)})},[c,K,ue,M]),ie=l.useCallback((u,r)=>{var F;const j=h===b.DCL?r==null?void 0:r.dclNames:r==null?void 0:r.ensNames;if(!M(c,u)||!j)return"-";const T=(F=j.find(ve=>ve.name===u.subdomain))==null?void 0:F.size,J=h===b.ENS?" / 25":"";return G(Y(Number(T)))+J},[h]),Le=l.useCallback((u,r)=>{v(r)},[]),H=l.useCallback(()=>{const u=h===b.DCL?p:d.length,r=Math.ceil(u/ee),j=h===b.DCL?n:d;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{children:e.jsx(s.Row,{children:e.jsx(s.Header,{sub:!0,className:"items-count",children:a("ens_list_page.items",{count:t.ensTotal.toLocaleString()})})})}),e.jsx(s.Column,{align:"right",children:e.jsx(s.Row,{children:re()})}),e.jsx(s.Column,{align:"right",grow:!1,shrink:!0,children:e.jsx(s.Row,{children:e.jsx("div",{className:"actions",children:e.jsx(s.Button,{basic:!0,onClick:A,children:e.jsx(be,{name:"add-active"})})})})})]})})}),e.jsx(s.Container,{children:e.jsxs(s.Section,{className:"table-section",children:[e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.status")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center"})]})}),e.jsx(s.Table.Body,{children:j.map((T,J)=>e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:2,children:T.name}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Te,{deploymentsByWorlds:c,ens:T})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Se,{deploymentsByWorlds:c,ens:T,projects:o,onEditScene:q,onPublishScene:V,onUnpublishScene:w})}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:ie(T,i)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:oe(T)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:e.jsx(s.Button,{basic:!0,onClick:F=>Le(F,T.subdomain),children:a("worlds_list_page.table.permissions")})})]},J))})]}),r>1&&e.jsx(s.Pagination,{firstItem:null,lastItem:null,totalPages:r,activePage:O,onPageChange:W})]})})]})},[h,n,d,A,re,ie,oe,W,p]),$=l.useCallback(()=>e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:ne("empty-icon",h===b.DCL?"dcl-icon":"ens-icon")}),e.jsx("div",{className:"empty-title",children:h===b.DCL?a("worlds_list_page.empty_list.title"):a("worlds_list_page.empty_list.title_ens")}),e.jsx("div",{className:"empty-description",children:h===b.DCL?a("worlds_list_page.empty_list.description",{b:u=>e.jsx("b",{children:u})}):a("worlds_list_page.empty_list.description_ens",{b:u=>e.jsx("b",{children:u})})}),e.jsx(s.Button,{className:"empty-action",primary:!0,onClick:A,children:h===b.DCL?a("worlds_list_page.empty_list.cta"):a("worlds_list_page.empty_list.cta_ens")})]}),[h,A]),ce=l.useCallback(()=>{if(!i)return null;const u=K(i);if(u.status===Q.OK)return null;let r;return u.status===Q.TO_BE_BLOCKED?r=a("worlds_list_page.worlds_warning_message.to_be_blocked",{toBeBlockedAt:u.toBeBlockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}):r=a("worlds_list_page.worlds_warning_message.blocked",{blockedAt:u.blockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}),e.jsxs("div",{className:"insufficient-storage-message",children:[e.jsx("div",{children:e.jsx(be,{name:"alert-warning"})}),e.jsx("div",{children:r})]})},[i,K]),ke=l.useCallback(()=>n.length?e.jsxs("div",{children:[i?e.jsx(xs,{maxBytes:Number(i.maxAllowedSpace),currentBytes:Number(i.usedSpace),className:"worlds-storage",onViewDetails:()=>{x({stats:i})}}):null,ce(),H()]}):e.jsx("div",{children:$()}),[n,i,H,$,ce,x]),fe=l.useCallback(()=>e.jsx("div",{children:d.length>0?H():$()}),[d,$,H]);return l.useEffect(()=>{P(B.ASC),U(1)},[h,U,P]),l.useEffect(()=>{he()&&C()},[he,C]),e.jsx(ts,{className:"WorldListPage view",error:m,activeTab:ss.WORLDS,isLoading:g,isPageFullscreen:!0,children:e.jsxs(s.Container,{children:[e.jsx("h1",{children:a("worlds_list_page.title")}),e.jsx(rs,{}),h===b.DCL&&ke(),h===b.ENS&&fe(),h===b.CONTRIBUTOR&&E&&e.jsx(Es,{})]})})},ks=te.memo(Ls),fs=()=>{const t=ge(),n=we(),d=_(Be),m=_(Me),c=_(pe),g=_(Ie),o=_(He),i=_($e),N=_(xe),E=_(Ce),p=_(Fe),x=_(ze),C=_(Ke),f=_(Qe),v=_(Ge),y=_(Ye),R=_(me),I=_(Ve),P=(o==null?void 0:o.message)??i??void 0,O=l.useMemo(()=>L(N,Xe)||L(E,se)||L(p,Ze)||L(x,se)||L(N,es)||C,[N,E,p,x,C]),U=l.useCallback(w=>t(X("WorldsYourStorageModal",w)),[t]),h=l.useCallback((w,W)=>t(X("WorldPermissionsModal",{worldName:w,isCollaboratorsTabShown:W})),[t]),D=l.useCallback(()=>t(X("WorldsForENSOwnersAnnouncementModal")),[t]),A=l.useCallback(w=>t(je(w)),[t]),V=l.useCallback(()=>t(qe()),[t]),q=l.useCallback((w,W)=>t(Je(w,W)),[t]);return e.jsx(ks,{ensList:d,externalNames:m,deploymentsByWorlds:c,projects:n,worldsPermissions:g,error:P,isLoading:O,isLoggedIn:f,worldsWalletStats:v,isConnected:y,isWorldContributorEnabled:R,ensTotal:I,onOpenYourStorageModal:U,onOpenPermissionsModal:h,onOpenWorldsForENSOwnersAnnouncementModal:D,onUnpublishWorld:A,onFetchContributableNames:V,onFetchENSList:q})},As=fs;export{As as default};
|
|
1
|
+
import{b1 as ye,ak as te,a4 as ae,N as e,c$ as z,M as a,T as Re,d0 as me,a7 as ne,d1 as G,S as s,d2 as Y,d3 as Pe,d4 as M,cN as De,J as l,R as k,aG as le,bQ as Ae,aa as ge,ab as _,d5 as We,d6 as pe,d7 as Oe,bq as L,d8 as Ue,cT as xe,d9 as se,da as Ce,db as je,dc as de,dd as ue,de as K,df as Q,P as be,a5 as he,cP as Be,dg as Me,dh as Ie,cQ as He,di as $e,cc as Fe,dj as ze,ac as Ke,aj as Qe,dk as Ge,dl as Ye,cU as Ve,a2 as X,dm as qe,cV as Je,cW as Xe,cd as Ze,dn as es}from"./index-BHRIVcTs.js";import{a as we,N as ss}from"./Navigation.container-9A40G-C8.js";import{L as ts}from"./LoggedInDetailPage.container-DWMoMSsT.js";import"./selectors-RKMIkjNm.js";import"./SignInRequired-B_3SXeXM.js";var B=(t=>(t.DESC="DESC",t.ASC="ASC",t))(B||{});const Ne="tab";var b=(t=>(t.DCL="dcl",t.ENS="ens",t.CONTRIBUTOR="contributor",t))(b||{});const Ee=()=>{const t=ye(),n=new URLSearchParams(t.search),d=n.get(Ne),m={urlSearchParams:n,pathname:t.pathname};switch(d){case"dcl":m.tab="dcl";break;case"ens":m.tab="ens";break;case"contributor":m.tab="contributor";break}return m},as=({isWorldContributorEnabled:t})=>{const{tab:n,pathname:d,urlSearchParams:m}=Ee(),c=ae(),g=o=>{const i=new URLSearchParams(m);i.set(Ne,o),c.push(`${d}?${i.toString()}`)};return!n||n===b.CONTRIBUTOR&&!t?(g(b.DCL),null):e.jsxs(z,{children:[e.jsx(z.Tab,{active:n===b.DCL,onClick:()=>g(b.DCL),children:a("worlds_list_page.name_tabs.dcl_names")}),e.jsx(z.Tab,{active:n===b.ENS,onClick:()=>g(b.ENS),children:a("worlds_list_page.name_tabs.ens_names")}),t&&e.jsx(z.Tab,{active:n===b.CONTRIBUTOR,onClick:()=>g(b.CONTRIBUTOR),children:a("worlds_list_page.name_tabs.contributor_names")})]})},ns=te.memo(as),ls=t=>({isWorldContributorEnabled:me(t)}),rs=Re(ls)(ns),os="_container_12bci_1",is="_used_12bci_7",cs="_description_12bci_13",ds="_link_12bci_20",us="_space_12bci_27",bs="_current_12bci_33",hs="_bar_12bci_38",S={container:os,used:is,description:cs,link:ds,space:us,current:bs,bar:hs},_s="worlds-storage-current-mbs",ms="worlds-storage-bar-front",gs="worlds-storage",ps=({maxBytes:t,currentBytes:n,className:d,onViewDetails:m})=>{const c=Y(t),g=Y(n),o=g*100/c;return e.jsxs("div",{"data-testid":gs,className:ne(S.container,d),children:[e.jsx("span",{className:S.used,children:a("worlds_list_page.worlds_storage.used")}),e.jsxs("div",{className:S.description,children:[e.jsx("span",{children:a("worlds_list_page.worlds_storage.description")})," ",e.jsx("span",{className:S.link,onClick:m,children:a("worlds_list_page.worlds_storage.link")})]}),e.jsxs("div",{className:S.space,children:[e.jsxs("div",{"data-testid":_s,children:[e.jsx("span",{className:S.current,children:G(g)})," / ",G(c)," Mb"]}),e.jsx(s.Progress,{"data-testid":ms,percent:Math.trunc(o),className:S.bar,size:"small"})]})]})},xs=te.memo(ps),Cs="_worldUrl_1sb6i_1",js="_rightContainer_1sb6i_7",ws="_copyUrn_1sb6i_13",Z={worldUrl:Cs,rightContainer:js,copyUrn:ws};function Te({ens:t,deploymentsByWorlds:n}){const d=Pe(t.subdomain);return M(n,t)?e.jsxs("div",{className:Z.worldUrl,children:[e.jsx("span",{children:d}),e.jsxs("div",{className:Z.rightContainer,children:[e.jsx(De,{role:"button",text:d,showPopup:!0,children:e.jsx(s.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:ne("copy",Z.copyUrn),name:"copy outline"})}),e.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:e.jsx(s.Icon,{name:"external alternate"})})]})]}):e.jsx("span",{className:"empty-url",children:a("worlds_list_page.table.empty_url")})}function Se({deploymentsByWorlds:t,ens:n,projects:d,onEditScene:m,onUnpublishScene:c,onPublishScene:g}){const o=t[n.subdomain];return M(t,n)?e.jsxs("div",{className:"publish-scene",children:[e.jsx(s.Popup,{content:o==null?void 0:o.name,on:"hover",trigger:e.jsx("span",{children:o==null?void 0:o.name})}),d.find(i=>i.id===(o==null?void 0:o.projectId))?m&&e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>m(n),children:a("worlds_list_page.table.edit_scene")}):c&&e.jsx(s.Popup,{content:a("worlds_list_page.table.scene_published_outside_builder"),on:"hover",position:"top center",trigger:e.jsx(s.Button,{inverted:!0,size:"small",onClick:()=>c(n),children:a("worlds_list_page.table.unpublish_scene")})})]}):e.jsxs("div",{className:"publish-scene",children:[e.jsx("span",{children:"-"}),g&&e.jsx(s.Button,{primary:!0,size:"small",onClick:g,children:a("worlds_list_page.table.publish_scene")})]})}function Ns({items:t,deploymentsByWorlds:n,projects:d,loading:m,error:c,onUnpublishWorld:g}){const o=ae(),i=l.useCallback(()=>{o.push(k.scenes())},[o]),N=l.useCallback(p=>{const{projectId:x}=n[p.subdomain];o.push(k.sceneDetail(x))},[n,k,o]),E=l.useCallback(p=>{var C;const x=(C=n[p.subdomain])==null?void 0:C.id;x&&g(x)},[n,g]);return c?e.jsx(s.Message,{error:!0,size:"tiny",visible:!0,content:c.message,header:a("worlds_list_page.error_title")}):m?e.jsx(s.Loader,{active:!0,size:"big"}):t.length?e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.owner")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.permissions")})]})}),e.jsx(s.Table.Body,{children:t.map((p,x)=>{var v,y;const C=(v=p.userPermissions)==null?void 0:v.includes("deployment"),f=(y=p.userPermissions)==null?void 0:y.map(R=>a(`worlds_list_page.table.user_permissions.${R}`)).join("/");return e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:1,children:p.name}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Ae,{address:p.nftOwnerAddress||""})}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Te,{deploymentsByWorlds:n,ens:p})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Se,{deploymentsByWorlds:n,ens:p,projects:d,onEditScene:C?N:void 0,onPublishScene:C?i:void 0,onUnpublishScene:C?E:void 0})}),e.jsx(s.Table.Cell,{width:1,children:G(Y(Number(p.size)||0))}),e.jsx(s.Table.Cell,{width:1,children:f})]},x)})})]}):e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:"empty-icon dcl-icon"}),e.jsx("div",{className:"empty-title",children:a("worlds_list_page.empty_contributor_list.title")}),e.jsx("div",{className:"empty-description",children:a("worlds_list_page.empty_contributor_list.description",{b:p=>e.jsx("b",{children:p})})}),e.jsx(s.Button,{as:"a",href:`${le.get("MARKETPLACE_WEB_URL")}/names/claim`,target:"_blank",className:"empty-action",primary:!0,children:a("worlds_list_page.empty_list.cta")})]})}const Es=()=>{const t=ge(),n=we(),d=_(We),m=_(pe),c=_(Oe),g=_(i=>L(xe(i),Ue)||L(Ce(i),se)),o=l.useCallback(i=>t(je(i)),[t]);return e.jsx(Ns,{items:d,deploymentsByWorlds:m,projects:n,loading:g,error:c,onUnpublishWorld:o})},_e="Worlds List Page Action",Ts=le.get("ENS_DOMAINS_URL",""),Ss=le.get("MARKETPLACE_WEB_URL"),ee=12,Ls=t=>{const{ensList:n,externalNames:d,error:m,deploymentsByWorlds:c,isLoading:g,projects:o,worldsWalletStats:i,isConnected:N,isWorldContributorEnabled:E,ensTotal:p,onOpenYourStorageModal:x,onOpenWorldsForENSOwnersAnnouncementModal:C,onUnpublishWorld:f,onOpenPermissionsModal:v,onFetchContributableNames:y,onFetchENSList:R}=t,[I,P]=l.useState(B.DESC),[O,U]=l.useState(1),{tab:h}=Ee(),D=ae();l.useEffect(()=>{N&&E&&y()},[N,E]),l.useEffect(()=>{h===b.DCL&&R(ee,(O-1)*ee)},[R,O]);const A=l.useCallback(()=>{h===b.DCL?(de(_e,{action:"Click Claim NAME"}),window.open(`${Ss}/names/claim`,"_blank","noopener,noreferrer")):(de(_e,{action:"Click Claim ENS Domain"}),window.open(Ts,"_blank","noopener,noreferrer"))},[h]),V=l.useCallback(()=>{D.push(k.scenes())},[k,D]),q=l.useCallback(u=>{const{projectId:r}=c[u.subdomain];D.push(k.sceneDetail(r))},[c,k,D]),w=l.useCallback(u=>{var j;const r=(j=c[u.subdomain])==null?void 0:j.id;r&&f(r)},[c,f]),W=l.useCallback((u,r)=>{U(+r.activePage)},[]),re=l.useCallback(()=>e.jsx(s.Dropdown,{direction:"left",value:I,options:[{value:B.ASC,text:a("global.order.name_asc")},{value:B.DESC,text:a("global.order.name_desc")}],onChange:(u,{value:r})=>P(r)}),[I,P]),oe=l.useCallback(u=>{let r=M(c,u)?"active":"inactive";if(r==="active"&&i&&!ue(u.subdomain))switch(K(i).status){case Q.BLOCKED:{r="blocked";break}case Q.TO_BE_BLOCKED:r="warning"}return e.jsx("span",{className:`world-status ${r}`,children:a(`worlds_list_page.table.status_${r}`)})},[c,K,ue,M]),ie=l.useCallback((u,r)=>{var F;const j=h===b.DCL?r==null?void 0:r.dclNames:r==null?void 0:r.ensNames;if(!M(c,u)||!j)return"-";const T=(F=j.find(ve=>ve.name===u.subdomain))==null?void 0:F.size,J=h===b.ENS?" / 25":"";return G(Y(Number(T)))+J},[h]),Le=l.useCallback((u,r)=>{v(r)},[]),H=l.useCallback(()=>{const u=h===b.DCL?p:d.length,r=Math.ceil(u/ee),j=h===b.DCL?n:d;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{children:e.jsx(s.Row,{children:e.jsx(s.Header,{sub:!0,className:"items-count",children:a("ens_list_page.items",{count:t.ensTotal.toLocaleString()})})})}),e.jsx(s.Column,{align:"right",children:e.jsx(s.Row,{children:re()})}),e.jsx(s.Column,{align:"right",grow:!1,shrink:!0,children:e.jsx(s.Row,{children:e.jsx("div",{className:"actions",children:e.jsx(s.Button,{basic:!0,onClick:A,children:e.jsx(be,{name:"add-active"})})})})})]})})}),e.jsx(s.Container,{children:e.jsxs(s.Section,{className:"table-section",children:[e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.name")}),e.jsx(s.Table.HeaderCell,{width:"2",children:a("worlds_list_page.table.url")}),e.jsx(s.Table.HeaderCell,{width:"1",children:a("worlds_list_page.table.published_scene")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.size")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center",children:a("worlds_list_page.table.status")}),e.jsx(s.Table.HeaderCell,{width:"1",textAlign:"center"})]})}),e.jsx(s.Table.Body,{children:j.map((T,J)=>e.jsxs(s.Table.Row,{className:"TableRow",children:[e.jsx(s.Table.Cell,{width:2,children:T.name}),e.jsx(s.Table.Cell,{width:2,children:e.jsx(Te,{deploymentsByWorlds:c,ens:T})}),e.jsx(s.Table.Cell,{width:1,children:e.jsx(Se,{deploymentsByWorlds:c,ens:T,projects:o,onEditScene:q,onPublishScene:V,onUnpublishScene:w})}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:ie(T,i)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:oe(T)}),e.jsx(s.Table.Cell,{width:1,textAlign:"center",children:e.jsx(s.Button,{basic:!0,onClick:F=>Le(F,T.subdomain),children:a("worlds_list_page.table.permissions")})})]},J))})]}),r>1&&e.jsx(s.Pagination,{firstItem:null,lastItem:null,totalPages:r,activePage:O,onPageChange:W})]})})]})},[h,n,d,A,re,ie,oe,W,p]),$=l.useCallback(()=>e.jsxs(s.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:ne("empty-icon",h===b.DCL?"dcl-icon":"ens-icon")}),e.jsx("div",{className:"empty-title",children:h===b.DCL?a("worlds_list_page.empty_list.title"):a("worlds_list_page.empty_list.title_ens")}),e.jsx("div",{className:"empty-description",children:h===b.DCL?a("worlds_list_page.empty_list.description",{b:u=>e.jsx("b",{children:u})}):a("worlds_list_page.empty_list.description_ens",{b:u=>e.jsx("b",{children:u})})}),e.jsx(s.Button,{className:"empty-action",primary:!0,onClick:A,children:h===b.DCL?a("worlds_list_page.empty_list.cta"):a("worlds_list_page.empty_list.cta_ens")})]}),[h,A]),ce=l.useCallback(()=>{if(!i)return null;const u=K(i);if(u.status===Q.OK)return null;let r;return u.status===Q.TO_BE_BLOCKED?r=a("worlds_list_page.worlds_warning_message.to_be_blocked",{toBeBlockedAt:u.toBeBlockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}):r=a("worlds_list_page.worlds_warning_message.blocked",{blockedAt:u.blockedAt.toLocaleDateString(),b:j=>e.jsx("b",{children:j})}),e.jsxs("div",{className:"insufficient-storage-message",children:[e.jsx("div",{children:e.jsx(be,{name:"alert-warning"})}),e.jsx("div",{children:r})]})},[i,K]),ke=l.useCallback(()=>n.length?e.jsxs("div",{children:[i?e.jsx(xs,{maxBytes:Number(i.maxAllowedSpace),currentBytes:Number(i.usedSpace),className:"worlds-storage",onViewDetails:()=>{x({stats:i})}}):null,ce(),H()]}):e.jsx("div",{children:$()}),[n,i,H,$,ce,x]),fe=l.useCallback(()=>e.jsx("div",{children:d.length>0?H():$()}),[d,$,H]);return l.useEffect(()=>{P(B.ASC),U(1)},[h,U,P]),l.useEffect(()=>{he()&&C()},[he,C]),e.jsx(ts,{className:"WorldListPage view",error:m,activeTab:ss.WORLDS,isLoading:g,isPageFullscreen:!0,children:e.jsxs(s.Container,{children:[e.jsx("h1",{children:a("worlds_list_page.title")}),e.jsx(rs,{}),h===b.DCL&&ke(),h===b.ENS&&fe(),h===b.CONTRIBUTOR&&E&&e.jsx(Es,{})]})})},ks=te.memo(Ls),fs=()=>{const t=ge(),n=we(),d=_(Be),m=_(Me),c=_(pe),g=_(Ie),o=_(He),i=_($e),N=_(xe),E=_(Ce),p=_(Fe),x=_(ze),C=_(Ke),f=_(Qe),v=_(Ge),y=_(Ye),R=_(me),I=_(Ve),P=(o==null?void 0:o.message)??i??void 0,O=l.useMemo(()=>L(N,Xe)||L(E,se)||L(p,Ze)||L(x,se)||L(N,es)||C,[N,E,p,x,C]),U=l.useCallback(w=>t(X("WorldsYourStorageModal",w)),[t]),h=l.useCallback((w,W)=>t(X("WorldPermissionsModal",{worldName:w,isCollaboratorsTabShown:W})),[t]),D=l.useCallback(()=>t(X("WorldsForENSOwnersAnnouncementModal")),[t]),A=l.useCallback(w=>t(je(w)),[t]),V=l.useCallback(()=>t(qe()),[t]),q=l.useCallback((w,W)=>t(Je(w,W)),[t]);return e.jsx(ks,{ensList:d,externalNames:m,deploymentsByWorlds:c,projects:n,worldsPermissions:g,error:P,isLoading:O,isLoggedIn:f,worldsWalletStats:v,isConnected:y,isWorldContributorEnabled:R,ensTotal:I,onOpenYourStorageModal:U,onOpenPermissionsModal:h,onOpenWorldsForENSOwnersAnnouncementModal:D,onUnpublishWorld:A,onFetchContributableNames:V,onFetchENSList:q})},As=fs;export{As as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var E=Object.defineProperty;var _=(n,t,a)=>t in n?E(n,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[t]=a;var j=(n,t,a)=>_(n,typeof t!="symbol"?t+"":t,a);import{J as R,N as e,b6 as v,M as r,bN as T,S as s,R as k,bO as y,bP as D,bQ as I,bR as f,bS as S,T as O,bE as F,bT as $,bU as H,bV as h,bW as g,bD as C,bX as V,bY as B,bZ as G}from"./index-
|
|
1
|
+
var E=Object.defineProperty;var _=(n,t,a)=>t in n?E(n,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[t]=a;var j=(n,t,a)=>_(n,typeof t!="symbol"?t+"":t,a);import{J as R,N as e,b6 as v,M as r,bN as T,S as s,R as k,bO as y,bP as D,bQ as I,bR as f,bS as S,T as O,bE as F,bT as $,bU as H,bV as h,bW as g,bD as C,bX as V,bY as B,bZ as G}from"./index-BHRIVcTs.js";import{N as W}from"./Navigation.container-9A40G-C8.js";import{L as M}from"./LoggedInDetailPage.container-DWMoMSsT.js";import{R as X}from"./RentalPeriod-Em0xOmR0.js";import"./selectors-RKMIkjNm.js";import"./SignInRequired-B_3SXeXM.js";import"./index-LLu-0F-B.js";const Y=n=>n.ui.land,Z=n=>Y(n).view;class A extends R.PureComponent{render(){const{list:t}=this.props;switch(t.length){case 0:return r("global.none");case 1:return t[0];case 2:return e.jsx(v,{id:"list.two",values:{first:t[0],second:t[1]}});default:return e.jsx(v,{id:"list.two",values:{first:t[0],second:r("list.more",{count:t.length-1})}})}}}const q=(n,t)=>f(n,S)?1:f(t,S)?-1:n>t?1:-1;let z=class extends R.PureComponent{render(){const{land:t,deployments:a,rental:l,history:o}=this.props,{x:d,y:p}=T(t);return e.jsxs(s.Table.Row,{className:"TableRow",onClick:()=>o.push(k.landDetail(t.id)),children:[e.jsx(s.Table.Cell,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{width:67,grow:!1,shrink:!1,children:e.jsx(y,{landId:t.id,width:45,height:45,isDraggable:!1,size:9})}),e.jsx(s.Column,{className:"name",children:e.jsxs("div",{children:[t.name," ",e.jsx("span",{className:"secondary-text",children:D(d,p)})]})})]})}),e.jsx(s.Table.Cell,{children:e.jsxs("div",{children:[r(`roles.${t.role}`)," ",l?e.jsx(X,{land:t,rental:l}):null]})}),e.jsx(s.Table.Cell,{children:e.jsx(A,{list:t.operators.sort(q).map(c=>e.jsx(I,{address:c}))})}),e.jsx(s.Table.Cell,{children:e.jsx(A,{list:a.map(c=>c.name)})})]})}};const J=(n,t)=>{const{land:a}=t,o=$(n)[a.id]||[],d=H(n,a);return{deployments:o,rental:d}},Q=O(J)(F(z)),b=20;let U=class extends R.PureComponent{constructor(){super(...arguments);j(this,"state",{showOwner:!0,showOperator:!0,showLessor:!0,showTenant:!0,page:1,selectedLand:0});j(this,"handleNext",()=>{const{selectedLand:a}=this.state,l=this.getFilteredLands();a===l.length-1?this.setState({selectedLand:0}):this.setState({selectedLand:a+1})});j(this,"handlePrev",()=>{const{selectedLand:a}=this.state;if(a===0){const l=this.getFilteredLands();this.setState({selectedLand:l.length-1})}else this.setState({selectedLand:a-1})})}componentWillReceiveProps(a){a.lands!==this.props.lands&&this.setState({page:1})}renderLand(){const{view:a,onSetView:l}=this.props,{page:o,showOwner:d,showOperator:p,showTenant:c,showLessor:u,selectedLand:N}=this.state,i=this.getFilteredLands(),P=Math.ceil(i.length/b);let w,L;if(i.length>1&&N<i.length){const{x:m,y:x}=T(i[N]);w=m,L=x}else if(i.length===1){const{x:m,y:x}=T(i[0]);w=m,L=x}return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{height:30,children:[e.jsx(s.Column,{children:e.jsxs(s.Row,{children:[e.jsx(s.Header,{sub:!0,children:r("land_page.results",{count:i.length.toLocaleString()})}),a===h.ATLAS&&i.length>1?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"arrow prev",onClick:this.handlePrev}),e.jsx("div",{className:"arrow next",onClick:this.handleNext})]}):null]})}),e.jsx(s.Column,{align:"right",children:e.jsxs(s.Row,{children:[e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{value:"owner",checked:d,onClick:()=>this.setState({showOwner:!d}),label:r(`roles.${g.OWNER}`)}),content:r("land_page.owner_explanation")}),e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{className:"operator-checkbox",value:"operator",checked:p,onClick:()=>this.setState({showOperator:!p}),label:r(`roles.${g.OPERATOR}`)}),className:"radio-popup",content:e.jsx("div",{children:r("land_page.operator_explanation")})}),e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{className:"tenant-checkbox",value:"tentant",checked:c,onClick:()=>this.setState({showTenant:!c}),label:r(`roles.${g.TENANT}`)}),className:"radio-popup",content:e.jsx("div",{children:r("land_page.tenant_explanation")})}),e.jsx(C,{className:"grid",icon:"table",isActive:a===h.GRID,onClick:()=>l(h.GRID)}),e.jsx(C,{className:"atlas",icon:"pin",isActive:a===h.ATLAS,onClick:()=>l(h.ATLAS)})]})})]})})}),a===h.GRID?e.jsxs(s.Container,{children:[e.jsx(s.Section,{className:"table-section",children:i.length>0?e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"4",children:r("global.name")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("global.role")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("land_page.operated_by")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("land_page.online_scenes")})]})}),e.jsx(s.Table.Body,{children:i.slice((o-1)*b,o*b).map((m,x)=>e.jsx(Q,{land:m},x))})]}):null}),P>1?e.jsx(s.Section,{className:"pagination-section",children:e.jsx(s.Pagination,{firstItem:null,lastItem:null,activePage:o,onPageChange:(m,x)=>this.setState({page:+x.activePage}),totalPages:P})}):null]}):e.jsx("div",{className:"atlas-wrapper",children:e.jsx(y,{className:"main",x:w,y:L,showOperator:p,showOwner:d,showTenant:c,showLessor:u,hasPopup:!0})})]})}getFilteredLands(){const{lands:a}=this.props,{showOwner:l,showOperator:o,showLessor:d,showTenant:p}=this.state;return a.filter(u=>!!(l&&u.roles.includes(g.OWNER)||o&&u.roles.includes(g.OPERATOR)||p&&u.roles.includes(g.TENANT)||d&&u.roles.includes(g.LESSOR)))}render(){const{isLoading:a,view:l}=this.props;return e.jsx(M,{className:`LandPage ${l}-view`,activeTab:W.LAND,isLoading:a,isPageFullscreen:!0,isFooterFullscreen:l===h.ATLAS,isNavigationFullscreen:l===h.ATLAS,children:this.renderLand()})}};const K=n=>({lands:V(n),view:Z(n),isLoading:B(n)}),ee=n=>({onSetView:t=>n(G(t))}),he=O(K,ee)(U);export{he as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var x=Object.defineProperty;var j=(i,n,t)=>n in i?x(i,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[n]=t;var d=(i,n,t)=>j(i,typeof n!="symbol"?n+"":n,t);import{J as C,c6 as h,N as e,S as s,M as r,ei as b,cM as v,cN as y,b6 as u,bQ as S,co as A,T,ej as _,ek as N,el as z}from"./index-
|
|
1
|
+
var x=Object.defineProperty;var j=(i,n,t)=>n in i?x(i,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[n]=t;var d=(i,n,t)=>j(i,typeof n!="symbol"?n+"":n,t);import{J as C,c6 as h,N as e,S as s,M as r,ei as b,cM as v,cN as y,b6 as u,bQ as S,co as A,T,ej as _,ek as N,el as z}from"./index-BHRIVcTs.js";import{L as P}from"./LoggedInDetailPage.container-DWMoMSsT.js";import{S as f}from"./SignInRequired-B_3SXeXM.js";import"./Navigation.container-9A40G-C8.js";import"./selectors-RKMIkjNm.js";let L=class extends C.PureComponent{constructor(){super(...arguments);d(this,"timeoutId",null);d(this,"state",{hasCopiedText:!1,type:h.PARCEL,managerAddress:""});d(this,"handleOnCopy",()=>{this.timeoutId&&clearTimeout(this.timeoutId),this.setState({hasCopiedText:!0}),this.timeoutId=setTimeout(()=>{this.timeoutId=null,this.setState({hasCopiedText:!1})},1200)});d(this,"handleAddressChange",(t,a)=>{this.setState({managerAddress:a.value})});d(this,"handleTypeChange",(t,a)=>{this.setState({type:a.value})});d(this,"handleAddAuthorization",()=>{const{onSetUpdateManager:t}=this.props,{managerAddress:a,type:c}=this.state;t(a,c,!0)})}renderPage(){const{authorizations:t,wallet:a,onSetUpdateManager:c}=this.props,{hasCopiedText:g,managerAddress:o,type:m}=this.state,p=A(o);return e.jsx(s.Grid,{children:a===null?e.jsx(s.Loader,{size:"big",active:!0}):e.jsxs(e.Fragment,{children:[e.jsxs(s.Grid.Row,{children:[e.jsx(s.Grid.Column,{computer:4,mobile:16,children:e.jsx("div",{className:"left-column secondary-text",children:r("global.address")})}),e.jsxs(s.Grid.Column,{computer:12,mobile:16,children:[e.jsx("div",{className:"blockie-container",children:e.jsx(s.Blockie,{seed:a.address,scale:12})}),e.jsxs("div",{className:"address-container",children:[e.jsx("div",{className:"address",children:b()?v(a.address):a.address}),e.jsx(y,{role:"button",text:a.address,onCopy:this.handleOnCopy,children:g?e.jsx("span",{children:r("settings_page.copied")}):e.jsx("span",{className:"link",children:r("settings_page.copy_address")})})]})]})]}),e.jsxs(s.Grid.Row,{children:[e.jsx(s.Grid.Column,{computer:4,mobile:16,children:e.jsx("div",{className:"left-column secondary-text",children:r("settings_page.authorizations")})}),e.jsxs(s.Grid.Column,{computer:12,mobile:16,children:[e.jsx(s.Section,{className:"authoziations-disclaimer",children:r("settings_page.disclaimer",{emphasis:e.jsx("strong",{children:r("settings_page.emphasis")})})}),e.jsxs(s.Row,{className:"authorization-action",children:[e.jsx(u,{id:"settings_page.authorization_action",values:{address:e.jsx(s.Field,{value:o,onChange:this.handleAddressChange,placeholder:"0x...",error:o.length>0&&!p}),type:e.jsx(s.Dropdown,{options:[{text:"Parcels",value:h.PARCEL},{text:"Estates",value:h.ESTATE}],value:m,onChange:this.handleTypeChange})}}),e.jsx(s.Button,{size:"small",primary:!0,disabled:o.length===0||!p,onClick:this.handleAddAuthorization,children:r("global.submit")})]}),t.length>0?e.jsxs(s.Section,{children:[e.jsx(s.Header,{sub:!0,children:r("settings_page.authorizations_title")}),t.map(l=>e.jsxs(s.Row,{className:"authorization",children:[e.jsx(u,{id:"settings_page.authorization",values:{address:e.jsx(S,{address:l.address}),type:e.jsxs("span",{children:[" ",e.jsx("strong",{children:r(`global.${l.type}_plural`)})," "]})}}),e.jsx(s.Button,{basic:!0,onClick:()=>c(l.address,l.type,!1),children:r("global.revoke")})]}))]}):null]})]})]})})}renderLogin(){return e.jsx(f,{})}renderLoading(){return e.jsx("div",{className:"center",children:e.jsx(s.Loader,{active:!0,size:"huge"})})}render(){return e.jsx(P,{className:"SettingsPage",children:this.renderPage()})}};const R=i=>({wallet:_(i),authorizations:N(i)}),E=i=>({onSetUpdateManager:(n,t,a)=>i(z(n,t,a))}),B=T(R,E)(L);export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g}from"./index-
|
|
1
|
+
import{a as g}from"./index-CJppakqi.js";import"./index-BHRIVcTs.js";var m=Object.defineProperty,v=Object.defineProperties,y=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,d=(e,r,t)=>r in e?m(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,h=(e,r)=>{for(var t in r||(r={}))w.call(r,t)&&d(e,t,r[t]);if(c)for(var t of c(r))f.call(r,t)&&d(e,t,r[t]);return e},_=(e,r)=>v(e,y(r)),u=(e,r,t)=>new Promise((n,s)=>{var l=i=>{try{o(t.next(i))}catch(p){s(p)}},a=i=>{try{o(t.throw(i))}catch(p){s(p)}},o=i=>i.done?n(i.value):Promise.resolve(i.value).then(l,a);o((t=t.apply(e,r)).next())}),b=(e=>(e.Start="magic_oauth_login_with_redirect_start",e.Verify="magic_oauth_login_with_redirect_verify",e.Popup="magic_oauth_login_with_popup",e.VerifyTelegramData="magic_oauth_verify_telegram_data",e))(b||{}),R=(e=>(e.InvalidRequest="invalid_request",e.InvalidClient="invalid_client",e.InvalidScope="invalid_scope",e.InvalidGrant="invalid_grant",e.UnauthorizedClient="unauthorized_client",e.UnsupportedResponseType="unsupported_response_type",e.UnsupportedGrantType="unsupported_grant_type",e.UnsupportedTokenType="unsupported_token_type",e.AccessDenied="access_denied",e.ServerError="server_error",e.TemporarilyUnavailable="temporarily_unavailable",e))(R||{}),I=class extends g.Internal{constructor(){super(),this.name="oauth2",this.config={},this.compat={"magic-sdk":">=2.4.6","@magic-sdk/react-native":!1,"@magic-sdk/react-native-bare":!1,"@magic-sdk/react-native-expo":!1},this.seamlessTelegramLogin()}loginWithRedirect(e){return this.utils.createPromiEvent((r,t)=>u(this,null,function*(){var n;let s=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_redirect_start",[_(h({},e),{apiKey:this.sdk.apiKey,platform:"web"})]),l=yield this.request(s),a=l,o=l;if(o.error&&t(this.createError(o.error,(n=o.error_description)!=null?n:"An error occurred.",{errorURI:o.error_uri,provider:o.provider})),a!=null&&a.oauthAuthoriationURI){let i=a.useMagicServerCallback?new URL(a.oauthAuthoriationURI,this.sdk.endpoint).href:a.oauthAuthoriationURI;a!=null&&a.shouldReturnURI?r(i):window.location.href=i}r(null)}))}getRedirectResult(e,r){let t=r||window.location.search,n=window.location.origin+window.location.pathname;return window.history.replaceState(null,"",n),P.call(this,t,e)}loginWithPopup(e){let r=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_popup",[_(h({},e),{apiKey:this.sdk.apiKey,platform:"web"})]);return this.request(r)}seamlessTelegramLogin(){try{if(!window.location.hash.toString().includes("#tgWebAppData"))return;let e=document.createElement("script");e.src="https://telegram.org/js/telegram-web-app.js",document.head.prepend(e),e.onload=()=>u(this,null,function*(){var r;try{let t=(r=window.Telegram)==null?void 0:r.WebApp.initData,n=this.utils.createJsonRpcRequestPayload("magic_oauth_verify_telegram_data",[{userData:t,isMiniApp:!0}]);yield this.request(n)}catch(t){console.log("Error while verifying telegram data",t)}})}catch(e){console.log("Error while loading telegram-web-app script",e)}}};function P(e,r){return this.utils.createPromiEvent((t,n)=>u(this,null,function*(){var s;let l=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_redirect_verify",[{authorizationResponseParams:e,magicApiKey:this.sdk.apiKey,platform:"web",lifespan:r}]),a=yield this.request(l),o=a,i=a;i.error&&n(this.createError(i.error,(s=i.error_description)!=null?s:"An error occurred.",{errorURI:i.error_uri,provider:i.provider})),t(o)}))}export{R as OAuthErrorCode,I as OAuthExtension,b as OAuthPayloadMethods};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var B=Object.defineProperty;var D=(e,t,n)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>D(e,typeof t!="symbol"?t+"":t,n);import{a4 as f,J as d,aF as $,aG as m,aH as v,M as _,N as s,S as o,P as g,O as U,T,ay as j,aI as O,aJ as V,aK as w,aL as y,a2 as k,aM as M,aj as A,aN as G,aO as J,aP as X,aQ as z}from"./index-BHRIVcTs.js";import{S as H}from"./SignInRequired-B_3SXeXM.js";const K="_container_1abv2_1",q="_nameContainer_1abv2_8",F="_editNameBtn_1abv2_20",Y="_actions_1abv2_30",Q="_downloadBtn_1abv2_36",W="_button_1abv2_13",b={container:K,nameContainer:q,editNameBtn:F,actions:Y,downloadBtn:Q,button:W},Z=m.get("EXPLORER_URL",""),ee=m.get("BUILDER_SERVER_URL",""),se=m.get("PEER_TESTING_URL","");function te({currentProject:e,metrics:t,limits:n,areEntitiesOutOfBoundaries:r,isUploading:c,onOpenModal:l}){const I=f(),E=d.useCallback(()=>{l("ExportModal",{project:e})},[e,l]),u=d.useCallback(()=>{l("EditProjectModal")},[l]),a=d.useCallback(()=>{l("DeployModal",{view:$.NONE,projectId:e.id})},[l,e]),h=d.useMemo(()=>{if(!e)return"";const i=new URL(Z);return i.searchParams.set("skipSetup","true"),i.searchParams.set("realm",`${ee}/projects/${e.id}`),i.searchParams.set("DEBUG_MODE","true"),m.is(v.Env.DEVELOPMENT)?(i.searchParams.set("NETWORK","sepolia"),i.searchParams.set("DEBUG_SCENE_LOG","")):i.searchParams.set("CATALYST",se),i.toString()},[]),N=d.useMemo(()=>Object.keys(t).some(i=>t[i]>n[i]),[t]),x=d.useMemo(()=>c||r,[t,n,r,c]),C=d.useMemo(()=>c||!x,[c,x]),L=d.useCallback(()=>r?_("topbar.bounds_exceeded",{br:s.jsx("br",{})}):N?_("topbar.limits_exceeded"):null,[r,N]),S=d.useCallback(()=>{I.goBack()},[I]);return s.jsxs("div",{className:b.container,children:[s.jsxs("div",{className:b.nameContainer,children:[s.jsx(o.Button,{basic:!0,"aria-label":_("inspector.top_bar.back"),onClick:S,children:s.jsx(o.Icon,{name:"chevron left"})}),e&&s.jsxs(o.Button,{basic:!0,onClick:u,disabled:c,className:b.editNameBtn,children:[e.title,s.jsx(g,{name:"layout",className:"edit-project-icon"})]}),c&&s.jsx(g,{name:"cloud-upload",className:"cloud-upload-indicator is-uploading"})]}),s.jsxs("div",{className:b.actions,children:[e?s.jsx(U,{projectId:e.id}):null,s.jsx(o.Popup,{content:_("inspector.top_bar.download"),trigger:s.jsx(o.Button,{secondary:!0,"aria-label":_("inspector.top_bar.download"),size:"small",className:b.downloadBtn,disabled:c,onClick:E,children:s.jsx(o.Icon,{name:"download"})})}),s.jsxs(o.Button,{as:"a",href:h,target:"_blank",secondary:!0,size:"small",disabled:c,children:[s.jsx(o.Icon,{name:"eye"}),_("inspector.top_bar.preview")]}),s.jsx(o.Popup,{content:L(),position:"bottom center",disabled:C,trigger:s.jsx("span",{children:s.jsxs(o.Button,{primary:!0,size:"small",disabled:x,onClick:a,children:[s.jsx(o.Icon,{name:"globe"}),_("inspector.top_bar.publish")]})}),on:"hover"})]})]})}const ne=e=>({currentProject:j(e),metrics:O(e),limits:V(e),areEntitiesOutOfBoundaries:w(e)>0,isUploading:y(e)}),ae=e=>({onOpenModal:(t,n)=>e(k(t,n))}),oe=T(ne,ae)(te);var p={VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.21.3-19896835659.commit-bb1d19a"};const re=e=>e.replace(/\/$/,""),P=re(p.VITE_BASE_URL);let ce=class extends d.PureComponent{constructor(){super(...arguments);R(this,"state",{isLoaded:!1});R(this,"refIframe",n=>{const{onConnect:r}=this.props;n&&(n.onload=()=>{this.setState({isLoaded:!0})},r(n.id))})}componentDidMount(){const{onOpen:n}=this.props;n()}render(){const{scene:n,project:r,isLoggedIn:c,isReloading:l,address:I=""}=this.props;if(!c)return s.jsx(H,{});let E=`${P}/inspector-index.html`,u=`${P}/bin/index.js`;p.VITE_INSPECTOR_PORT&&(E=`http://localhost:${p.VITE_INSPECTOR_PORT}`,u=`${E}/bin/index.js`);let a=`?dataLayerRpcParentUrl=${window.location.origin}`;if(p.VITE_BIN_INDEX_JS_DEV_PORT&&p.VITE_BIN_INDEX_JS_DEV_PATH){const h=btoa(p.VITE_BIN_INDEX_JS_DEV_PATH);u=`http://localhost:${p.VITE_BIN_INDEX_JS_DEV_PORT}/content/contents/b64-${h}`}return a=a.concat(`&binIndexJsUrl=${u}`),a=a.concat(`&contentUrl=${m.get("INSPECTOR_CONTENT_URL")}`),a=a.concat(`&segmentKey=${m.get("INSPECTOR_SEGMENT_API_KEY")}`),a=a.concat(`&segmentAppId=${m.get("INSPECTOR_SEGMENT_APP_ID")}`),a=a.concat(`&segmentUserId=${I}`),r!=null&&r.id&&(a=a.concat(`&projectId=${r.id}`)),s.jsxs("div",{className:"InspectorPage",children:[(!this.state.isLoaded||l)&&s.jsx(o.Loader,{active:!0}),n&&!l&&s.jsxs(s.Fragment,{children:[s.jsx(oe,{}),s.jsx("iframe",{ref:this.refIframe,title:"inspector",id:"inspector",src:`${E}${a}`})]})]})}};const ie=e=>({address:M(e),isLoggedIn:A(e),scene:G(e),project:j(e),isReloading:J(e)}),de=e=>({onOpen:()=>e(X()),onConnect:t=>e(z(t))}),Ee=T(ie,de)(ce);export{Ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a4 as A,J as t,aG as S,R as B,N as e,M as l,S as n,P as v,a7 as f,cL as L,cM as T,cK as M,Q as P,cN as R,aa as w,ab as p,cX as O,bq as V,cT as D,cO as U,cS as $,cY as q,cZ as G,a2 as H,c_ as K}from"./index-
|
|
1
|
+
import{a4 as A,J as t,aG as S,R as B,N as e,M as l,S as n,P as v,a7 as f,cL as L,cM as T,cK as M,Q as P,cN as R,aa as w,ab as p,cX as O,bq as V,cT as D,cO as U,cS as $,cY as q,cZ as G,a2 as H,c_ as K}from"./index-BHRIVcTs.js";import{b as Q}from"./hooks-aEto244t.js";import{L as J}from"./LoggedInDetailPage.container-DWMoMSsT.js";import{N as W}from"./Navigation.container-9A40G-C8.js";import"./SignInRequired-B_3SXeXM.js";import"./selectors-RKMIkjNm.js";const X="_main_7p9v2_1",Y="_fields_7p9v2_9",Z="_ensImage_7p9v2_16",z="_field_7p9v2_9",ee="_fieldContainer_7p9v2_29",ae="_fieldTitle_7p9v2_41",se="_subdomain_7p9v2_50",le="_actionBtn_7p9v2_64",ne="_editableFieldValue_7p9v2_84",ie="_avatar_7p9v2_90",te="_avatarImg_7p9v2_97",de="_avatarName_7p9v2_104",ce="_ensBtn_7p9v2_109",oe="_address_7p9v2_116",re="_returnLink_7p9v2_122",me="_editableField_7p9v2_84",_e="_emptyFieldPlaceholder_7p9v2_138",pe="_pin_7p9v2_144",ue="_externalLink_7p9v2_154",he="_unclaimedBadge_7p9v2_159",xe="_disabled_7p9v2_170",s={main:X,fields:Y,ensImage:Z,field:z,fieldContainer:ee,fieldTitle:ae,subdomain:se,actionBtn:le,editableFieldValue:ne,avatar:ie,avatarImg:te,avatarName:de,ensBtn:ce,address:oe,returnLink:re,editableField:me,emptyFieldPlaceholder:_e,pin:pe,externalLink:ue,unclaimedBadge:he,disabled:xe};function Ne(r){const{ens:a,isLoading:j,alias:u,avatar:m,name:_,wallet:h,onOpenModal:c,onFetchENS:x}=r,d=A(),g=t.useMemo(()=>a?`${S.get("MARKETPLACE_API")}/ens/generate?ens=${a.name}&width=330&height=330`:"",[a]),o=(a==null?void 0:a.ensOwnerAddress)!==(a==null?void 0:a.nftOwnerAddress);t.useEffect(()=>{_&&h&&x(_)},[_,h,x]);const b=t.useCallback(()=>{c("EnsMapAddressModal",{ens:a})},[c,a]),F=t.useCallback(()=>{c("UseAsAliasModal",{newName:a==null?void 0:a.name})},[c,a==null?void 0:a.name]),N=t.useCallback(()=>{d.push(B.ensSelectLand(a==null?void 0:a.subdomain))},[d,a==null?void 0:a.subdomain]),C=t.useCallback(()=>{c("ReclaimNameModal",{ens:a})},[c]),k=t.useMemo(()=>{var I;let i;return u!==(a==null?void 0:a.name)?i=e.jsxs("div",{className:s.editableField,children:[e.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.unassign")}),e.jsx(n.Button,{compact:!0,primary:!0,onClick:F,className:s.actionBtn,"aria-label":l("ens_detail_page.set_as_primary"),children:e.jsx(n.Icon,{name:"user plus"})})]}):i=e.jsx("div",{className:s.editableField,children:e.jsxs("span",{className:s.avatar,"data-testid":"alias-avatar",children:[m?e.jsx("img",{className:s.avatarImg,src:((I=m.avatar.snapshots)==null?void 0:I.face256)||"",alt:m.realName}):e.jsx(v,{name:"profile"}),e.jsx("span",{className:s.avatarName,children:a.name}),l("ens_list_page.table.you")]})}),e.jsxs("div",{className:s.field,children:[e.jsxs("span",{className:s.fieldTitle,children:[l("ens_detail_page.alias"),e.jsx(n.InfoTooltip,{on:"click",content:l("ens_detail_page.tooltips.alias")})]}),i]})},[a==null?void 0:a.name,o,m,u,F]),E=t.useMemo(()=>{let i=null;return o?i=e.jsxs("div",{className:f(s.editableField,s.disabled),children:[e.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.reclaim_for_address")}),e.jsx(n.Button,{compact:!0,secondary:!0,disabled:!0,className:s.actionBtn,"aria-label":l("ens_detail_page.reclaim_for_address"),children:e.jsx(n.Icon,{name:"pencil alternate"})})]}):a!=null&&a.ensAddressRecord?i=e.jsxs("span",{className:s.editableField,children:[e.jsxs("span",{className:s.editableFieldValue,children:[e.jsx("img",{src:L,alt:"Ethereum"}),T(a.ensAddressRecord)]}),e.jsx(n.Button,{compact:!0,secondary:!0,inverted:!0,onClick:b,className:s.actionBtn,"aria-label":l("ens_detail_page.edit_address"),children:e.jsx(n.Icon,{name:"pencil alternate"})})]}):i=e.jsxs("div",{className:s.editableField,children:[e.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.assign_address")}),e.jsx(n.Button,{compact:!0,secondary:!0,onClick:b,className:s.actionBtn,"aria-label":l("ens_detail_page.assign_address"),children:e.jsx(n.Icon,{name:"pencil alternate"})})]}),e.jsxs("div",{className:f(s.field,{[s.disabled]:o}),children:[e.jsxs("span",{className:s.fieldTitle,children:[l("ens_detail_page.address"),e.jsx(n.InfoTooltip,{on:"click",content:l("ens_detail_page.tooltips.address")})]}),i]})},[a==null?void 0:a.ensAddressRecord,o,b]),y=t.useMemo(()=>{let i=null;return o?i=e.jsxs("div",{className:s.editableField,children:[e.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.reclaim_for_location")}),e.jsx(n.Button,{compact:!0,disabled:!0,className:s.actionBtn,"aria-label":l("ens_detail_page.reclaim_for_location"),children:e.jsx(n.Icon,{name:"crosshairs"})})]}):a!=null&&a.landId?M(a.landId)?i=e.jsxs("div",{className:s.editableField,"data-testid":"land-field",children:[e.jsxs("span",{className:s.editableFieldValue,children:[e.jsx("div",{className:s.pin,children:e.jsx(v,{name:"pin"})}),a==null?void 0:a.landId]}),e.jsx(n.Button,{compact:!0,onClick:N,className:s.actionBtn,"aria-label":l("ens_list_page.button.assign_to_land"),children:e.jsx(n.Icon,{name:"pencil alternate"})})]}):i=e.jsxs("div",{className:s.editableField,"data-testid":"estate-field",children:[e.jsxs("span",{className:s.editableFieldValue,children:[e.jsx("div",{className:s.pin,children:e.jsx(v,{name:"pin"})}),`Estate (${a.landId})`]}),e.jsx(n.Button,{compact:!0,className:s.actionBtn,onClick:N,"aria-label":l("ens_list_page.button.assign_to_land"),children:e.jsx(n.Icon,{name:"pencil alternate"})})]}):i=e.jsxs("div",{className:s.editableField,children:[e.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.point_location")}),e.jsx(n.Button,{compact:!0,className:s.actionBtn,onClick:N,"aria-label":l("ens_list_page.button.assign_to_land"),children:e.jsx(n.Icon,{name:"crosshairs"})})]}),e.jsxs("div",{className:f(s.field,{[s.disabled]:o}),children:[e.jsxs("span",{className:s.fieldTitle,children:[l("ens_detail_page.land"),e.jsx(n.InfoTooltip,{on:"click",content:l("ens_detail_page.tooltips.land")})]}),i]})},[a==null?void 0:a.landId,o,N]);return e.jsxs(J,{activeTab:W.NAMES,isPageFullscreen:!0,isLoading:j||!a,children:[e.jsx(P,{to:B.ens(),children:e.jsxs(n.Button,{basic:!0,className:s.returnLink,children:[e.jsx(n.Icon,{name:"chevron left"}),"Return"]})}),e.jsxs("div",{className:s.main,children:[e.jsx("img",{alt:a==null?void 0:a.subdomain,src:g,className:s.ensImage}),e.jsxs("div",{className:s.fields,children:[e.jsxs("div",{className:s.fieldContainer,children:[e.jsxs("div",{children:[e.jsx("span",{className:s.fieldTitle,children:l("ens_detail_page.name")}),e.jsxs("span",{className:s.subdomain,children:[e.jsxs("span",{children:[e.jsx("span",{children:a==null?void 0:a.name}),".dcl.eth"]}),e.jsx(R,{role:"button",text:(a==null?void 0:a.subdomain)||"",showPopup:!0,className:"copy-to-clipboard",children:e.jsx(n.Icon,{"aria-label":"copy name","aria-hidden":"false",name:"clone outline"})}),(a==null?void 0:a.ensOwnerAddress)!==(a==null?void 0:a.nftOwnerAddress)?e.jsx("span",{className:s.unclaimedBadge,children:l("ens_detail_page.unclaimed")}):null]})]}),e.jsx(n.Button,{primary:!0,onClick:C,children:l("ens_detail_page.reclaim_name")})]}),e.jsxs("div",{className:s.fieldContainer,children:[k,E,y]})]})]})]})}function Ie(){const r=w(),a=Q(),j=p(d=>a?O(d,`${a}.dcl.eth`):null),u=p(d=>V(D(d),K)),m=p(U),_=p($),h=p(q),c=t.useCallback(d=>r(G(d)),[r]),x=t.useCallback((d,g)=>r(H(d,g)),[r]);return e.jsx(Ne,{name:a,ens:j,isLoading:u,alias:m,avatar:_,wallet:h,onFetchENS:c,onOpenModal:x})}export{Ie as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var h=Object.defineProperty;var m=(a,s,e)=>s in a?h(a,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[s]=e;var r=(a,s,e)=>m(a,typeof s!="symbol"?s+"":s,e);import{J as p,N as t,M as d,b6 as g,S as o,Q as u,R as x,cq as E,bW as N,aR as b,T as j,cs as L}from"./index-
|
|
1
|
+
var h=Object.defineProperty;var m=(a,s,e)=>s in a?h(a,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[s]=e;var r=(a,s,e)=>m(a,typeof s!="symbol"?s+"":s,e);import{J as p,N as t,M as d,b6 as g,S as o,Q as u,R as x,cq as E,bW as N,aR as b,T as j,cs as L}from"./index-BHRIVcTs.js";import{L as f}from"./LandAction-ClUpTbS0.js";import{L as v}from"./LandProviderPage-Cle8Kso_.js";import"./Back-Bt1TpmNC.js";import"./NotFound-BGRBV5Uq.js";import"./hooks-aEto244t.js";let D=class extends p.PureComponent{constructor(){super(...arguments);r(this,"state",{});r(this,"handleNameChange",(e,n)=>{this.setState({name:n.value})});r(this,"handleDescriptionChange",(e,n)=>{this.setState({description:n.value})})}getName(e){return typeof this.state.name>"u"?e.name:this.state.name}getDescription(e){return typeof this.state.description>"u"?e.description||"":this.state.description}render(){const{onEdit:e}=this.props,{name:n,description:c}=this.state,l=!n&&!c;return t.jsx(v,{className:"LandEditPage",children:i=>t.jsx(f,{land:i,title:d("edit_page.title"),subtitle:t.jsx(g,{id:"edit_page.subtitle",values:{name:t.jsx("strong",{children:i.name})}}),children:t.jsxs(o.Form,{onSubmit:()=>e(i,this.getName(i),this.getDescription(i)),children:[t.jsx(o.Field,{label:"Name",value:this.getName(i),onChange:this.handleNameChange}),t.jsx(o.Field,{label:"Description",value:this.getDescription(i),onChange:this.handleDescriptionChange}),t.jsxs(o.Row,{children:[t.jsx(u,{className:"cancel",to:x.landDetail(i.id),children:t.jsx(o.Button,{children:d("global.cancel")})}),t.jsx(E,{type:"submit",primary:!0,disabled:l||!this.getName(i)||i.role!==N.OWNER,network:b.Network.ETHEREUM,children:d("global.submit")})]})]})})})}};const P=a=>({onEdit:(s,e,n)=>a(L(s,e,n))}),F=j(null,P)(D);export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as n,ar as s,as as r,at as i,au as m,av as g,aw as t,aj as d,ax as c,ay as u,az as S,a2 as I,aA as P,aB as l,aC as y,aD as C,aE as E}from"./index-
|
|
1
|
+
import{T as n,ar as s,as as r,at as i,au as m,av as g,aw as t,aj as d,ax as c,ay as u,az as S,a2 as I,aA as P,aB as l,aC as y,aD as C,aE as E}from"./index-BHRIVcTs.js";const O=a=>({isPreviewing:r(a),isSidebarOpen:i(a),isReady:m(a),isLoading:g(a),isFetching:t(a),isLoggedIn:d(a),isScreenshotReady:c(a),currentProject:u(a),numItems:S(a)}),R=a=>({onOpenModal:(e,o)=>a(I(e,o)),onCloseEditor:()=>a(P()),onZoomIn:()=>a(l()),onZoomOut:()=>a(y()),onResetCamera:()=>a(C()),onTakeScreenshot:()=>a(E())}),L=n(O,R)(s);export{L as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._dropdown_1a07a_1{border:1px solid var(--gray);border-radius:0 5px 5px 0;border-left:0}._ellipsis_1a07a_9{margin:auto!important}._dropdown_1a07a_1 ._menu_1a07a_13>._disabled_1a07a_13._item_1a07a_13{pointer-events:all}._dropdown_1a07a_1 ._menu_1a07a_13>._disabled_1a07a_13._item_1a07a_13 a{cursor:default}._itemImage_10lcv_1{min-width:48px;max-width:48px;height:48px;padding:5px;margin-right:24px}._itemStatus_10lcv_9{margin-right:4px}._mana_10lcv_13{font-size:15px!important;font-weight:400;line-height:0}._grid_10lcv_19{padding:10px 0!important;color:var(--text);border-bottom:1px solid var(--divider)}._grid_10lcv_19:hover{background-color:#24212966;color:var(--text)}._row_10lcv_30{align-items:center;font-size:15px}._avatarColumn_10lcv_35{align-items:center;flex-direction:inherit!important}._avatarContainer_10lcv_40{display:flex}._info_10lcv_44{width:calc(100% - 80px);display:flex}._nameWrapper_10lcv_49{display:flex;align-items:center}._badgeContainer_10lcv_54{margin-left:8px}._badge_10lcv_54{background-color:#37333d}._badge_10lcv_54:before{filter:none}._name_10lcv_49{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;text-decoration:underline}._linkAction_10lcv_76{text-transform:uppercase}._subtitle_10lcv_80{margin-top:2px;color:var(--secondary-text);text-transform:uppercase}._itemActions_10lcv_86{display:flex;align-items:center;justify-content:flex-end;width:100%}._removeSaleButton_10lcv_93.ui.button.secondary{background:#fff;color:#000}._status_10lcv_98{padding:4px 10px 4px 8px;border-radius:32px;align-items:center;width:fit-content;text-transform:uppercase;font-weight:700;font-size:12px}._status_10lcv_98 i{margin-right:5px}._ready_10lcv_112{color:#63b4f6;background:#2196f333}._notReady_10lcv_117{background:#fb3b3b33;color:#e97177}._incomplete_10lcv_122{color:var(--primary)}._published_10lcv_126{color:#65d890;background:#34ce7733}._underReview_10lcv_131,._unsynced_10lcv_132{color:#fe9c2a;background:#fe9c2a33}._alertIcon_10lcv_137{display:inline-block;margin-right:.25rem;height:15px;width:15px;vertical-align:text-bottom;background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M-1-1h16v16H-1z'/%3e%3cpath%20fill='%23FFF'%20d='M7%2013.667A6.667%206.667%200%201%201%207%20.333a6.667%206.667%200%200%201%200%2013.334zM7%2012.5a5.5%205.5%200%201%200%200-11%205.5%205.5%200%200%200%200%2011zm0-8.833c.368%200%20.667.298.667.666V7a.667.667%200%200%201-1.334%200V4.333c0-.368.299-.666.667-.666zM7%209a.667.667%200%201%201%200%201.333A.667.667%200%200%201%207%209z'/%3e%3c/g%3e%3c/svg%3e") no-repeat;background-size:contain;filter:invert(64%) sepia(34%) saturate(797%) hue-rotate(331deg) brightness(140%) contrast(98%)}._check_10lcv_148{margin-left:2px}._contextMenuButton_10lcv_152{width:18px!important;background-color:transparent!important;box-shadow:none!important}._contextMenu_10lcv_152{background-color:var(--smart-grey)!important}.CollectionDetailPage>.ui.container>.dcl.section{margin-bottom:48px}.CollectionDetailPage .header-column{flex:none;width:calc(100% - 300px)}.CollectionDetailPage .header-row{width:100%}.CollectionDetailPage .header-row .ui.header.name{line-height:29px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.CollectionDetailPage .edit-collection-name{display:none;margin-left:16px;margin-bottom:2px}.CollectionDetailPage .section:not(.is-published) .header-row:hover .edit-collection-name{display:inline-block}.CollectionDetailPage .ui.circular.label.badge-on-sale{margin-left:1em;padding:.5em .667em!important;color:var(--text);background-color:var(--primary);text-transform:uppercase}.CollectionDetailPage .section:not(.is-published) .header-row:hover{cursor:pointer}.CollectionDetailPage .ui.toggle.on-sale{text-transform:uppercase;margin-right:16px}.CollectionDetailPage .ui.toggle.on-sale>label{white-space:nowrap}.CollectionDetailPage .ui.toggle.checkbox input.hidden:focus+label,.CollectionDetailPage .ui.toggle.on-sale input.hidden+label{padding-left:40px;color:var(--secondary-text)!important}.CollectionDetailPage .dcl.row.actions>.ui.button.action-button{border:1px solid rgba(115,110,125,.4);border-radius:5px;padding:9px 20px;white-space:nowrap}.CollectionDetailPage .left.actions .ui.dropdown{margin-left:8px;border:1px solid rgba(115,110,125,.4);border-radius:5px}.CollectionDetailPage .actions .ui.button.basic.action-button>.text{color:var(--primary)}.CollectionDetailPage .actions .ui.button.compact{padding:10px}.CollectionDetailPage .actions .popup-button{margin-left:16px}.CollectionDetailPage .dcl.row.left.actions.grow.shrink{margin-left:12px}.CollectionDetailPage .actions-container{margin-left:auto}.CollectionDetailPage .Notice{margin-bottom:32px}.CollectionDetailPage .ui.grid.equal.width>.row>.column{padding-left:0}.CollectionDetailPage .dcl.narrow>.empty{padding:200px 0;width:100%;border-radius:8px;border:1px solid var(--divider);justify-content:center;color:var(--secondary-text);text-align:center;line-height:22px;font-size:15px}.CollectionDetailPage .sparkles{width:54px;height:56px;background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.21.3-19896835659.commit-bb1d19a/assets/sparkles-C-WJN0Gh.svg);background-repeat:no-repeat;margin:auto auto 20px}.CollectionDetailPage .CollectionItem:first-child .grid{border-top:1px solid var(--divider)}.CollectionDetailPage .narrow.dcl{width:100%;max-width:1200px}.CollectionDetailPage .CollectionStatus{width:16px;height:16px;margin-bottom:6px;margin-right:12px}.CollectionDetailPage .empty-collection-title{font-weight:500;font-size:17px;line-height:26px;color:#fff;padding-bottom:8px;display:inline-block}.CollectionDetailPage .ui.basic.button.empty-action-button{border:1px solid rgba(115,110,125,.4);border-radius:5px;padding:8px 58px;margin-top:32px;color:var(--primary)}.CollectionDetailPage .ui.basic.button.empty-action-button span{color:var(--primary);font-weight:600}.CollectionDetailPage .ui.container .dcl.back{position:absolute}.CollectionDetailPage .dcl.column.left.shrink.name-container{min-width:0}.CollectionDetailPage .Icon.wearable,.CollectionDetailPage .Icon.emote{margin-right:12px;filter:brightness(100)}.CollectionDetailPage .dcl.tab{display:inline-flex;align-items:center}.CollectionDetailPage .dcl.tab i.circle.icon{margin-left:5px;color:#ff3d61}.CollectionDetailPage .dcl.tabs.fullscreen .ui.container{border-bottom:1px solid rgba(115,110,125,.32)}.CollectionDetailPage.toast.move-item-to-another-collection{padding:0;margin-bottom:96px}.CollectionDetailPage.toast.move-item-to-another-collection>div{margin:16px}.CollectionDetailPage.toast.move-item-to-another-collection .title{color:var(--text);font-size:17px;font-weight:600;line-height:26px;margin-bottom:0}.CollectionDetailPage.toast.move-item-to-another-collection .body{display:flex;flex-direction:column;max-width:348px}.CollectionDetailPage.toast.move-item-to-another-collection .body .description{color:var(--text);font-size:15px;line-height:24px;letter-spacing:0px;margin-bottom:8px}.CollectionDetailPage.toast.move-item-to-another-collection .body .cta{font-size:13px;font-weight:600;line-height:18px;text-transform:uppercase}.CollectionDetailPage.toast.move-item-to-another-collection .toast-icon{margin-right:16px}.CollectionDetailPage.toast.move-item-to-another-collection .toast-icon .two-way-arrow-icon{background-image:url("data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='48'%20height='48'%20rx='24'%20fill='%23242129'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20.9395%2024.375C20.8612%2024.481%2020.7309%2024.5417%2020.5989%2024.5417C20.5023%2024.5417%2020.4041%2024.5086%2020.3145%2024.4459L14.2202%2020.1759C14.0799%2020.0776%2014%2019.9299%2014%2019.7707C14%2019.6115%2014.0817%2019.4638%2014.222%2019.3655L20.3188%2015.0959C20.4084%2015.0332%2020.5118%2015%2020.6084%2015C20.8181%2015%2021.0402%2015.1593%2021.0402%2015.4637V18.0513H32.7371C33.0518%2018.0513%2033.2776%2018.3291%2033.2776%2018.6437V20.8986C33.2776%2021.2132%2033.0518%2021.4752%2032.7371%2021.4752H21.0402V24.078C21.0402%2024.1917%2020.999%2024.2944%2020.9395%2024.375ZM27.6837%2024.0846L33.7783%2028.3545C33.9186%2028.4527%2034%2028.5996%2034%2028.7588C34%2028.918%2033.9201%2029.0647%2033.7798%2029.163L27.687%2033.4306C27.5983%2033.4928%2027.5037%2033.5221%2027.4081%2033.5226C27.1994%2033.5213%2027.0003%2033.3698%2027.0003%2033.0668V30.4791H15.2609C14.9462%2030.4791%2014.6995%2030.2013%2014.6995%2029.8867V27.6318C14.6995%2027.3172%2014.9462%2027.0552%2015.2609%2027.0552H27.0003V24.4523C27.0003%2024.1479%2027.2009%2023.9886%2027.4106%2023.9886C27.5073%2023.9886%2027.5941%2024.0218%2027.6837%2024.0846ZM27.4081%2033.5226C27.4071%2033.5226%2027.4061%2033.5226%2027.4052%2033.5226H27.4108C27.4099%2033.5226%2027.409%2033.5226%2027.4081%2033.5226Z'%20fill='white'/%3e%3c/svg%3e");height:48px;width:48px}.CollectionDetailPage .dcl.tabs .secondary-actions.tab{display:inline-flex;position:absolute;right:0;padding:19px 0}.CollectionDetailPage .dcl.narrow .secondary-actions{display:flex;justify-content:flex-end}.CollectionDetailPage .secondary-actions.tab .button.action-button,.CollectionDetailPage .dcl.narrow .secondary-actions .button.action-button{display:flex;align-items:center}.CollectionDetailPage .dcl.tabs .secondary-actions.tab .button.action-button:not(:last-child),.CollectionDetailPage .dcl.narrow .secondary-actions .button.action-button:not(:last-child){margin-right:24px}.CollectionDetailPage .dcl.tabs .secondary-actions.tab .button.basic.inverted{border:1px solid rgba(115,110,125,.4);border-radius:5px;box-shadow:none!important;padding:7px 20px}.CollectionDetailPage .dcl.tabs .secondary-actions.tab .button.action-button>.Icon,.CollectionDetailPage .dcl.narrow .secondary-actions .button.action-button>.Icon{margin-right:5px}.CollectionDetailPage .dcl.tabs .secondary-actions.tab .button.action-button.add-items,.CollectionDetailPage .dcl.narrow .secondary-actions .button.action-button.add-items{border:1px solid rgba(115,110,125,.4);padding:7px 20px}.CollectionDetailPage .dcl.tabs .secondary-actions.tab .button span,.CollectionDetailPage .dcl.narrow .secondary-actions .button span{color:var(--primary)}.CollectionDetailPage .badge-forum-unread-posts{margin-left:8px;color:var(--text);background-color:var(--primary)}.CollectionDetailPage .unsynced-collection.container{display:flex;padding:24px 30px;margin:24px 0;border-radius:8px;background-color:var(--dark-two);align-items:center;text-align:justify}.CollectionDetailPage .unsynced-collection.message{flex:1}.CollectionDetailPage .unsynced-collection.title{margin:0;font-size:15px;font-weight:600;line-height:24px}.CollectionDetailPage .unsynced-collection.text{font-size:15px;font-weight:400;line-height:24px}.CollectionDetailPage .unsynced-collection.alert-icon{margin-right:30px;height:36px;width:36px;background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='14'%20height='14'%20viewBox='0%200%2014%2014'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M-1-1h16v16H-1z'/%3e%3cpath%20fill='%23FFF'%20d='M7%2013.667A6.667%206.667%200%201%201%207%20.333a6.667%206.667%200%200%201%200%2013.334zM7%2012.5a5.5%205.5%200%201%200%200-11%205.5%205.5%200%200%200%200%2011zm0-8.833c.368%200%20.667.298.667.666V7a.667.667%200%200%201-1.334%200V4.333c0-.368.299-.666.667-.666zM7%209a.667.667%200%201%201%200%201.333A.667.667%200%200%201%207%209z'/%3e%3c/g%3e%3c/svg%3e") no-repeat;background-size:contain;filter:invert(64%) sepia(34%) saturate(797%) hue-rotate(331deg) brightness(160%) contrast(98%)}.CollectionDetailPage .unsynced-collection.action-button{padding:7px 12px}.CollectionDetailPage .unsynced-collection.action-button .badge-forum-unread-posts{background-color:var(--text-on-primary);color:var(--primary)}.CollectionDetailPage.toast.deleted-item{padding:0;width:480px}.CollectionDetailPage.toast.deleted-item .toast-info{align-items:center;margin:16px}.CollectionDetailPage.toast.deleted-item .title{font-size:17px;font-weight:600;line-height:26px;margin-bottom:0}.CollectionDetailPage.toast.deleted-item .body .description{font-size:15px;font-weight:400;line-height:24px}.CollectionDetailPage.toast.deleted-item .toast-icon .delete-icon{background:url("data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='48'%20height='48'%20rx='24'%20fill='%23242129'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M21.5693%2015.0303H17.2345C16.8856%2015.0303%2016.6029%2015.3131%2016.6029%2015.662V17.6462H31.5093V15.6619C31.5093%2015.3131%2031.2265%2015.0303%2030.8777%2015.0303H26.5428V14.2108C26.5428%2014.0944%2026.4485%2014%2026.3321%2014H21.7801C21.6636%2014%2021.5693%2014.0944%2021.5693%2014.2108V15.0303ZM28.7541%2034C29.2936%2034%2029.7372%2033.5746%2029.7598%2033.0355L30.4308%2018.8701H17.6812L18.3522%2033.0355C18.3748%2033.5746%2018.8184%2034%2019.3579%2034H28.7541ZM21.5216%2021.9797C21.7474%2021.9797%2021.9305%2022.1628%2021.9305%2022.3885V30.4815C21.9305%2030.7074%2021.7473%2030.8903%2021.5216%2030.8903H20.8677C20.6419%2030.8903%2020.4589%2030.7073%2020.4589%2030.4815V22.3885C20.4589%2022.1628%2020.6421%2021.9797%2020.8677%2021.9797H21.5216ZM24.3829%2021.9797C24.6087%2021.9797%2024.7917%2022.1628%2024.7917%2022.3885V30.4815C24.7917%2030.7074%2024.6087%2030.8903%2024.3829%2030.8903H23.7291C23.5033%2030.8903%2023.3203%2030.7073%2023.3203%2030.4815V22.3885C23.3203%2022.1628%2023.5034%2021.9797%2023.7291%2021.9797H24.3829ZM27.2443%2021.9797C27.4701%2021.9797%2027.6531%2022.1628%2027.6531%2022.3885V30.4815C27.6531%2030.7074%2027.47%2030.8903%2027.2443%2030.8903H26.5904C26.3646%2030.8903%2026.1816%2030.7073%2026.1816%2030.4815V22.3885C26.1816%2022.1628%2026.3647%2021.9797%2026.5904%2021.9797H27.2443Z'%20fill='white'/%3e%3c/svg%3e") no-repeat;background-size:contain;height:48px;width:48px}.CollectionDetailPage.popup-mint,.CollectionDetailPage.popup-mint:before{background-color:var(--smart-grey)!important}.toast-info .body{max-width:450px;overflow:hidden}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var J=Object.defineProperty;var V=(s,t,a)=>t in s?J(s,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):s[t]=a;var I=(s,t,a)=>V(s,typeof t!="symbol"?t+"":t,a);import{aG as H,J as l,em as X,N as e,bO as Z,c4 as ee,c5 as se,en as te,eo as ne,M as i,ep as ae,a7 as A,R as f,cN as oe,S as n,aF as le,bP as ie,T as K,bE as ce,ca as re,a2 as Q,eq as de,er as ue,bq as E,es as me,et as ge,Z as pe,eu as he,bJ as W,ev as _e,ak as xe,a4 as be,am as je,ao as Se,O as Ce,aa as Ee,ab as N,cb as ye,Y as De,U as Ne,cT as ke,da as B,cc as Te,a0 as Ie,a1 as fe,a3 as Re,ew as Me,cW as we,ex as Le,d9 as ve,cd as Oe}from"./index-BHRIVcTs.js";import{c as Pe}from"./hooks-aEto244t.js";import{B as $e}from"./Back-Bt1TpmNC.js";import{N as Fe}from"./NotFound-BGRBV5Uq.js";import{S as Ae}from"./SDKTag--yigH3bT.js";import{a as U,S as Be}from"./SceneStats.container-CFQr-vWl.js";import"./date-BuuPIXis.js";import"./index-LLu-0F-B.js";const z=H.get("EXPLORER_URL",""),Ue=H.get("WORLDS_CONTENT_SERVER","");let ze=class extends l.PureComponent{constructor(){super(...arguments);I(this,"getHighlightLayer",(a,o)=>(u,_)=>{const{deployment:m,landTiles:g}=this.props,c=ie(u,_),x=g[c];return x&&m.parcels.some(d=>d===c)?{color:a[x.land.role],scale:o}:null});I(this,"renderThumbnail",()=>{const{deployment:a,landTiles:o,project:u}=this.props,[_,m]=X(a.base);return(a.base in o?o[a.base].land.id:null)?e.jsx("div",{className:"atlas-wrapper",children:e.jsx(Z,{x:_,y:m,isDraggable:!1,zoom:.75,layers:[this.getHighlightLayer(ee,1.4),this.getHighlightLayer(se,1.2)]})}):e.jsx("div",{className:"thumbnail-wrapper",children:e.jsx("img",{className:"thumbnail",src:u.thumbnail,alt:u.description})})});I(this,"getExplorerUrl",a=>te?`${z}/?realm=${Ue}/world/${a}&NETWORK=sepolia`:`${z}/world/${a}`)}render(){const{project:a,deployment:o,landTiles:u,history:_,onOpenModal:m}=this.props,g=o.base in u?u[o.base].land.id:null,c=o.world?o.world:o.base,x=ne(a,o);let d=i("scene_detail_page.published");return x===ae.NEEDS_SYNC&&(d=i("scene_detail_page.unsynced")),e.jsxs("div",{className:A("DeploymentDetail",{clickable:g}),onClick:()=>g&&_.push(f.landDetail(g)),children:[this.renderThumbnail(),e.jsx(U,{label:i("scene_detail_page.status"),children:d}),e.jsx(U,{label:i("scene_detail_page.location"),children:e.jsxs("div",{className:A({"world-url":o.world}),children:[c,o.world?e.jsxs(e.Fragment,{children:[e.jsx(oe,{role:"button",text:this.getExplorerUrl(o.world),showPopup:!0,children:e.jsx(n.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:"link copy",name:"copy outline"})}),e.jsx("a",{href:this.getExplorerUrl(o.world),target:"_blank",rel:"noopener noreferrer",children:e.jsx(n.Icon,{name:"external alternate"})})]}):null]})}),e.jsx(Be,{deployment:o}),e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsx(n.Dropdown.Menu,{children:e.jsx(n.Dropdown.Item,{text:i("scene_detail_page.actions.unpublish"),onClick:()=>m("DeployModal",{view:le.CLEAR_DEPLOYMENT,deploymentId:o.id})})})})]})}};const Ge=s=>({landTiles:re(s)}),He=s=>({onOpenModal:(t,a)=>s(Q(t,a))}),Ke=K(Ge,He)(ce(ze)),Qe="https://cdn.decentraland.org/@dcl/builder-site/7.21.3-19896835659.commit-bb1d19a/assets/automatic_migrate-DQYv7lI_.webp",We="https://cdn.decentraland.org/@dcl/builder-site/7.21.3-19896835659.commit-bb1d19a/assets/migrate_smart_items-D2zNoKEa.webp";var h=(s=>(s.INFO="info",s.MIGRATE="migrate",s))(h||{});function G(s){return s&&s.sdk6?Object.values(s.sdk6.components).filter(a=>a.type===de.Script).length:0}const Ye="_modalContainer_5geih_1",qe="_subtitle_5geih_20",Je="_content_5geih_27",Ve="_actions_5geih_35",Xe="_loadingMessage_5geih_53",Ze="_loader_5geih_57",C={modalContainer:Ye,subtitle:qe,content:Je,actions:Ve,loadingMessage:Xe,loader:Ze};function es({project:s,scene:t,isLoading:a,isSavingSDK6Copy:o,isSavingScene:u,onNavigate:_,onClose:m,onMigrateScene:g}){const[c,x]=l.useState(h.INFO),[d,y]=l.useState(!1),b=l.useMemo(()=>G(t)>0,[t]),j=l.useCallback(()=>{x(h.INFO)},[]),r=l.useCallback(()=>{a||m()},[a,m]),S=l.useCallback(()=>{switch(c){case h.INFO:return ue;case h.MIGRATE:return s!=null&&s.thumbnail?s.thumbnail:b?We:Qe}},[c,b,s]),R=l.useCallback(()=>{switch(c){case h.INFO:x(h.MIGRATE);break;case h.MIGRATE:s&&g(s,d);break}},[c,d,s,g]),M=()=>c===h.MIGRATE&&b?{smartItemsCount:G(t)}:{},w=()=>!a||c!==h.MIGRATE?e.jsx(n.Button,{disabled:a,primary:!0,onClick:R,children:i(`migrate_to_sdk7_modal.${D}.action`)}):o?e.jsxs("span",{className:C.loadingMessage,children:[e.jsx(n.Loader,{size:"tiny",inline:!0,className:C.loader}),i("migrate_to_sdk7_modal.saving_copy")]}):u?e.jsxs("span",{className:C.loadingMessage,children:[e.jsx(n.Loader,{size:"tiny"}),i("migrate_to_sdk7_modal.migrating_scene")]}):null,D=b?`${c}_smart_items`:c,L=!a&&(c!==h.MIGRATE||b);return e.jsxs(n.Modal,{open:!0,className:C.modalContainer,onClose:r,children:[e.jsx(n.ModalNavigation,{title:i(`migrate_to_sdk7_modal.${D}.title`),onBack:c!==h.INFO?j:void 0,onClose:r}),e.jsxs(n.ModalContent,{className:C.content,children:[e.jsx("p",{className:C.subtitle,children:i(`migrate_to_sdk7_modal.${D}.subtitle`,{b:k=>e.jsx("b",{children:k}),br:()=>e.jsx("br",{}),...M()})}),e.jsx("div",{style:{width:"648px",height:"324px",backgroundPosition:"center",backgroundSize:"cover",backgroundImage:`url(${S()}`}}),c===h.MIGRATE&&e.jsx(n.Checkbox,{disabled:a,checked:d,label:i("migrate_to_sdk7_modal.save_a_copy"),onChange:(k,{checked:v})=>{y(!!v)}})]}),e.jsxs(n.ModalActions,{className:C.actions,children:[w(),L&&e.jsx(n.Button,{disabled:a,secondary:!0,onClick:()=>_(f.sceneEditor(s==null?void 0:s.id)),children:i("migrate_to_sdk7_modal.use_legacy_builder")})]})]})}const ss=(s,t)=>{var a,o;return{isLoading:E(ge(s),me),isSavingScene:!!((a=t.project)!=null&&a.id)&&pe(s).has((o=t.project)==null?void 0:o.id),isSavingSDK6Copy:E(W(s),he)}},ts=s=>({onMigrateScene:(t,a)=>s(_e(t,a))}),ns=K(ss,ts)(es),as=s=>{const{project:t,scene:a,isLoading:o,deployments:u,onOpenModal:_,onDelete:m,onDuplicate:g,onLoadProjectScene:c}=s,[x,d]=l.useState(!1),[y,b]=l.useState(!1),j=be();l.useEffect(()=>{t&&!a&&c(t)},[t,a,c]);const r=()=>e.jsx(n.Center,{children:e.jsx(n.Loader,{active:!0,size:"large"})}),S=()=>e.jsx(Fe,{}),R=l.useCallback(()=>{_("EditProjectModal")},[_]),M=l.useCallback(()=>{d(!0)},[d]),w=l.useCallback(()=>{g(t)},[t,g]),D=l.useCallback(()=>{m(t),d(!1)},[t,m,d]),L=l.useCallback(()=>{d(!1)},[d]),k=l.useCallback(()=>{a!=null&&a.sdk6?b(!0):j.push(f.inspector(t==null?void 0:t.id))},[t,a,j]),v=()=>{const{project:p,isLoading:T,isLoadingDeployments:O}=s;return T||O||!p?null:e.jsx(Ce,{projectId:p.id,className:"deployment-status"})},$=l.useCallback(p=>{j.push(p)},[j]),Y=(p,T)=>{const{isLoadingDeployments:O,onOpenModal:q,scene:P}=s;return e.jsxs(e.Fragment,{children:[e.jsxs(n.Section,{size:"large",children:[e.jsxs(n.Row,{children:[e.jsx(n.Column,{children:e.jsxs(n.Row,{children:[e.jsx($e,{absolute:!0,onClick:()=>$(f.scenes())}),e.jsxs(n.Header,{className:"name",children:[p.title,e.jsx(n.Icon,{name:"edit outline",onClick:R})]})]})}),e.jsx(n.Column,{className:"actions",align:"right",children:e.jsxs(n.Row,{children:[e.jsxs(n.Button,{inverted:!0,className:"download-button",onClick:()=>q("ExportModal",{project:p}),children:[e.jsx(n.Icon,{name:"download"}),i("scene_detail_page.download_scene")]}),e.jsxs(n.Button,{primary:!0,className:"edit-button",disabled:!P,loading:!P,onClick:k,children:[e.jsx(n.Icon,{name:"edit outline"}),i("scene_detail_page.edit_scene")]}),e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("scene_detail_page.actions.duplicate"),onClick:w}),e.jsx(n.Dropdown.Item,{text:i("scene_detail_page.actions.delete"),onClick:M})]})})]})})]}),e.jsxs(n.Row,{className:"status-container",children:[v(),e.jsx(Ae,{scene:P})]})]}),e.jsx(n.Section,{children:e.jsx("div",{className:"header-image",style:{backgroundImage:p.thumbnail?`url(${p.thumbnail})`:""}})}),e.jsxs(n.Section,{className:p.description?"":"no-margin-bottom",children:[e.jsx(n.Header,{sub:!0,children:i("scene_detail_page.published_in")}),O?e.jsx(n.Loader,{active:!0,size:"small"}):T.length===0?e.jsxs(n.Empty,{className:"empty-deployments-container",children:[e.jsx("div",{className:"empty-deployments-thumbnail"}),i("scene_detail_page.no_deployments")]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"deployments",children:T.map(F=>e.jsx(Ke,{project:p,deployment:F},F.id))}),e.jsx("div",{className:"notice",children:i("analytics.notice")})]})]}),p.description?e.jsxs(n.Section,{className:"description no-margin-bottom",children:[e.jsx(n.Header,{sub:!0,children:i("scene_detail_page.description")}),e.jsx("p",{className:"description-content",children:p.description})]}):null]})};return e.jsxs(e.Fragment,{children:[e.jsx(je,{}),e.jsxs(n.Page,{className:"SceneDetailPage",isFullscreen:!0,children:[o&&!t?r():null,!o&&!t?S():null,t?e.jsxs(e.Fragment,{children:[Y(t,u),e.jsx(n.Confirm,{size:"tiny",open:x,header:i("project_card.confirm_delete_header",{title:t.title}),content:i("project_card.confirm_delete_content",{title:t.title}),confirmButton:e.jsx(n.Button,{primary:!0,children:i("global.confirm")}),cancelButton:e.jsx(n.Button,{secondary:!0,children:i("global.cancel")}),onCancel:L,onConfirm:D})]}):null,y&&e.jsx(ns,{project:t,scene:a,onNavigate:$,onClose:()=>b(!1)})]}),e.jsx(Se,{})]})},os=xe.memo(as),ls=()=>{const s=Ee(),t=Pe(),a=N(ye),o=l.useMemo(()=>t&&t in a?a[t]:null,[t,a]),u=N(De),_=l.useMemo(()=>t&&t in u?u[t]:[],[t,u]),m=N(Ne),g=l.useMemo(()=>o&&m[o.sceneId],[o,m]),c=N(r=>E(W(r),Me)),x=N(r=>E(ke(r),we)||E(B(r),Le)||E(B(r),ve)||E(Te(r),Oe)),d=l.useCallback((r,S)=>s(Q(r,S)),[s]),y=l.useCallback(r=>s(Ie(r)),[s]),b=l.useCallback(r=>s(fe(r)),[s]),j=l.useCallback((r,S)=>s(Re(r,S)),[s]);return e.jsx(os,{project:o,deployments:_,scene:g,isLoading:c,isLoadingDeployments:x,onOpenModal:d,onDelete:y,onDuplicate:b,onLoadProjectScene:j})},xs=ls;export{xs as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var $=Object.defineProperty;var W=(n,t,s)=>t in n?$(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s;var j=(n,t,s)=>W(n,typeof t!="symbol"?t+"":t,s);import{J as p,K as A,L as q,M as o,N as e,O as G,P as k,Q as w,R as D,S as a,T as H,U as z,V as J,W as L,X as K,Y as V,Z,$ as Q,a0 as X,a1 as Y,a2 as B,a3 as ee,a4 as se,a5 as te,a6 as ne,a7 as ae,a8 as _,a9 as oe,aa as ce,ab as S,ac as re,ad as le,ae as ie,af as de,ag as pe,ah as he,ai as je}from"./index-
|
|
1
|
+
var $=Object.defineProperty;var W=(n,t,s)=>t in n?$(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s;var j=(n,t,s)=>W(n,typeof t!="symbol"?t+"":t,s);import{J as p,K as A,L as q,M as o,N as e,O as G,P as k,Q as w,R as D,S as a,T as H,U as z,V as J,W as L,X as K,Y as V,Z,$ as Q,a0 as X,a1 as Y,a2 as B,a3 as ee,a4 as se,a5 as te,a6 as ne,a7 as ae,a8 as _,a9 as oe,aa as ce,ab as S,ac as re,ad as le,ae as ie,af as de,ag as pe,ah as he,ai as je}from"./index-BHRIVcTs.js";import{N as ue,S as me,u as ge,a as xe}from"./Navigation.container-9A40G-C8.js";import{O as Pe}from"./OptionsDropdown-CG8mCbxa.js";import{S as Ce}from"./SDKTag--yigH3bT.js";import{L as Se}from"./LoggedInDetailPage.container-DWMoMSsT.js";import{u as _e}from"./hooks-aEto244t.js";import"./selectors-RKMIkjNm.js";import"./SignInRequired-B_3SXeXM.js";var E;let fe=(E=class extends p.PureComponent{constructor(){super(...arguments);j(this,"state",{isDeleting:!1});j(this,"handleOnClick",()=>{const{onClick:s,project:c}=this.props;s&&s(c)});j(this,"handleConfirmDeleteProject",()=>{this.setState({isDeleting:!0})});j(this,"handleCancelDeleteProject",()=>{this.setState({isDeleting:!1})});j(this,"handleDeleteProject",()=>{const{project:s,onDeleteProject:c}=this.props;c(s),this.setState({isDeleting:!1})});j(this,"handleDuplicateProject",()=>{const{project:s,onDuplicateProject:c}=this.props;c(s)});j(this,"handleExportScene",()=>{this.props.onOpenModal("ExportModal",{project:this.props.project})})}componentDidMount(){this.props.onLoadProjectScene(this.props.project,this.props.type)}render(){const{project:s,parcels:c,items:r,onClick:h,isUploading:u,hasError:C,scene:m}=this.props,{isDeleting:l}=this.state,g="likes"in s;let i={},x="ProjectCard",P=A(s,m);P&&(P&&q(P)&&(P+=`?updated_at=${+new Date(s.updatedAt)}`),i={backgroundImage:`url(${P})`},x+=" has-thumbnail");const v=[{text:o("scenes_page.project_actions.duplicate_project"),handler:this.handleDuplicateProject},{text:o("scenes_page.project_actions.export_project"),handler:this.handleExportScene},{text:o("scenes_page.project_actions.delete_project"),handler:this.handleConfirmDeleteProject}],f=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"project-thumbnail",style:i}),g?null:e.jsxs(e.Fragment,{children:[e.jsx(G,{projectId:s.id,className:"deployment-status"}),e.jsxs("div",{className:"options-container",children:[e.jsx(Ce,{scene:m}),e.jsx(Pe,{className:"options-dropdown",options:v})]})]}),e.jsxs("div",{className:"project-data",children:[e.jsxs("div",{className:"title-wrapper",children:[e.jsx("div",{className:"title",children:s.title}),u?e.jsx(k,{name:"cloud-upload",className:"is-uploading"}):null,!u&&C?e.jsx("div",{className:"error-indicator"}):null]}),e.jsxs("div",{className:"description",title:s.description,children:[e.jsx(k,{name:"scene-parcel"})," ",o("public_page.parcel_count",{parcels:c}),e.jsx(k,{name:"scene-object"})," ",o("project_card.item_count",{items:r})]})]})]});return e.jsxs(e.Fragment,{children:[h?e.jsx("div",{className:x,onClick:this.handleOnClick,children:f}):e.jsx(w,{to:g?D.poolView(s.id,"pool"):D.sceneDetail(s.id),className:x,children:f}),e.jsx(a.Confirm,{size:"tiny",open:l,header:o("project_card.confirm_delete_header",{title:s.title}),content:o("project_card.confirm_delete_content",{title:s.title}),confirmButton:e.jsx(a.Button,{primary:!0,children:o("global.confirm")}),cancelButton:e.jsx(a.Button,{secondary:!0,children:o("global.cancel")}),onCancel:this.handleCancelDeleteProject,onConfirm:this.handleDeleteProject})]})}},j(E,"defaultProps",{items:0,parcels:0}),E);const Ne=(n,t)=>{const{project:s}=t,c=s.layout.cols*s.layout.rows,r=z(n)[s.sceneId],h=r&&r.sdk6?Object.keys(r.sdk6.entities).length-c:0,u=J(n)[s.id]?L.POOL:L.PROJECT;return{parcels:c,items:h,scene:r,deploymentStatus:K(n)[t.project.id],deployments:V(n)[t.project.id],isUploading:Z(n).has(s.id),hasError:Q(n).has(s.id),type:u}},De=n=>({onDeleteProject:t=>n(X(t)),onDuplicateProject:t=>n(Y(t)),onOpenModal:(t,s)=>n(B(t,s)),onLoadProjectScene:(t,s)=>n(ee(t,s))}),I=H(Ne,De)(fe),F=n=>{const{page:t,poolList:s,projects:c,sortBy:r,totalPages:h,isFetching:u,isLoggingIn:C,onLoadFromScenePool:m,onOpenModal:l}=n,g=se();p.useEffect(()=>{m({sortBy:"updated_at",sortOrder:"desc"})},[m,l]),p.useEffect(()=>{te()&&l("WorldsForENSOwnersAnnouncementModal")},[l]);const i=p.useCallback(()=>{l("ImportModal")},[l]),x=p.useCallback(()=>{l("SceneCreationModal")},[l]),P=()=>e.jsx(a.Button,{inverted:!0,className:"import-scene",onClick:i,children:o("scenes_page.upload_scene")}),v=()=>e.jsx(a.Button,{primary:!0,className:"create-scene",onClick:x,children:o("scenes_page.create_scene")}),f=()=>e.jsx(a.Dropdown,{direction:"left",value:r,options:[{value:_.NEWEST,text:o("scenes_page.sort.newest")},{value:_.NAME,text:o("scenes_page.sort.name")},{value:_.SIZE,text:o("scenes_page.sort.size")}],onChange:R}),M=()=>c.length>0?e.jsx("div",{className:"CardList",children:c.map(d=>e.jsx(I,{project:d},d.id))}):e.jsxs("div",{className:"no-scenes-container",children:[e.jsx("h3",{className:"no-scenes-title",children:o("scenes_page.no_scenes.title")}),e.jsx("span",{className:"no-scenes-description",children:o("scenes_page.no_scenes.description",{a:d=>e.jsx("a",{rel:"noreferrer",target:"_blank",href:"https://docs.decentraland.org/creator/development-guide/sdk-101/",children:d})})}),e.jsx(oe,{})]}),N=p.useCallback((d={})=>{g.push(D.scenes({page:t,sortBy:r,...d}))},[t,r,g]),R=p.useCallback((d,{value:b})=>N({sortBy:b}),[N]),T=p.useCallback((d,{activePage:b})=>N({page:b}),[N]);if(C||u)return e.jsx(ne,{});const O=h>1,y={firstItem:null,lastItem:null};t===1&&(y.prevItem=null),t===h&&(y.nextItem=null);const U=()=>e.jsxs(e.Fragment,{children:[e.jsx(me,{}),e.jsxs(a.Container,{children:[e.jsxs(a.Section,{className:"projects-menu",children:[e.jsxs(a.Row,{children:[e.jsx(a.Column,{children:e.jsx(a.Header,{children:o("scenes_page.my_scenes")})}),e.jsx(a.Column,{align:"right",children:e.jsxs("div",{className:"actions",children:[P(),v()]})})]}),e.jsxs(a.Row,{className:"actions",children:[e.jsx(a.Column,{children:e.jsx("div",{className:"items-count",children:o("scenes_page.results",{count:c.length})})}),e.jsx(a.Column,{align:"right",children:c.length>1?f():null})]})]}),e.jsxs(a.Section,{className:ae("project-cards",{"has-pagination":O}),children:[M(),O?e.jsx(a.Pagination,{...y,activePage:t,totalPages:h,onPageChange:T}):null]}),s?e.jsxs(e.Fragment,{children:[e.jsxs(a.Row,{children:[e.jsx(a.Row,{className:"scene-pool-menu",children:e.jsx(a.Header,{sub:!0,children:o("scenes_page.from_scene_pool")})}),e.jsx(a.Row,{align:"right",children:e.jsx(w,{to:D.poolSearch(),children:e.jsxs(a.Button,{basic:!0,children:[o("global.view_more")," ",e.jsx(a.Icon,{name:"chevron right"})]})})})]}),e.jsx("div",{className:"scene-pool-projects",children:s.map(d=>e.jsx(I,{project:d},d.id))})]}):null]})]});return e.jsx(Se,{className:"ScenesPage",activeTab:ue.SCENES,children:U()})};F.defaultProps={projects:[]};const ve=()=>{const n=ce(),t=ge(),s=xe(),c=_e(Object.values(_),_.NEWEST),r=S(i=>re(i)||le(i)),h=S(ie),u=S(de),C=S(pe),m=S(he),l=p.useCallback((i,x)=>n(B(i,x)),[n]),g=p.useCallback(i=>n(je(i)),[n]);return e.jsx(F,{projects:s,isLoggingIn:r,isFetching:h,page:t,sortBy:c,totalPages:u,didCreate:C,poolList:m,onOpenModal:l,onLoadFromScenePool:g})},Me=ve;export{Me as default};
|