8 lines
5.5 KiB
JavaScript
8 lines
5.5 KiB
JavaScript
import{a as F}from"./chunk-EHPWDG7W.js";import{v as M}from"./chunk-F3L6CNFV.js";import"./chunk-PJ6KUX4N.js";import"./chunk-4HG7ASV5.js";import"./chunk-ZRWFLJZO.js";import{d as C,e as v,f as y}from"./chunk-JYK46VHM.js";import{a as G}from"./chunk-32C2WARN.js";import"./chunk-5HVC4MM2.js";import"./chunk-BKENFTY2.js";import{e as k}from"./chunk-PYB7SS7C.js";import{O as w,T as p}from"./chunk-ZASBKUPD.js";import{a as u}from"./chunk-5XAZ5MJZ.js";import"./chunk-4FLAC4IK.js";import"./chunk-BRAZV5TR.js";import{e as U}from"./chunk-3GRVNJC2.js";import{o as ne}from"./chunk-64WUUNDB.js";import{Kb as O,Lb as h,fc as A,jc as ie}from"./chunk-QY24TFF7.js";import"./chunk-RL2JAB2F.js";import"./chunk-OV5ZOYAY.js";import"./chunk-DGSDDTNV.js";import"./chunk-62FSCPM5.js";import"./chunk-AEW3GAWG.js";import"./chunk-3O7LGTTV.js";import"./chunk-GCB5X3BF.js";import"./chunk-Z36WOTFJ.js";import"./chunk-3XZTE2DB.js";import"./chunk-BXKNNBFT.js";import"./chunk-BOM6ZF3Z.js";import"./chunk-HN3IBJKK.js";import"./chunk-TUSK34X6.js";import"./chunk-BD75ZX4I.js";import"./chunk-AMW3INUA.js";import"./chunk-GQ3SEXRL.js";import"./chunk-S5RMPAYX.js";import"./chunk-Z3XU47FL.js";import{b as x}from"./chunk-3MBHSNRN.js";import{c as P}from"./chunk-CU62K6VE.js";import"./chunk-2NSYI7QP.js";import"./chunk-DS3RNNYF.js";import{a as se}from"./chunk-J5JOI62E.js";import"./chunk-I5E2ION7.js";import{H as re,y as n}from"./chunk-SQMXULWT.js";import"./chunk-KBSRU77R.js";import{A as T,C as L}from"./chunk-GQZAGQSC.js";import"./chunk-STCDRFCQ.js";import"./chunk-3LLV5FBU.js";import"./chunk-6JFRAZNP.js";import"./chunk-L625DEVK.js";import"./chunk-GSIHKWLV.js";import"./chunk-4XEB4VJJ.js";import"./chunk-FVWN5TXY.js";import"./chunk-23X4YN5A.js";import"./chunk-SSLLOJNR.js";import"./chunk-OKJNV4PS.js";import"./chunk-OV7WPFRA.js";import{aa as d}from"./chunk-RC6UR2LL.js";import"./chunk-XTEVCKH7.js";import{b as oe}from"./chunk-BF2V36QE.js";import"./chunk-E735URDA.js";import"./chunk-EFTDVKCQ.js";import"./chunk-VLDGNBD7.js";import"./chunk-W2A2E62R.js";import"./chunk-GIEGURG2.js";import"./chunk-RVWD7D4B.js";import"./chunk-TSXM5GQV.js";import"./chunk-QWOR3C5W.js";import"./chunk-KQL2BBUZ.js";import"./chunk-YUSIJWOC.js";import"./chunk-YHVKZE66.js";import"./chunk-2DSLTDTL.js";import"./chunk-UVIVAH5I.js";import"./chunk-ALIHWT7Z.js";import"./chunk-T4BSRFB6.js";import"./chunk-IAFVNOEB.js";import"./chunk-DUYWEMAT.js";import"./chunk-WMCBVXPA.js";import{f as _,n as process,o as m,q as c}from"./chunk-QTLWQ5AJ.js";m();c();var t=_(oe()),i=_(ie()),W=_(ne()),E=_(se());re();m();c();var e={LINE:"LINE",ROUTE:"ROUTE",SWTICH:"SWTICH"},S={SHOW_NFT_AMOUNT:"SHOW_NFT_AMOUNT",HIDDEN_SMALL_ASSETS:"HIDDEN_SMALL_ASSETS"},le=[{type:e.ROUTE,title:"wallet_settings_subtitle_currency_setting",route:`${p}?pageType=Currency`,point:y,value:"currencyName",dataTestId:u.PREFERENCE_PAGE.CURRENCY_SETTING_BUTTON},{type:e.ROUTE,route:`${p}?pageType=Lang`,point:v,title:"wallet_settings_language_subtitle_language",value:"language",dataTestId:u.PREFERENCE_PAGE.LANGUAGE_SETTING_BUTTON},{type:e.ROUTE,route:`${p}?pageType=Theme`,title:"wallet_extension_header_apperance_theme",value:"theme",dataTestId:u.PREFERENCE_PAGE.THEME_SETTING_BUTTON},{type:e.LINE},{type:e.ROUTE,route:w,title:"wallet_extension_default_expand_connection_method",hide:process.env.PLATFORM_WEB},{type:e.LINE,hide:process.env.PLATFORM_WEB},{type:e.SWTICH,actionType:S.SHOW_NFT_AMOUNT,tooltip:{icon:"okx-wallet-plugin-information-circle",title:"wallet_extension_nft_toast_nftvalue_collection_floorprice",props:{trigger:T.TRIGGER_TYPES.hover}},value:"showNftAmount",title:"wallet_extension_general_countnft_intotal"}],H=le;var _e=9999999999,R=60,we=({history:b})=>{let D=(0,i.useDispatch)(),$=x(),Y=(0,i.useSelector)(M),B=(0,i.useSelector)(U),V=F.find(({code:o})=>o===B)?.name,z=(0,i.useSelector)(h),j=(0,i.useSelector)(O),q=z.find(({isoCode:o})=>o===j?.isoCode)?.displayName,s=(0,i.useSelector)(A),f=n("wallet_extension_auto_lock_minutes",{number:s});s>=_e?f=n("wallet_extension_auto_lock_never"):s/R>1&&(f=n("wallet_extension_auto_lock_hours",{number:s/R}));let J=n(P[$]),N={language:V,currencyName:q,lockTimeLimit:f,theme:J,showNftAmount:Y},K=(0,W.useMemoizedFn)(async({type:o,route:a,point:r})=>{r?.(),o===e.ROUTE&&b.push(a)},[]),Q=t.default.useMemo(()=>H.map((o,a)=>{let{type:r,title:X,value:g,tooltip:l,actionType:Z,hide:ee,dataTestId:te}=o;return ee?null:r===e.LINE?t.default.createElement("div",{key:`${r}${a}`,className:"preference-setting-item__line"}):t.default.createElement("div",{key:`${r}${a}`,className:(0,E.default)("preference-setting-item",{"preference-setting-item__hover":r===e.ROUTE}),onClick:()=>{K(o)},"data-testid":te},t.default.createElement("div",{className:"preference-setting-item__title"},n(X),l&&t.default.createElement(T,{title:n(l.title),...l.props},t.default.createElement(d,{className:(0,E.default)(l.icon,"preference-setting-item__icon")}))),g&&t.default.createElement("div",{className:"preference-setting-item__value"},N[g]||""),r===e.ROUTE&&t.default.createElement(d,{className:(0,E.default)("okds-arrow-chevron-right-centered-md","preference-setting-item__arrow")}),r===e.SWTICH&&t.default.createElement(L,{checked:N[g],onChange:I=>{switch(Z){case S.SHOW_NFT_AMOUNT:D(k(I)),I&&C();break;default:break}}}))}),[N]);return t.default.createElement("div",{className:"preference-setting"},t.default.createElement(G,{className:"preference-setting__nav",title:n("wallet_extension_setting_item_wallet_preferances")}),t.default.createElement("div",{className:"preference-setting-list"},Q))};export{we as default};
|
|
|
|
window.inOKXExtension = true;
|
|
window.inMiniApp = false;
|
|
window.ASSETS_BUILD_TYPE = "publish";
|
|
|
|
//# sourceMappingURL=Preference-GNKGKIIZ.js.map
|