2 lines
3.0 KiB
JavaScript
2 lines
3.0 KiB
JavaScript
import{_,k as p,I as f,o as h,c as r,l as v,q as m,b as a,F as b,x as g,aR as w,r as y,j as n,G as x,m as k,t as s,n as F}from"./index-CIAVq8iD-1776148658686.js";import{a as S}from"./utcFormat-Cl3Lb3s0-1776148658686.js";import{G as D}from"./GeneralHeader-ClI1i1Ud-1776148658686.js";import{G as A}from"./GradientBorder-CfwSeIMB-1776148658686.js";const T={class:"information-details"},I={style:{padding:"16px",position:"relative","z-index":"2"}},R={style:{display:"flex","flex-direction":"column",gap:"12px"}},M={key:0,class:"transaction-content"},E={class:"transaction-info"},N={style:{"margin-bottom":"4px","font-weight":"700"}},z={style:{"font-size":"1em","font-weight":"500",color:"rgba(0, 0, 0, 0.4)"}},B={style:{margin:"0 8px",display:"flex","flex-direction":"column","align-items":"flex-end"}},C={style:{"font-size":"1.2em","font-weight":"500","margin-bottom":"4px",direction:"ltr"}},G={key:1,class:"transaction-content"},W={class:"transaction-info"},U={style:{"margin-bottom":"4px","font-weight":"700"}},H={style:{"font-size":"1em","font-weight":"500",color:"rgba(0, 0, 0, 0.4)"}},L={style:{"font-size":"1.2em","font-weight":"500",margin:"0 8px",direction:"ltr"}},V={__name:"InformationDetails",setup(j){const{t:c,locale:d}=p();d.value&&f(d.value);const l=y([]),u=async()=>{try{const o=await w();o.body&&Array.isArray(o.body)?l.value=o.body.map(e=>{let t=e.amount,i="";switch(e.event){case"RECEIVE_TRANSFER":t=Math.abs(e.amount);break;case"TRANSFER":t=-Math.abs(e.amount);break;case"WITHDRAW":e.type===0?t=Math.abs(e.amount):t=-Math.abs(e.amount),e.details.latestApprovalStatus=="SUBMIT"?i="Under review":e.details.latestApprovalStatus=="PASS"?i="Approved":e.details.latestApprovalStatus=="NOT_PASS"&&(i="Rejection");break;default:break}return{id:e.id,eventDescribe:e.eventDescribe,createTime:S(e.createTime),amount:t,balance:e.balance,event:e.event,withdrawStatus:i,userAvatar:e.details?.userAvatar||null,userNickname:e.details?.userNickname||null,account:e.details?.account||null}}):l.value=[]}catch(o){console.error("Failed to fetch wallet details:",o)}};return h(()=>{u()}),(o,e)=>(n(),r("div",T,[v(D,{showLanguageList:!0,title:m(c)("details"),color:"black"},null,8,["title"]),a("div",I,[a("div",R,[(n(!0),r(b,null,g(l.value,t=>(n(),x(A,{radius:"20px",key:t.id,style:{}},{default:k(()=>[t.event=="WITHDRAW"?(n(),r("div",M,[a("div",E,[a("div",N,s(t.eventDescribe),1),a("p",z,s(t.createTime),1)]),a("div",B,[a("div",C," $"+s(Math.abs(t.amount)),1),a("div",{style:F([{"font-weight":"510","background-clip":"text","-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"},{backgroundImage:t.withdrawStatus=="Under review"?"linear-gradient(248deg, #FFE675 5.66%, #FFC53D 42.49%)":t.withdrawStatus=="Approved"?"linear-gradient(248deg, #75FF98 5.66%, #3DFF54 42.49%)":"linear-gradient(248deg, #FF7578 5.66%, #FF3D40 42.49%)"}])},s(t.withdrawStatus),5)])])):(n(),r("div",G,[a("div",W,[a("div",U,s(t.eventDescribe),1),a("p",H,s(t.createTime),1)]),a("div",L,s(t.amount>0?"+":"-")+s(Math.abs(t.amount)),1)]))]),_:2},1024))),128))])])]))}},J=_(V,[["__scopeId","data-v-b81d076e"]]);export{J as default};
|