most-box 0.2.0 → 0.2.1
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/README.md +3 -3
- package/out/admin/index.html +0 -0
- package/out/app/index.html +0 -0
- package/out/assets/{AppShell-CQhg6DJU.js → AppShell-OiOEqXPr.js} +1 -1
- package/out/assets/ChatUi-Cif5LRF3.js +1 -0
- package/out/assets/CopyButton-Dm7krgbq.js +1 -0
- package/out/assets/LanguageToggle-B4ZNuBCV.js +1 -0
- package/out/assets/LogoIcon-B2fFe0l1.js +1 -0
- package/out/assets/MarketingHeader-yIZuQP7m.js +1 -0
- package/out/assets/MarketingLayout-DVH0Nx7S.js +1 -0
- package/out/assets/{MarketingThemeToggle-DBaC9bjz.js → MarketingThemeToggle-qlwCZU1o.js} +1 -1
- package/out/assets/{MilkdownEditor-BqJzntYE.js → MilkdownEditor-_TGlDyA_.js} +1 -1
- package/out/assets/MoveModal-BVr4Q7-b.js +1 -0
- package/out/assets/Nav-5xeettNJ.js +1 -0
- package/out/assets/NoteSidebar-DpniUKmy.js +1 -0
- package/out/assets/OpenSidebarButton-BfgG2HIT.js +1 -0
- package/out/assets/PemBlock-CxwIepth.js +1 -0
- package/out/assets/SidebarAccount-Zg5DZblE.js +1 -0
- package/out/assets/arrow-right-CL9YSDVS.js +1 -0
- package/out/assets/channelApi-DNdJfsJ-.js +1 -0
- package/out/assets/chevron-down-CnLh_-aO.js +1 -0
- package/out/assets/{circle-alert-W0iyN4sC.js → circle-alert-oiiRDvhx.js} +1 -1
- package/out/assets/cloud-BEe2N89j.js +1 -0
- package/out/assets/code-9LB8QqxL.js +1 -0
- package/out/assets/{copy-C1MttOli.js → copy-giX4rmFJ.js} +1 -1
- package/out/assets/{download-y7SZXu6E.js → download-D0oMEYQZ.js} +1 -1
- package/out/assets/{downloadValidation-B0p9Ai_9.js → downloadValidation-Bk1VsBBo.js} +1 -1
- package/out/assets/external-link-Cm2WCUxv.js +1 -0
- package/out/assets/filePreview-BZ50vZZf.js +1 -0
- package/out/assets/game-Bvz4dspe.js +1 -0
- package/out/assets/{hard-drive-D13Qbobu.js → hard-drive-B3CQbcp2.js} +1 -1
- package/out/assets/index-BkZvz4WA.css +1 -0
- package/out/assets/index-WCK14Vja.js +34 -0
- package/out/assets/index.lazy-5Q6GuMNT.js +1 -0
- package/out/assets/index.lazy-5jq6EFXa.js +3 -0
- package/out/assets/index.lazy-7n1Q-NrA.js +3 -0
- package/out/assets/index.lazy-BFnOyQFj.js +1 -0
- package/out/assets/index.lazy-B_oPp6qK.js +1 -0
- package/out/assets/index.lazy-BvY50KVz.js +1 -0
- package/out/assets/index.lazy-C0Kn_amZ.js +1 -0
- package/out/assets/index.lazy-C3cek3Gn.js +1 -0
- package/out/assets/index.lazy-CLpPkdy1.js +1 -0
- package/out/assets/index.lazy-Cpr1kApf.js +2 -0
- package/out/assets/index.lazy-CuwLZiUK.js +1 -0
- package/out/assets/index.lazy-DDc3Ylgf.js +2 -0
- package/out/assets/index.lazy-Dg3aqOss.js +1 -0
- package/out/assets/{key-round-CZniN9lv.js → key-round-CzuljhND.js} +1 -1
- package/out/assets/{lock-D5OSNhep.js → lock-D2NhNoJW.js} +1 -1
- package/out/assets/message-square-DwBq_Go5.js +1 -0
- package/out/assets/mp-Bln2MB9G.js +1 -0
- package/out/assets/{music-CbUskKgg.js → music-CB73K5Gz.js} +1 -1
- package/out/assets/{notebook-pen-DqKDQ6MJ.js → notebook-pen-Up7r5zoI.js} +1 -1
- package/out/assets/play-OszVgROb.js +1 -0
- package/out/assets/plus-BbxQG_Ai.js +1 -0
- package/out/assets/{save-DkH1n_Ov.js → save-CiqyiifY.js} +1 -1
- package/out/assets/search-gqAPOsgS.js +1 -0
- package/out/assets/{send-Cl6NtD2T.js → send-vwCWsZGP.js} +1 -1
- package/out/assets/shield-check-CxWxsNLc.js +1 -0
- package/out/assets/{trash-2-BBjpgK_f.js → trash-2-DNGr8IgF.js} +1 -1
- package/out/assets/{triangle-alert-l98G8u9O.js → triangle-alert-B_1BlX1b.js} +1 -1
- package/out/assets/{upload-ByP6Ydde.js → upload-Dxl7GUzb.js} +1 -1
- package/out/assets/useChannelMessages-7bYKXU_R.js +3 -0
- package/out/assets/useGameRoom-DqA1mkfk.js +1 -0
- package/out/assets/wallet-DlkawdPJ.js +1 -0
- package/out/assets/{wifi-Bm4biAjc.js → wifi-sBOKcPFM.js} +1 -1
- package/out/avatars/default/LICENSE.md +7 -0
- package/out/avatars/default/dusk.svg +100 -0
- package/out/avatars/default/ember.svg +55 -0
- package/out/avatars/default/mint.svg +29 -0
- package/out/avatars/default/ocean.svg +25 -0
- package/out/avatars/default/sage.svg +34 -0
- package/out/avatars/default/violet.svg +60 -0
- package/out/chat/index.html +0 -0
- package/out/chat/join/index.html +0 -0
- package/out/demo/index.html +0 -0
- package/out/download/index.html +4 -3
- package/out/game/gandengyan/index.html +0 -0
- package/out/game/index.html +0 -0
- package/out/game/zhajinhua/index.html +0 -0
- package/out/index.html +4 -3
- package/out/note/index.html +0 -0
- package/out/ping/index.html +4 -3
- package/out/profile/index.html +0 -0
- package/out/web3/index.html +0 -0
- package/package.json +1 -1
- package/public/avatars/default/LICENSE.md +7 -0
- package/public/avatars/default/dusk.svg +100 -0
- package/public/avatars/default/ember.svg +55 -0
- package/public/avatars/default/mint.svg +29 -0
- package/public/avatars/default/ocean.svg +25 -0
- package/public/avatars/default/sage.svg +34 -0
- package/public/avatars/default/violet.svg +60 -0
- package/server/src/core/channelIdentity.js +2 -13
- package/server/src/http/app.js +1 -3
- package/server/src/index.js +286 -249
- package/server/src/utils/avatar.js +44 -3
- package/out/assets/ChatUi-BepWs-ZU.js +0 -1
- package/out/assets/LanguageToggle-CtzCCAYv.js +0 -1
- package/out/assets/LogoIcon-Dxto3Sb4.js +0 -1
- package/out/assets/MarketingLayout-BQw0IS2i.js +0 -1
- package/out/assets/MoveModal-4D9n11Kw.js +0 -1
- package/out/assets/Nav-9MDdvgNs.js +0 -1
- package/out/assets/NoteSidebar-C-rIt32H.js +0 -1
- package/out/assets/OpenSidebarButton-Dd0JmKuE.js +0 -1
- package/out/assets/PemBlock-C8dEIzu-.js +0 -1
- package/out/assets/SidebarAccount-ClS-N0lq.js +0 -1
- package/out/assets/arrow-right-urE9Rd7j.js +0 -1
- package/out/assets/channelApi-BwQU0-h1.js +0 -1
- package/out/assets/check-DUNsD2t6.js +0 -1
- package/out/assets/chevron-down-D6mpsfv4.js +0 -1
- package/out/assets/cloud-BMyOoC2x.js +0 -1
- package/out/assets/code-B1Cb_Icm.js +0 -1
- package/out/assets/filePreview-UI9NH34f.js +0 -1
- package/out/assets/game-CdU3xnZo.js +0 -1
- package/out/assets/image-DJCA16l_.js +0 -1
- package/out/assets/index-BdaFEQG-.css +0 -1
- package/out/assets/index-QxXZzOUL.js +0 -33
- package/out/assets/index.lazy-BBTTFanX.js +0 -1
- package/out/assets/index.lazy-BG4ZylHD.js +0 -2
- package/out/assets/index.lazy-Bi-6ZXZX.js +0 -1
- package/out/assets/index.lazy-BixWVr0B.js +0 -1
- package/out/assets/index.lazy-BjFwNYy5.js +0 -3
- package/out/assets/index.lazy-C8EIQsXY.js +0 -2
- package/out/assets/index.lazy-CarNe2uu.js +0 -1
- package/out/assets/index.lazy-DEuGu3H3.js +0 -1
- package/out/assets/index.lazy-GPyILCA7.js +0 -3
- package/out/assets/index.lazy-I8ofndXl.js +0 -1
- package/out/assets/index.lazy-TxhWsA7y.js +0 -1
- package/out/assets/index.lazy-azfky8k7.js +0 -1
- package/out/assets/log-out-B6phyZ5z.js +0 -1
- package/out/assets/play-BIl8q9eU.js +0 -1
- package/out/assets/plus-BxxbpH6Q.js +0 -1
- package/out/assets/search-BQi5Z0E-.js +0 -1
- package/out/assets/useChannelMessages-BgbYfF2c.js +0 -3
- package/out/assets/useGameRoom-DPmweWwe.js +0 -1
- package/out/assets/wallet-c7zIhNSM.js +0 -1
|
@@ -1,12 +1,53 @@
|
|
|
1
1
|
import { createAvatar } from '@dicebear/core'
|
|
2
2
|
import { botttsNeutral } from '@dicebear/collection'
|
|
3
3
|
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export const DEFAULT_AVATAR_PREFIX = 'most-avatar:'
|
|
5
|
+
|
|
6
|
+
export const defaultAvatarIds = [
|
|
7
|
+
'mint',
|
|
8
|
+
'violet',
|
|
9
|
+
'ocean',
|
|
10
|
+
'ember',
|
|
11
|
+
'sage',
|
|
12
|
+
'dusk',
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
export function getDefaultAvatarValue(id) {
|
|
16
|
+
return `${DEFAULT_AVATAR_PREFIX}${id}`
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function getDefaultAvatarPath(id) {
|
|
20
|
+
return `/avatars/default/${id}.svg`
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function getDefaultAvatarId(avatar) {
|
|
24
|
+
if (typeof avatar !== 'string') return ''
|
|
25
|
+
if (!avatar.startsWith(DEFAULT_AVATAR_PREFIX)) return ''
|
|
26
|
+
const id = avatar.slice(DEFAULT_AVATAR_PREFIX.length)
|
|
27
|
+
return defaultAvatarIds.includes(id) ? id : ''
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function isDefaultAvatarValue(avatar) {
|
|
31
|
+
return Boolean(getDefaultAvatarId(avatar))
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function createAddressAvatar(address) {
|
|
7
35
|
return createAvatar(botttsNeutral, {
|
|
8
36
|
seed: 'most.box@' + address,
|
|
9
37
|
flip: true,
|
|
10
38
|
backgroundType: ['gradientLinear'],
|
|
11
39
|
}).toDataUri()
|
|
12
40
|
}
|
|
41
|
+
|
|
42
|
+
export function generateAvatar(address, avatar) {
|
|
43
|
+
const defaultAvatarId = getDefaultAvatarId(avatar)
|
|
44
|
+
if (defaultAvatarId) {
|
|
45
|
+
return getDefaultAvatarPath(defaultAvatarId)
|
|
46
|
+
}
|
|
47
|
+
if (typeof avatar === 'string' && avatar.startsWith(DEFAULT_AVATAR_PREFIX)) {
|
|
48
|
+
return address ? createAddressAvatar(address) : '/avatar.png'
|
|
49
|
+
}
|
|
50
|
+
if (avatar) return avatar
|
|
51
|
+
if (!address) return '/avatar.png'
|
|
52
|
+
return createAddressAvatar(address)
|
|
53
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-Bt-cYkS5.js";import{t}from"./arrow-right-urE9Rd7j.js";import{t as n}from"./circle-alert-W0iyN4sC.js";import{t as r}from"./download-y7SZXu6E.js";import{n as i}from"./SidebarAccount-ClS-N0lq.js";import{n as a,t as o}from"./trash-2-BBjpgK_f.js";import{i as s,n as c,r as l}from"./filePreview-UI9NH34f.js";import{t as u}from"./image-DJCA16l_.js";import{n as d}from"./LogoIcon-Dxto3Sb4.js";import{t as f}from"./music-CbUskKgg.js";import{t as p}from"./plus-BxxbpH6Q.js";import{G as m,V as h,W as g,a as _}from"./index-QxXZzOUL.js";var v=g(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),y=g(`pin-off`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`,key:`znwnzq`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`,key:`c9qhm2`}]]),b=e();function x(e){return!e||e<=0?``:e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(2)} GB`}function S(e){let t=String(e||``).split(`/`);return t[t.length-1]||e}function C(e){return e===`image`?(0,b.jsx)(u,{size:20}):e===`video`?(0,b.jsx)(s,{size:20}):e===`audio`?(0,b.jsx)(f,{size:20}):(0,b.jsx)(a,{size:20})}function w({attachment:e,status:t=`idle`,pending:i=!1,onOpen:a}){let{t:o}=m(),s=t===`checking`,c=[`ui-file-action`,`chat-attachment-action`,t===`error`?`error`:``,t===`available`?`available`:``].filter(Boolean).join(` `),u=x(e.size)||o(`chat.mostboxFile`);return(0,b.jsxs)(`button`,{type:`button`,className:`ui-file-card chat-attachment-card`,onClick:()=>a?.(e),disabled:i||s,title:e.link,translate:`no`,children:[(0,b.jsx)(`span`,{className:`ui-file-icon chat-attachment-icon ${e.kind}`,children:s?(0,b.jsx)(l,{size:20,className:`ui-spinner chat-attachment-spinner`}):C(e.kind)}),(0,b.jsxs)(`span`,{className:`ui-file-info chat-attachment-info`,children:[(0,b.jsx)(`span`,{className:`ui-file-name chat-attachment-name`,translate:`no`,children:S(e.fileName)}),(0,b.jsx)(`span`,{className:`ui-file-meta chat-attachment-meta`,translate:`yes`,children:i?o(`chat.sending`):u})]}),(0,b.jsx)(`span`,{className:c,translate:`yes`,children:s?o(`chat.checking`):t===`available`?(0,b.jsx)(h,{size:16}):t===`error`?(0,b.jsx)(n,{size:17}):(0,b.jsx)(r,{size:16})})]})}var T=[{key:`image`,labelKey:`chat.attachment.image`,accept:`image/*`,icon:u},{key:`video`,labelKey:`chat.attachment.video`,accept:`video/*`,icon:s},{key:`file`,labelKey:`chat.attachment.file`,accept:``,icon:a}],E=T.map(e=>e.accept).join(`,`);function D({children:e}){return(0,b.jsx)(`div`,{className:`message-bubble`,translate:`no`,children:e})}function O({children:e}){return(0,b.jsx)(`div`,{className:`message-bubble has-attachment`,children:e})}function k({variant:e,pending:t=!1,avatarSrc:n,author:r,time:i,children:a}){return(0,b.jsxs)(`div`,{className:[`chat-message`,e,t?`pending`:``].filter(Boolean).join(` `),children:[(0,b.jsx)(`img`,{className:`msg-avatar`,src:n,alt:`avatar`}),(0,b.jsxs)(`div`,{className:`msg-content`,children:[(0,b.jsx)(`span`,{className:`message-author`,translate:`no`,children:r}),a,(0,b.jsx)(`span`,{className:`message-time`,children:i})]})]})}function A({active:e=!1,pinned:t=!1,unread:n=!1,title:r,onSelect:a,onTogglePin:s,onRename:l,onLeave:u}){let{t:f}=m(),p=!!(s||l||u);return(0,b.jsxs)(`div`,{className:[`sidebar-nav-btn`,e?`active`:``,t?`pinned`:``,n?`unread`:``].filter(Boolean).join(` `),onClick:a,role:`button`,tabIndex:0,onKeyDown:e=>{e.target===e.currentTarget&&e.key===`Enter`&&a?.()},children:[(0,b.jsxs)(`span`,{className:`chat-channel-icon-wrap`,children:[(0,b.jsx)(d,{size:16}),n&&(0,b.jsx)(`span`,{className:`chat-channel-unread-dot`,title:f(`chat.unread`),"aria-hidden":`true`})]}),(0,b.jsx)(`span`,{className:`chat-channel-title`,children:(0,b.jsx)(`span`,{className:`chat-channel-title-text`,translate:`no`,children:r})}),p&&(0,b.jsx)(_,{ariaLabel:f(`chat.channelActions`),className:`channel-actions-anchor`,placement:`bottom-end`,items:[{key:`pin`,label:f(t?`chat.unpin`:`chat.pin`),icon:t?(0,b.jsx)(y,{size:16}):(0,b.jsx)(v,{size:16}),onSelect:()=>s?.()},{key:`rename`,label:f(`chat.rename`),icon:(0,b.jsx)(c,{size:16}),onSelect:()=>l?.()},{key:`delete`,label:f(`chat.delete`),icon:(0,b.jsx)(o,{size:16}),onSelect:()=>u?.()}],renderTrigger:e=>(0,b.jsx)(`button`,{...e,className:`leave-channel-btn channel-actions-trigger`,title:f(`common.moreActions`),"aria-label":f(`common.moreActions`),children:(0,b.jsx)(i,{size:16})})})]})}function j({members:e,isLoading:t=!1}){let{t:n}=m();return t&&e.length===0?(0,b.jsx)(`div`,{className:`ui-empty-inline channel-members-empty`,children:n(`chat.loadingMembers`)}):e.length===0?(0,b.jsx)(`div`,{className:`ui-empty-inline channel-members-empty`,children:n(`chat.noMembers`)}):(0,b.jsx)(`div`,{className:`channel-members-grid`,children:e.map(e=>(0,b.jsxs)(`div`,{className:`channel-member`,children:[(0,b.jsx)(`img`,{className:`channel-member-avatar`,src:e.avatarSrc,alt:`avatar`}),(0,b.jsx)(`span`,{className:`channel-member-name`,translate:`no`,children:e.name})]},e.id))})}function M({message:e,placeholder:n,disabled:r=!1,isPublishingAttachment:i=!1,attachmentButtonTitle:a,attachmentInputRef:o,onMessageChange:s,onSend:c,onSelectAttachmentFiles:u}){let{t:d}=m(),f=r||i,h=r||!e.trim(),g=a||d(`chat.attachment.add`);function v(e,t){t?.(e.currentTarget.files),e.currentTarget.value=``}function y(t){t.key===`Enter`&&e.trim()&&c()}function x(e){if(f)return;let t=o?.current;t&&(t.accept=e,t.click())}return(0,b.jsxs)(`div`,{className:`chat-input-area`,children:[(0,b.jsx)(`input`,{ref:o,type:`file`,accept:E,className:`chat-file-input`,onChange:e=>v(e,u)}),(0,b.jsx)(_,{ariaLabel:d(`chat.attachmentType`),placement:`top-start`,disabled:f,items:T.map(e=>{let t=e.icon;return{key:e.key,label:d(e.labelKey),icon:(0,b.jsx)(t,{size:16}),onSelect:()=>x(e.accept)}}),renderTrigger:e=>(0,b.jsx)(`button`,{...e,className:`btn btn-circle chat-tool-btn`,"aria-label":g,children:i?(0,b.jsx)(l,{size:18,className:`ui-spinner chat-attachment-spinner`}):(0,b.jsx)(p,{size:18})})}),(0,b.jsx)(`input`,{type:`text`,className:`input input-pill`,placeholder:n,value:e,disabled:r,onChange:e=>s(e.target.value),onKeyDown:y}),(0,b.jsx)(`button`,{type:`button`,className:`btn btn-circle btn-primary send-btn`,onClick:c,disabled:h,title:d(`chat.sendMessage`),children:(0,b.jsx)(t,{size:18})})]})}export{k as a,S as c,M as i,O as n,D as o,A as r,w as s,j as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-Bt-cYkS5.js";import{G as t,W as n}from"./index-QxXZzOUL.js";var r=n(`languages`,[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]),i=n(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),a=n(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),o=e();function s({className:e=``}){let{locale:n,nextLocale:i,setLocale:a,t:s}=t(),c=s(n===`zh-CN`?`common.locale.switchToEnglish`:`common.locale.switchToChinese`);return(0,o.jsx)(`button`,{type:`button`,className:[`language-toggle`,e].filter(Boolean).join(` `),onClick:()=>a(i),"aria-label":c,title:c,children:(0,o.jsx)(r,{size:16})})}export{a as n,i as r,s as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-Bt-cYkS5.js";import{W as t}from"./index-QxXZzOUL.js";var n=t(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),r=e();function i({size:e=24}){return(0,r.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 24 24`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,r.jsx)(`rect`,{x:`2`,y:`2`,width:`8`,height:`8`,rx:`2`,fill:`var(--accent)`,opacity:`0.4`}),(0,r.jsx)(`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`2`,fill:`var(--accent)`,opacity:`0.7`}),(0,r.jsx)(`rect`,{x:`2`,y:`14`,width:`8`,height:`8`,rx:`2`,fill:`var(--accent)`,opacity:`0.7`}),(0,r.jsx)(`rect`,{x:`14`,y:`14`,width:`8`,height:`8`,rx:`2`,fill:`var(--accent)`})]})}export{n,i as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-Bt-cYkS5.js";import{n as t,t as n}from"./Nav-9MDdvgNs.js";import"./index-QxXZzOUL.js";var r=e();function i({children:e}){return(0,r.jsxs)(`div`,{className:`mkt-layout`,children:[(0,r.jsx)(n,{}),(0,r.jsx)(`main`,{className:`mkt-layout-main`,children:e}),(0,r.jsx)(t,{})]})}export{i as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{n as r}from"./upload-ByP6Ydde.js";import{n as i}from"./trash-2-BBjpgK_f.js";import{i as a,t as o}from"./filePreview-UI9NH34f.js";import{t as s}from"./image-DJCA16l_.js";import{t as c}from"./music-CbUskKgg.js";import{G as l,W as u,l as d,z as f}from"./index-QxXZzOUL.js";var p=u(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),m=n();function h(e){let t=e.lastIndexOf(`/`);return t===-1?{folder:``,name:e}:{folder:e.substring(0,t),name:e.substring(t+1)}}function g({file:e,isSelected:t,onSelect:n,onPreview:r}){let l=o(e.fileName),u=(0,m.jsx)(i,{size:24,color:`#fff`});return l===`image`?u=(0,m.jsx)(s,{size:24,color:`#fff`}):l===`video`?u=(0,m.jsx)(a,{size:24,color:`#fff`}):l===`audio`&&(u=(0,m.jsx)(c,{size:24,color:`#fff`})),(0,m.jsxs)(`div`,{"data-id":e.cid,onClick:()=>n(e.cid),onDoubleClick:()=>r(e),className:`card ${t?`selected`:``}`,children:[(0,m.jsx)(`div`,{className:`card-icon ${e.starred?`starred`:`file`}`,children:u}),(0,m.jsx)(`p`,{className:`card-name`,translate:`no`,children:h(e.fileName).name})]})}function _({folder:e,onClick:t}){return(0,m.jsxs)(`div`,{onClick:t,className:`card`,children:[(0,m.jsx)(`div`,{className:`card-icon folder`,children:(0,m.jsx)(r,{size:28,color:`#fff`})}),(0,m.jsx)(`p`,{className:`card-name`,translate:`no`,children:e.name})]})}var v=t(e(),1);function y(e,t){return e?[{path:``,name:t},...e.split(`/`).filter(Boolean).map((e,t,n)=>({path:n.slice(0,t+1).join(`/`),name:e}))]:[]}function b({items:e,allFolders:t,currentPath:n,onMove:i,onClose:a}){let[o,s]=(0,v.useState)(``),[c,u]=(0,v.useState)(n),{t:p}=l(),h=y(o,p(`move.root`));function g(){i(o||c.trim())}let _=t.filter(e=>{if(o===``)return!e.path.includes(`/`);let t=o+`/`;return e.path.startsWith(t)?!e.path.substring(t.length).includes(`/`):!1});return(0,m.jsx)(d,{onClose:a,children:(0,m.jsxs)(`div`,{className:`move-modal`,onClick:e=>e.stopPropagation(),children:[(0,m.jsxs)(`div`,{className:`modal-header`,children:[(0,m.jsx)(`h3`,{children:p(`move.title`)}),(0,m.jsx)(`button`,{type:`button`,onClick:a,className:`btn btn-icon`,children:(0,m.jsx)(f,{size:18})})]}),(0,m.jsx)(`p`,{className:`move-modal-desc`,children:p(`move.selectedCount`,{count:e.length})}),(0,m.jsx)(`div`,{className:`move-new-folder`,children:(0,m.jsx)(`input`,{type:`text`,className:`input`,value:c,onChange:e=>u(e.target.value),placeholder:p(`move.pathPlaceholder`),translate:`no`})}),(0,m.jsx)(`p`,{className:`move-modal-hint`,children:p(`move.pathExample`)}),(0,m.jsx)(`div`,{className:`move-breadcrumb`,children:h.map((e,t)=>(0,m.jsxs)(v.Fragment,{children:[t>0&&(0,m.jsx)(`span`,{className:`breadcrumb-separator`,children:`/`}),(0,m.jsx)(`button`,{type:`button`,onClick:()=>{s(e.path),u(e.path)},className:`move-breadcrumb-btn ${o===e.path&&!c?`active`:``}`,children:(0,m.jsx)(`span`,{translate:e.path?`no`:`yes`,children:e.name})})]},e.path))}),(0,m.jsxs)(`div`,{className:`move-folder-list`,children:[_.length===0&&(0,m.jsx)(`p`,{className:`move-modal-empty`,children:p(`move.noSubfolders`)}),_.map(e=>(0,m.jsxs)(`button`,{type:`button`,onClick:()=>s(e.path),className:`move-folder-item ${o===e.path&&!c?`selected`:``}`,children:[(0,m.jsx)(r,{size:16}),(0,m.jsx)(`span`,{translate:`no`,children:e.name})]},e.path))]}),(0,m.jsxs)(`div`,{className:`modal-actions`,children:[(0,m.jsx)(`button`,{type:`button`,onClick:a,className:`btn btn-secondary`,children:p(`common.cancel`)}),(0,m.jsx)(`button`,{type:`button`,onClick:g,className:`btn btn-primary`,children:p(`move.action`)})]})]})})}export{p as a,h as i,g as n,_ as r,b as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{t as r}from"./download-y7SZXu6E.js";import{t as i}from"./image-DJCA16l_.js";import{t as a}from"./LanguageToggle-CtzCCAYv.js";import{t as o}from"./log-out-B6phyZ5z.js";import{t as s}from"./LogoIcon-Dxto3Sb4.js";import{G as c,W as l,Y as u,a as d,i as f,o as p,s as m,u as h}from"./index-QxXZzOUL.js";import{t as g}from"./MarketingThemeToggle-DBaC9bjz.js";var _=l(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),v=n(),y=[{to:`/`,labelKey:`footer.about`},{to:`/ping/`,labelKey:`footer.network`},{href:`https://github.com/most-people/most`,labelKey:null,label:`GitHub`,external:!0}];function b(){let{t:e}=c();return(0,v.jsx)(`footer`,{className:`mkt-footer`,children:(0,v.jsx)(`div`,{className:`mkt-container`,children:(0,v.jsxs)(`div`,{className:`mkt-footer-inner`,children:[(0,v.jsx)(`div`,{className:`mkt-footer-links`,children:y.map(t=>`external`in t?(0,v.jsx)(`a`,{href:t.href,target:`_blank`,rel:`noopener noreferrer`,children:t.label},t.href):(0,v.jsx)(u,{to:t.to,children:e(t.labelKey)},t.to))}),(0,v.jsxs)(`span`,{className:`mkt-footer-copy`,children:[`© `,new Date().getFullYear(),` MOST PEOPLE · MIT License`]})]})})})}var x=t(e(),1);function S(){let[e,t]=(0,x.useState)(null),n=h(e=>e.identity),l=h(e=>e.openLoginModal),y=h(e=>e.setUserIdentity),b=h(e=>e.logoutUser),{t:S}=c(),C=n?.displayName||n?.username||S(`nav.openWeb`);function w(e){n&&(y({...n,displayName:e}),t(null))}function T(e){n&&(y({...n,avatar:e}),t(null))}function E(){b(),t(null)}function D(e){try{let t=new URL(e);return t.protocol===`http:`||t.protocol===`https:`?``:S(`nav.avatarUrlInvalid`)}catch{return S(`nav.avatarUrlInvalid`)}}return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`nav`,{className:`mkt-nav`,children:(0,v.jsxs)(`div`,{className:`mkt-nav-inner`,children:[(0,v.jsxs)(u,{to:`/`,className:`mkt-nav-logo`,children:[(0,v.jsx)(s,{}),`MOST PEOPLE`]}),(0,v.jsxs)(`div`,{className:`mkt-nav-cta`,children:[(0,v.jsx)(g,{}),(0,v.jsx)(a,{className:`mkt-theme-toggle`}),(0,v.jsxs)(u,{to:`/download/`,className:`btn btn-primary mkt-nav-preview`,children:[(0,v.jsx)(r,{size:16}),S(`nav.downloadClient`)]}),n?(0,v.jsx)(d,{ariaLabel:S(`nav.accountMenu`),placement:`bottom-end`,items:[{key:`displayName`,label:S(`nav.editDisplayName`),icon:(0,v.jsx)(_,{size:16}),onSelect:()=>t(`displayName`)},{key:`avatar`,label:S(`nav.changeAvatar`),icon:(0,v.jsx)(i,{size:16}),onSelect:()=>t(`avatar`)},{key:`logout`,label:S(`account.logout`),icon:(0,v.jsx)(o,{size:16}),danger:!0,onSelect:()=>t(`logout`)}],renderTrigger:e=>(0,v.jsx)(`button`,{...e,className:`mkt-nav-avatar-trigger`,"aria-label":C,title:C,children:(0,v.jsx)(`img`,{className:`mkt-nav-avatar`,src:f(n.address,n.avatar),alt:``,"aria-hidden":`true`})})}):(0,v.jsx)(`button`,{type:`button`,className:`btn btn-secondary`,onClick:l,children:S(`nav.getStarted`)})]})]})}),e===`displayName`&&n&&(0,v.jsx)(p,{title:S(`nav.editDisplayName`),placeholder:S(`nav.displayNamePlaceholder`),defaultValue:n.displayName||n.username,confirmText:S(`common.confirm`),onConfirm:w,onClose:()=>t(null)}),e===`avatar`&&n&&(0,v.jsx)(p,{title:S(`nav.changeAvatar`),placeholder:S(`nav.avatarUrlPlaceholder`),defaultValue:n.avatar||``,confirmText:S(`common.confirm`),validate:D,onConfirm:T,onClose:()=>t(null)}),e===`logout`&&(0,v.jsx)(m,{title:S(`account.logoutTitle`),message:S(`account.logoutConfirm`),confirmText:S(`account.logout`),danger:!0,onConfirm:E,onClose:()=>t(null)})]})}export{b as n,S as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{t as r}from"./chevron-down-D6mpsfv4.js";import{n as i,r as a,t as o}from"./upload-ByP6Ydde.js";import{n as s,t as c}from"./triangle-alert-l98G8u9O.js";import{t as l}from"./cloud-BMyOoC2x.js";import{t as u}from"./download-y7SZXu6E.js";import{n as d,t as f}from"./SidebarAccount-ClS-N0lq.js";import{G as p,I as m,L as h,U as g,l as _,u as v,z as y}from"./index-QxXZzOUL.js";var b=t(e(),1),x=n();function S({sync:e}){let{t}=p(),n=(0,b.useRef)(null),[r,i]=(0,b.useState)(!1),a=v(e=>e.wallet),f=e.action!==null;(0,b.useEffect)(()=>{if(!r)return;function e(e){n.current?.contains(e.target)||i(!1)}return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[r]);async function m(e){i(!1),await e()}return(0,x.jsxs)(`div`,{className:`note-more`,ref:n,children:[(0,x.jsx)(`button`,{className:`btn btn-icon note-more-trigger`,onClick:()=>i(e=>!e),title:t(`common.moreActions`),"aria-label":t(`common.moreActions`),children:(0,x.jsx)(d,{size:16})}),r&&(0,x.jsxs)(`div`,{className:`note-more-menu`,children:[(0,x.jsxs)(`div`,{className:`ui-notice note-sync-status ${e.hasConflict?`warning conflict`:``}`,children:[(0,x.jsx)(`span`,{className:`ui-icon-tile note-sync-status-icon ${e.hasConflict?`warning`:``}`,children:e.hasConflict?(0,x.jsx)(c,{size:16}):e.status===`synced`?(0,x.jsx)(s,{size:16}):(0,x.jsx)(l,{size:16})}),(0,x.jsxs)(`span`,{children:[(0,x.jsx)(`strong`,{children:t(`note.sync.title`)}),(0,x.jsx)(`small`,{children:e.statusLabel})]})]}),(0,x.jsxs)(`button`,{className:`note-more-item`,onClick:()=>m(e.exportLocalBackup),disabled:!a||f,children:[(0,x.jsx)(o,{size:16}),t(`note.sync.exportLocal`)]}),(0,x.jsxs)(`button`,{className:`note-more-item`,onClick:()=>m(e.importLocalBackup),disabled:!a||f,children:[(0,x.jsx)(u,{size:16}),t(`note.sync.importLocal`)]})]})]})}function C(e){return e.type===`directory`?h(e.path?`${e.path}/${e.name}`:e.name):m(e)}function w({target:e,directories:t,onMove:n,onClose:o}){let{t:s}=p(),c=h(e.path||``),l=C(e),u=t.filter(t=>e.type===`directory`?t.path!==l&&!t.path.startsWith(`${l}/`):!0),[d,f]=(0,b.useState)(c),[m,g]=(0,b.useState)(``),[v,S]=(0,b.useState)(new Set),w=h(m),T=m.trim()?w:d,E=h(T)===c,D=new Map;for(let e of u){let t=D.get(e.parentPath)||[];t.push(e),D.set(e.parentPath,t)}let O=u.filter(e=>{if(!e.parentPath)return!0;let t=e.parentPath.split(`/`).filter(Boolean);return t.every((e,n)=>v.has(t.slice(0,n+1).join(`/`)))}),k=[{label:s(`note.root`),path:``},...d.split(`/`).filter(Boolean).map((e,t,n)=>({label:e,path:n.slice(0,t+1).join(`/`)}))];function A(e){f(h(e)),g(``)}function j(e){A(e),D.has(e)&&S(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}function M(){E||n(T)}return(0,x.jsx)(_,{onClose:o,children:(0,x.jsxs)(`div`,{className:`note-move-modal`,onClick:e=>e.stopPropagation(),children:[(0,x.jsxs)(`div`,{className:`modal-header`,children:[(0,x.jsx)(`h3`,{children:s(`note.move.title`)}),(0,x.jsx)(`button`,{className:`btn btn-icon`,onClick:o,children:(0,x.jsx)(y,{size:18})})]}),(0,x.jsxs)(`div`,{className:`note-move-target`,children:[(0,x.jsx)(`span`,{children:s(`note.move.moving`)}),(0,x.jsx)(`strong`,{translate:`no`,children:e.name})]}),(0,x.jsx)(`div`,{className:`note-move-path`,children:k.map((e,t)=>(0,x.jsxs)(b.Fragment,{children:[t>0&&(0,x.jsx)(`span`,{children:`/`}),(0,x.jsx)(`button`,{type:`button`,onClick:()=>A(e.path),children:(0,x.jsx)(`span`,{translate:e.path?`no`:`yes`,children:e.label})})]},e.path||`root`))}),(0,x.jsxs)(`div`,{className:`note-move-folder-list`,children:[(0,x.jsxs)(`button`,{type:`button`,className:`note-move-folder-item ${d===``?`selected`:``}`,onClick:()=>A(``),children:[(0,x.jsx)(`span`,{className:`note-move-folder-spacer`}),(0,x.jsx)(i,{className:`note-move-folder-icon`,size:16}),(0,x.jsx)(`span`,{children:s(`note.root`)})]}),u.length===0?(0,x.jsx)(`p`,{className:`note-move-empty`,children:s(`note.move.noFolders`)}):O.map(e=>{let t=D.has(e.path),n=v.has(e.path);return(0,x.jsxs)(`button`,{type:`button`,className:`note-move-folder-item note-move-depth-${Math.min(e.depth,4)} ${d===e.path?`selected`:``}`,onClick:()=>j(e.path),children:[t?n?(0,x.jsx)(r,{className:`note-move-expander`,size:14}):(0,x.jsx)(a,{className:`note-move-expander`,size:14}):(0,x.jsx)(`span`,{className:`note-move-folder-spacer`}),(0,x.jsx)(i,{className:`note-move-folder-icon`,size:16}),(0,x.jsx)(`span`,{translate:`no`,children:e.name}),e.parentPath&&(0,x.jsx)(`small`,{translate:`no`,children:e.parentPath})]},e.path)})]}),(0,x.jsx)(`input`,{className:`input input-compact`,value:m,onChange:e=>g(e.target.value),placeholder:s(`note.move.pathPlaceholder`),translate:`no`}),(0,x.jsxs)(`div`,{className:`note-move-destination`,children:[(0,x.jsx)(`span`,{children:s(`note.move.destinationLabel`)}),(0,x.jsx)(`span`,{translate:T?`no`:`yes`,children:T||s(`note.root`)})]}),(0,x.jsxs)(`div`,{className:`modal-actions`,children:[(0,x.jsx)(`button`,{className:`btn btn-secondary`,onClick:o,children:s(`common.cancel`)}),(0,x.jsx)(`button`,{className:`btn btn-primary`,onClick:M,disabled:E,children:s(`note.action.move`)})]})]})})}function T({children:e}){return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`div`,{className:`sidebar-header sidebar-header-link`,onClick:()=>{window.location.href=`/`},children:[(0,x.jsx)(g,{size:18}),(0,x.jsx)(`h1`,{children:`MOST PEOPLE`})]}),e,(0,x.jsx)(f,{})]})}export{w as n,S as r,T as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-Bt-cYkS5.js";import{n as t}from"./AppShell-CQhg6DJU.js";import{G as n,W as r}from"./index-QxXZzOUL.js";var i=r(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),a=e();function o({label:e,className:r=``,variant:o=`primary`}){let{isSidebarVisible:s,openSidebar:c}=t(),{t:l}=n(),u=o===`primary`?`btn-primary`:``,d=e||l(`appShell.openSidebar`);return s?null:(0,a.jsxs)(`button`,{type:`button`,className:`btn ${u} sidebar-open-hint ${r}`.trim(),onClick:c,children:[(0,a.jsx)(i,{size:16}),d]})}export{o as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{t as r}from"./check-DUNsD2t6.js";import{t as i}from"./copy-C1MttOli.js";import{t as a}from"./download-y7SZXu6E.js";import{G as o,W as s}from"./index-QxXZzOUL.js";var c=s(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),l=t(e(),1),u=n();function d({text:e,label:t,copiedLabel:n,className:a=`btn btn-icon`,iconSize:s=14}){let{t:c}=o(),[d,f]=(0,l.useState)(!1),p=n||c(`common.copied`),m=t||c(`common.copy`);async function h(){try{await navigator.clipboard.writeText(e),f(!0),setTimeout(()=>f(!1),1500)}catch{}}return(0,u.jsxs)(`button`,{type:`button`,className:a,onClick:h,title:d?p:m,children:[d?(0,u.jsx)(r,{size:s}):(0,u.jsx)(i,{size:s}),t?d?p:t:null]})}function f({icon:e,message:t,className:n=`empty-state glass`}){return(0,u.jsxs)(`div`,{className:n,children:[(0,u.jsx)(`div`,{className:`empty-state-icon`,children:e}),(0,u.jsx)(`p`,{children:t})]})}function p({title:e,icon:t,children:n,accent:r=!1}){return(0,u.jsxs)(`div`,{className:`web3-key-card ${r?`accent`:``}`,children:[(0,u.jsxs)(`div`,{className:`web3-key-card-header`,children:[(0,u.jsx)(`span`,{className:`web3-key-card-icon`,children:t}),(0,u.jsx)(`span`,{className:`web3-key-card-title`,children:e})]}),(0,u.jsx)(`div`,{className:`web3-key-card-body`,translate:`no`,children:n})]})}function m({label:e,pem:t,filename:n}){let{t:r}=o();function i(){let e=new Blob([t],{type:`text/plain`}),r=URL.createObjectURL(e),i=document.createElement(`a`);i.href=r,i.download=n,i.click(),URL.revokeObjectURL(r)}return(0,u.jsxs)(`div`,{className:`web3-pem-block`,children:[(0,u.jsxs)(`div`,{className:`web3-pem-header`,children:[(0,u.jsx)(`span`,{className:`web3-pem-label`,children:e}),(0,u.jsxs)(`div`,{className:`web3-pem-actions`,children:[(0,u.jsx)(d,{text:t,label:r(`common.copy`),className:`btn btn-sm`,iconSize:14}),(0,u.jsxs)(`button`,{type:`button`,className:`btn btn-sm btn-primary`,onClick:i,title:r(`common.download`),children:[(0,u.jsx)(a,{size:14}),r(`common.download`)]})]})]}),(0,u.jsx)(`textarea`,{className:`textarea mono`,value:t,readOnly:!0,rows:6,translate:`no`})]})}export{c as a,d as i,p as n,f as r,m as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{t as r}from"./log-out-B6phyZ5z.js";import{G as i,W as a,a as o,i as s,s as c,u as l}from"./index-QxXZzOUL.js";var u=a(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),d=t(e(),1),f=n();function p({className:e=``}){let t=l(e=>e.identity),n=l(e=>e.openLoginModal),a=l(e=>e.logoutUser),[p,m]=(0,d.useState)(!1),{t:h}=i();return(0,f.jsxs)(`div`,{className:`chat-sidebar-footer sidebar-account ${e}`,children:[(0,f.jsxs)(`div`,{className:`user-info`,children:[(0,f.jsx)(`img`,{className:`user-avatar-img`,src:s(t?.address,t?.avatar),alt:`avatar`}),(0,f.jsx)(`span`,{className:`user-name`,title:t?.address,children:(0,f.jsx)(`span`,{translate:t?.displayName?`no`:`yes`,children:t?.displayName||h(`account.notSignedIn`)})})]}),t?(0,f.jsx)(o,{ariaLabel:h(`account.actions`),placement:`top-end`,items:[{key:`logout`,label:h(`account.logout`),icon:(0,f.jsx)(r,{size:16}),onSelect:()=>m(!0)}],renderTrigger:e=>(0,f.jsx)(`button`,{...e,className:`btn btn-icon account-menu-trigger`,"aria-label":h(`common.moreActions`),title:h(`common.moreActions`),children:(0,f.jsx)(u,{size:16})})}):(0,f.jsx)(`button`,{className:`btn btn-primary login-btn`,onClick:n,children:h(`account.signIn`)}),p&&(0,f.jsx)(c,{title:h(`account.logoutTitle`),message:h(`account.logoutConfirm`),confirmText:h(`account.logout`),danger:!0,onConfirm:()=>{a(),m(!1)},onClose:()=>m(!1)})]})}export{u as n,p as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as e}from"./index-QxXZzOUL.js";var t=e(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e,y as t}from"./index-QxXZzOUL.js";var n={getChannels(t={}){let n=new URLSearchParams;t.type&&n.set(`type`,t.type),t.excludeType&&n.set(`excludeType`,t.excludeType);let r=n.toString();return e.get(r?`/api/channels?${r}`:`/api/channels`).json()},createChannel(t,n=`personal`,r={}){return e.post(`/api/channels`,{json:{name:t,type:n,...r}}).json()},leaveChannel(t){return e.delete(`/api/channels`,{json:{channelKey:t}}).json()},getChannelMessages(t,n=100,r=0){return e.get(`/api/channels/${encodeURIComponent(t)}/messages?limit=${n}&offset=${r}`).json()},sendChannelMessage({channelName:t,content:n,author:r,authorName:i,avatar:a,attachment:o}){return e.post(`/api/channels/${encodeURIComponent(t)}/messages`,{json:o?{content:n,author:r,authorName:i,avatar:a,attachment:o}:{content:n,author:r,authorName:i,avatar:a}}).json()},getChannelMembers(t){return e.get(`/api/channels/${encodeURIComponent(t)}/members`).json()},getChannelPeers(t){return e.get(`/api/channels/${encodeURIComponent(t)}/peers`).json()},setChannelRemark(t,n){return e.put(`/api/channels/${encodeURIComponent(t)}/remark`,{json:{remark:n}}).json()},setChannelPinned(t,n){return e.put(`/api/channels/${encodeURIComponent(t)}/pin`,{json:{pinned:n}}).json()},getFileDownloadUrl(e){return t(`/api/files/${e}/download`)}};export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as e}from"./index-QxXZzOUL.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as e}from"./index-QxXZzOUL.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as e}from"./index-QxXZzOUL.js";var t=e(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as e}from"./index-QxXZzOUL.js";var t=e(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as e}from"./index-QxXZzOUL.js";var t=e(`film`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M7 3v18`,key:`bbkbws`}],[`path`,{d:`M3 7.5h4`,key:`zfgn84`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`path`,{d:`M3 16.5h4`,key:`1230mu`}],[`path`,{d:`M17 3v18`,key:`in4fa5`}],[`path`,{d:`M17 7.5h4`,key:`myr1c1`}],[`path`,{d:`M17 16.5h4`,key:`go4c1d`}]]),n=e(`loader`,[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]),r=e(`pen`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]);function i(e){let t=String(e||``).split(`.`).pop()?.toLowerCase()||``,n=[`jpg`,`jpeg`,`png`,`gif`,`webp`,`svg`,`bmp`,`ico`,`tiff`,`heic`,`heif`],r=[`mp4`,`webm`,`mov`,`avi`,`mkv`,`flv`,`wmv`,`m4v`,`mpeg`,`3gp`],i=[`mp3`,`wav`,`ogg`,`flac`,`aac`,`m4a`,`wma`,`opus`],a=`txt.md.js.ts.jsx.tsx.css.scss.less.json.xml.html.htm.yaml.yml.toml.ini.cfg.conf.log.sh.bash.py.rb.go.rs.java.c.cpp.h.hpp.cs.php.sql.graphql.env.gitignore.dockerfile.readme`.split(`.`);return n.includes(t)?`image`:r.includes(t)?`video`:i.includes(t)?`audio`:a.includes(t)?`text`:`file`}export{t as i,r as n,n as r,i as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-Bt-cYkS5.js";import{X as t}from"./index-QxXZzOUL.js";var n=e(),r=()=>(0,n.jsx)(t,{to:`/game/gandengyan/`,replace:!0});export{r as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as e}from"./index-QxXZzOUL.js";var t=e(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]);export{t};
|