89 lines
7.1 KiB
JavaScript
89 lines
7.1 KiB
JavaScript
import{n as e}from"./rolldown-runtime-DkW27tQK.js";import{Gt as t,er as n,kn as r}from"./control-ui-foundation-CeFMP1Ly.js";import{b as ee,dr as i,fl as a,fr as o,lr as s,ml as c,pr as te,vr as l,w as u,yr as d}from"./control-ui-core-pH6nakZ-.js";import{G as f,J as p,W as m,Z as h,rt as g}from"./lit-runtime-BEtFSUCp.js";import{Cn as ne,ln as re,m as ie,p as ae}from"./control-ui-core-DGVkFhVB.js";import{Ft as oe,Gt as _,Ht as v,Lt as y,Rt as b,ht as x,qt as S,vt as C}from"./control-ui-core-Br5DB0Zj.js";import{In as w,Ln as T}from"./control-ui-boot-wpHCbPL9.js";import{Cn as E,Fr as D,Ir as O,Lr as k,Nr as A,Pr as j,gn as M,jr as se,mn as N,on as P,vn as F}from"./control-ui-boot-Cdpgu1Gm.js";import{n as I,t as L}from"./settings-workspace-Bo4nqRhI.js";import{n as R,t as z}from"./brand-icons-CYcF0sbL.js";function B(e,t){if(!e)return null;let n=new Date(e);return Number.isNaN(n.getTime())?null:new Intl.DateTimeFormat(t,{dateStyle:`medium`,timeZone:`UTC`}).format(n)}function V(e){return S(e===`copying`?`aboutPage.copyingCommit`:e===`copied`?`aboutPage.copiedCommit`:e===`error`?`aboutPage.copyCommitFailed`:`aboutPage.copyCommit`)}function H(e){return e===`copied`?S(`aboutPage.copiedCommit`):e===`error`?S(`aboutPage.copyCommitFailed`):``}function U(){return p`<span class="muted">${S(`aboutPage.unavailable`)}</span>`}function W(e){if(!e)return f;let t=Date.parse(e);if(!Number.isFinite(t))return f;let n=new Intl.DateTimeFormat(_.getLocale(),{dateStyle:`medium`,timeStyle:`short`}).format(new Date(t));return p`
|
|
<time class="about-commit__age" dir="auto" datetime=${e} title=${n}
|
|
>${ee(t,{fallback:``})}</time
|
|
>
|
|
`}function G(e){let t=e.buildInfo.commit;if(!t)return U();let n=V(e.copyState);return p`
|
|
<span class="about-commit">
|
|
<code dir="ltr" title=${t}>${t.slice(0,q)}</code>
|
|
${W(e.buildInfo.commitAt)}
|
|
<openclaw-tooltip .content=${n}>
|
|
<button
|
|
type="button"
|
|
class="about-commit__copy"
|
|
aria-label=${n}
|
|
aria-busy=${e.copyState===`copying`?`true`:f}
|
|
?disabled=${e.copyState===`copying`}
|
|
@click=${e.onCopyCommit}
|
|
>
|
|
<span aria-hidden="true">${e.copyState===`copied`?y.check:y.copy}</span>
|
|
</button>
|
|
</openclaw-tooltip>
|
|
<span class="sr-only" role="status" aria-live="polite">${H(e.copyState)}</span>
|
|
</span>
|
|
`}function K(e){let t=O.find(e=>e.id===`crimson`)??r(O[0],`about lobster palette`),n=se(t);return p`
|
|
<section class="about-hero">
|
|
<button
|
|
type="button"
|
|
class="about-hero__clawd ${e.clawdWaving?`about-hero__clawd--wave`:``}"
|
|
style=${j(n)}
|
|
aria-label=${S(`aboutPage.waveHello`)}
|
|
@click=${e.onPokeClawd}
|
|
>
|
|
${D(n)}
|
|
</button>
|
|
<h2 class="about-hero__name">${S(`aboutPage.productName`)}</h2>
|
|
<p class="about-hero__tagline">${S(`aboutPage.tagline`)}</p>
|
|
${e.buildInfo.version?p`<code class="about-hero__version" dir="ltr">v${e.buildInfo.version}</code>`:f}
|
|
<nav class="about-hero__links" aria-label=${S(`aboutPage.linksLabel`)}>
|
|
${J.map(e=>p`
|
|
<a
|
|
class="about-hero__link"
|
|
href=${e.href}
|
|
target=${i}
|
|
rel=${o()}
|
|
>
|
|
<span class="about-hero__link-icon" aria-hidden="true">${e.icon}</span>
|
|
<span>${e.label()}</span>
|
|
</a>
|
|
`)}
|
|
</nav>
|
|
</section>
|
|
`}function ce(e){let t=B(e.buildInfo.builtAt,_.getLocale()),n=p`
|
|
<dl
|
|
class="settings-kv about-build-grid"
|
|
role="group"
|
|
aria-label=${S(`aboutPage.artifactDetails`)}
|
|
>
|
|
<dt>${S(`aboutPage.version`)}</dt>
|
|
<dd>
|
|
${e.buildInfo.version?p`<code dir="ltr" title=${e.buildInfo.version}>${e.buildInfo.version}</code>`:U()}
|
|
</dd>
|
|
<dt>${S(`aboutPage.commit`)}</dt>
|
|
<dd>${G(e)}</dd>
|
|
${e.buildInfo.branch?p`
|
|
<dt>${S(`aboutPage.branch`)}</dt>
|
|
<dd>
|
|
<code dir="ltr" title=${e.buildInfo.branch}
|
|
>${e.buildInfo.branch}${e.buildInfo.dirty===!0?`*`:``}</code
|
|
>
|
|
</dd>
|
|
`:f}
|
|
<dt>${S(`aboutPage.built`)}</dt>
|
|
<dd>
|
|
${t&&e.buildInfo.builtAt?p`<time
|
|
dir="auto"
|
|
datetime=${e.buildInfo.builtAt}
|
|
title=${e.buildInfo.builtAt}
|
|
>${t}</time
|
|
>`:U()}
|
|
</dd>
|
|
</dl>
|
|
`;return N([K(e),F({title:S(`aboutPage.artifactTitle`),description:S(`aboutPage.artifactSubtitle`)},n),F({},M({title:S(`aboutPage.gatewayVersion`),description:S(`aboutPage.gatewayVersionHint`),control:e.gatewayVersion?E(p`<code dir="ltr" title=${e.gatewayVersion}>${e.gatewayVersion}</code>`,{mono:!0}):E(S(`aboutPage.unavailable`))})),p`<p class="about-footer">${S(`aboutPage.license`)}</p>`])}var q,J;function Y(){return(Y=e((()=>{t(),m(),b(),A(),k(),P(),oe(),v(),te(),u(),R(),q=12,J=[{href:`https://openclaw.ai`,icon:y.globe,label:()=>S(`aboutPage.linkWebsite`)},{href:`https://docs.openclaw.ai`,icon:y.book,label:()=>S(`aboutPage.linkDocs`)},{href:`https://github.com/openclaw/openclaw`,icon:z.github,label:()=>S(`aboutPage.linkGitHub`)},{href:`https://discord.gg/clawd`,icon:z.discord,label:()=>S(`aboutPage.linkDiscord`)},{href:`https://x.com/openclaw`,icon:z.x,label:()=>S(`aboutPage.linkX`)},{href:`https://docs.openclaw.ai/releases`,icon:y.scrollText,label:()=>S(`aboutPage.linkChangelog`)}]})))()}var X,Z,Q;function $(){return($=e((()=>{T(),m(),h(),re(),ie(),C(),L(),c(),d(),Y(),X=1800,Z=1400,Q=class extends a{constructor(...e){super(...e),this.copyState=`idle`,this.clawdWaving=!1,this.copyResetTimer=null,this.waveResetTimer=null,this.subscriptions=new l(this).watch(()=>this.context?.gateway,(e,t)=>e.subscribe(t))}disconnectedCallback(){this.subscriptions.clear(),this.copyResetTimer!==null&&(globalThis.clearTimeout(this.copyResetTimer),this.copyResetTimer=null),this.waveResetTimer!==null&&(globalThis.clearTimeout(this.waveResetTimer),this.waveResetTimer=null),super.disconnectedCallback()}pokeClawd(){this.clawdWaving||(this.clawdWaving=!0,this.waveResetTimer=globalThis.setTimeout(()=>{this.waveResetTimer=null,this.clawdWaving=!1},Z))}async copyCommit(){let e=x.commit;if(!e||this.copyState===`copying`)return;this.copyState=`copying`;let t=await s(e);this.isConnected&&(this.copyState=t?`copied`:`error`,this.copyResetTimer!==null&&globalThis.clearTimeout(this.copyResetTimer),this.copyResetTimer=globalThis.setTimeout(()=>{this.copyResetTimer=null,this.copyState=`idle`},X))}render(){let e=this.context.gateway.snapshot,t=e.phase===`connected`&&e.hello?.server?.version?.trim()||null,n=ce({buildInfo:x,gatewayVersion:t,copyState:this.copyState,onCopyCommit:()=>void this.copyCommit(),clawdWaving:this.clawdWaving,onPokeClawd:()=>this.pokeClawd()});return p`
|
|
<section class="content-header">
|
|
<div>
|
|
<div class="page-title">${ne(`about`)}</div>
|
|
</div>
|
|
</section>
|
|
${I(n)}
|
|
`}},n([w({context:ae,subscribe:!0})],Q.prototype,`context`,void 0),n([g()],Q.prototype,`copyState`,void 0),n([g()],Q.prototype,`clawdWaving`,void 0),customElements.get(`openclaw-about-page`)||customElements.define(`openclaw-about-page`,Q)})))()}$();
|
|
//# sourceMappingURL=about-page-BkgiwiuD.js.map
|