nová verze phanpy

This commit is contained in:
archos 2024-08-09 07:39:48 +02:00
parent 3b991dbb3c
commit c910224027
17 changed files with 300 additions and 7 deletions

View File

@ -0,0 +1,2 @@
import{h as w,I as p,U as S,y as i,c as e,C as f,Y as h}from"./useTitle-Mh8hVeGN.js";window.opener&&(console=window.opener.console);function m(){var s,a;const[t,d]=w("default"),{editStatus:n,replyToStatus:o,draftStatus:l}=window.__COMPOSE__||{};return p(n?"Editing source status":o?`Replying to @${((s=o.account)==null?void 0:s.acct)||((a=o.account)==null?void 0:a.username)}`:"Compose"),i(()=>{S()},[]),i(()=>{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(f,{editStatus:n,replyToStatus:o,draftStatus:l,standalone:!0,hasOpener:window.opener,onClose:c=>{const{newStatus:r,fn:u=()=>{}}=c||{};try{r&&window.opener.__STATES__.reloadStatusPage++,u(),d("closed")}catch{}}})}h(e(m,{}),document.getElementById("app-standalone"));
//# sourceMappingURL=compose-25Dzs_uX.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"compose-25Dzs_uX.js","sources":["../../src/compose.jsx"],"sourcesContent":["import './index.css';\nimport './app.css';\nimport './polyfills';\n\nimport { render } from 'preact';\nimport { useEffect, useState } from 'preact/hooks';\n\nimport ComposeSuspense from './components/compose-suspense';\nimport { initStates } from './utils/states';\nimport useTitle from './utils/useTitle';\n\nif (window.opener) {\n console = window.opener.console;\n}\n\nfunction App() {\n const [uiState, setUIState] = useState('default');\n\n const { editStatus, replyToStatus, draftStatus } = window.__COMPOSE__ || {};\n\n useTitle(\n editStatus\n ? 'Editing source status'\n : replyToStatus\n ? `Replying to @${\n replyToStatus.account?.acct || replyToStatus.account?.username\n }`\n : 'Compose',\n );\n\n useEffect(() => {\n initStates();\n }, []);\n\n useEffect(() => {\n if (uiState === 'closed') {\n try {\n // Focus parent window\n window.opener.focus();\n } catch (e) {}\n window.close();\n }\n }, [uiState]);\n\n if (uiState === 'closed') {\n return (\n <div class=\"box\">\n <p>You may close this page now.</p>\n <p>\n <button\n onClick={() => {\n window.close();\n }}\n >\n Close window\n </button>\n </p>\n </div>\n );\n }\n\n console.debug('OPEN COMPOSE');\n\n return (\n <ComposeSuspense\n editStatus={editStatus}\n replyToStatus={replyToStatus}\n draftStatus={draftStatus}\n standalone\n hasOpener={window.opener}\n onClose={(results) => {\n const { newStatus, fn = () => {} } = results || {};\n try {\n if (newStatus) {\n window.opener.__STATES__.reloadStatusPage++;\n }\n fn();\n setUIState('closed');\n } catch (e) {}\n }}\n />\n );\n}\n\nrender(<App />, document.getElementById('app-standalone'));\n"],"names":["window","opener","console","App","uiState","setUIState","useState","editStatus","replyToStatus","draftStatus","__COMPOSE__","account","acct","username","useEffect","initStates","focus","close","_jsxs","class","children","_jsx","onClick","standalone","hasOpener","newStatus","results","fn","render"],"mappings":"qFAWIA,OAAOC,SACTC,QAAUF,OAAOC,OAAOC,SAG1B,SAASC,GAAM,SACb,KAAM,CAACC,EAASC,CAAU,EAAIC,EAAS,SAAS,EAE1C,CAAEC,WAAAA,EAAYC,cAAAA,EAAeC,YAAAA,CAAAA,EAAgBT,OAAOU,aAAe,GA0BzE,OAvBEH,EAAAA,EACI,wBACAC,EACA,kBACEA,EAAAA,EAAcG,UAAdH,YAAAA,EAAuBI,SAAQJ,EAAAA,EAAcG,UAAdH,YAAAA,EAAuBK,SAAQ,GAEhE,SACN,EAEAC,EAAU,IAAM,CACHC,GACb,EAAG,CAAE,CAAA,EAELD,EAAU,IAAM,CACd,GAAIV,IAAY,SAAU,CACpB,GAAA,CAEFJ,OAAOC,OAAOe,aACJ,CAAC,CACbhB,OAAOiB,MAAM,CACf,CAAA,EACC,CAACb,CAAO,CAAC,EAERA,IAAY,SAEZc,EAAA,MAAA,CAAKC,MAAM,MAAKC,UACdC,EAAA,IAAA,CAAAD,SAAG,8BAAA,CAA+B,EAClCC,EAAA,IAAA,CAAAD,SACEC,EAAA,SAAA,CACEC,QAASA,IAAM,CACbtB,OAAOiB,MAAM,CACf,EAAEG,SACH,cAAA,CAEO,CAAA,CACP,CAAC,CAAA,CACD,EAITlB,IAA4B,CAE5B,WAAAK,EAEIA,cAAAA,EACAC,YAAAA,EACAC,WAAAA,GACAc,UAAU,OAAA,OACVC,WAAkBvB,OAEV,UAAAwB,EAAEA,GAAAA,EAAAA,IAAAA,EAAsB,EAACC,GAAA,CAAA,EAAE,GAAIA,CACjCD,GACF,OAAe,OAAA,WAAA,mBAEfE,IACGtB,EAAA,QAAA,CACHA,MAAAA,EACW,CAAA,CACf,CAAA,CAGNuB,EAAAP,EAAAlB,EAAA,CAAA,CAAA,EAAA,SAAA,eAAA,gBAAA,CAAA"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

183
assets/fuse-4Bvpr1kU.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
assets/index-CeOZgm-k.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

32
assets/main-Gn0PSoQw.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,8 +7,8 @@
<title>Compose / Phanpy</title> <title>Compose / Phanpy</title>
<meta name="color-scheme" content="dark light" /> <meta name="color-scheme" content="dark light" />
<meta name="google" content="notranslate" /> <meta name="google" content="notranslate" />
<script type="module" crossorigin src="../assets/compose-Q2Nvocbp.js"></script> <script type="module" crossorigin src="../assets/compose-25Dzs_uX.js"></script>
<link rel="modulepreload" crossorigin href="../assets/useTitle-v86HJIox.js"> <link rel="modulepreload" crossorigin href="../assets/useTitle-Mh8hVeGN.js">
<link rel="stylesheet" crossorigin href="../assets/style-Jyj9EDmC.css"> <link rel="stylesheet" crossorigin href="../assets/style-Jyj9EDmC.css">
<link rel="manifest" href="./manifest.webmanifest"><script id="vite-plugin-pwa:inline-sw">if('serviceWorker' in navigator) {window.addEventListener('load', () => {navigator.serviceWorker.register('./sw.js', { scope: './' })})}</script></head> <link rel="manifest" href="./manifest.webmanifest"><script id="vite-plugin-pwa:inline-sw">if('serviceWorker' in navigator) {window.addEventListener('load', () => {navigator.serviceWorker.register('./sw.js', { scope: './' })})}</script></head>
<body> <body>

View File

@ -55,11 +55,11 @@
content="Minimalistic opinionated Mastodon web client" content="Minimalistic opinionated Mastodon web client"
/> />
<meta property="og:image" content="https://phanpy.social/og-image-2.jpg" /> <meta property="og:image" content="https://phanpy.social/og-image-2.jpg" />
<script type="module" crossorigin src="./assets/main-t2P3iL-h.js"></script> <script type="module" crossorigin src="./assets/main-Gn0PSoQw.js"></script>
<link rel="modulepreload" crossorigin href="./assets/useTitle-v86HJIox.js"> <link rel="modulepreload" crossorigin href="./assets/useTitle-Mh8hVeGN.js">
<link rel="modulepreload" crossorigin href="./assets/tinyld-light-PxOyhYWY.js"> <link rel="modulepreload" crossorigin href="./assets/tinyld-light-PxOyhYWY.js">
<link rel="modulepreload" crossorigin href="./assets/index-5wlk767u.js"> <link rel="modulepreload" crossorigin href="./assets/index-CeOZgm-k.js">
<link rel="modulepreload" crossorigin href="./assets/fuse-rEcEZtAj.js"> <link rel="modulepreload" crossorigin href="./assets/fuse-4Bvpr1kU.js">
<link rel="stylesheet" crossorigin href="./assets/style-Jyj9EDmC.css"> <link rel="stylesheet" crossorigin href="./assets/style-Jyj9EDmC.css">
<link rel="manifest" href="./manifest.webmanifest"><script id="vite-plugin-pwa:inline-sw">if('serviceWorker' in navigator) {window.addEventListener('load', () => {navigator.serviceWorker.register('./sw.js', { scope: './' })})}</script></head> <link rel="manifest" href="./manifest.webmanifest"><script id="vite-plugin-pwa:inline-sw">if('serviceWorker' in navigator) {window.addEventListener('load', () => {navigator.serviceWorker.register('./sw.js', { scope: './' })})}</script></head>
<body> <body>

View File

@ -1 +1 @@
{"buildTime":"2024-08-05T02:05:24.846Z","commitHash":"2b572aa"} {"buildTime":"2024-08-08T01:46:42.798Z","commitHash":"dabb480"}