phanpy/assets/compose-K6njseaM.js
Lim Chee Aun 393e9a0495 Imported from 2024.02.03.35a31e1.tar.gz.
SHA256:b8034ef0df199436d8e8c0ca05b24a2e161dcd9d1789599b74f7bde41d6a56f9
2024-02-20 12:55:50 +00:00

3 lines
987 B
JavaScript

import{W as u,G as p}from"./useTitle-Dle6_vca.js";import{h as w,p as f,a as e,K as m}from"./vendor-dr6WACk1.js";window.opener&&(console=window.opener.console);function S(){var s,a;const[t,i]=w("default"),{editStatus:n,replyToStatus:o,draftStatus:d}=window.__COMPOSE__||{};return u(n?"Editing source status":o?`Replying to @${((s=o.account)==null?void 0:s.acct)||((a=o.account)==null?void 0:a.username)}`:"Compose"),f(()=>{if(t==="closed"){try{window.opener.focus()}catch{}window.close()}},[t]),t==="closed"?e("div",{class:"box",children:[e("p",{children:"You may close this page now."}),e("p",{children:e("button",{onClick:()=>{window.close()},children:"Close window"})})]}):e(p,{editStatus:n,replyToStatus:o,draftStatus:d,standalone:!0,hasOpener:window.opener,onClose:c=>{const{newStatus:r,fn:l=()=>{}}=c||{};try{r&&window.opener.__STATES__.reloadStatusPage++,l(),i("closed")}catch{}}})}m(e(S,{}),document.getElementById("app-standalone"));
//# sourceMappingURL=compose-K6njseaM.js.map