writedock-mcp 0.4.2 → 0.4.6
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 +87 -63
- package/extension/LICENSE-MULTIPOST.txt +201 -0
- package/extension/LICENSE.txt +674 -0
- package/extension/NOTICE.txt +13 -0
- package/extension/assets/editor-DWoK50xk.js +76 -0
- package/extension/assets/editor-VBFqqvXW.css +1 -0
- package/extension/assets/icon-128.png +0 -0
- package/extension/assets/icon-16.png +0 -0
- package/extension/assets/icon-48.png +0 -0
- package/extension/assets/index.browser-Hs3ZYqOv.js +157 -0
- package/extension/assets/index.ts-DbQynGAJ.js +42 -0
- package/extension/assets/logo.svg +5 -0
- package/extension/assets/offscreen-3BECPbQX.js +63 -0
- package/extension/assets/purify.es-1yEQDPgc.js +3 -0
- package/extension/assets/react-vendor-BrXlnJmF.js +40 -0
- package/extension/assets/task-utils-DwzGcJkm.js +1 -0
- package/extension/manifest.json +40 -0
- package/extension/service-worker-loader.js +1 -0
- package/extension/src/editor/index.html +16 -0
- package/extension/src/offscreen/index.html +6 -0
- package/extension/zhihu-publication-observer.js +1 -0
- package/extension//345/256/211/350/243/205/344/270/216/346/233/264/346/226/260.txt +19 -0
- package/index.cjs +330 -69
- package/package.json +3 -2
- package/source/package.json +1 -1
- package/source/src/__tests__/bridge.test.ts +22 -0
- package/source/src/__tests__/extension-update.test.ts +54 -0
- package/source/src/__tests__/setup.test.ts +50 -0
- package/source/src/bridge.ts +40 -11
- package/source/src/extension-id.ts +2 -0
- package/source/src/extension-update.ts +82 -0
- package/source/src/index.ts +3 -0
- package/source/src/release-info.ts +3 -0
- package/source/src/server.ts +45 -3
- package/source/src/setup.ts +88 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# WriteDock attribution
|
|
2
|
+
|
|
3
|
+
WriteDock(写作台)is a modified work based in part on [Wechatsync](https://github.com/wechatsync/Wechatsync).
|
|
4
|
+
|
|
5
|
+
The public platform adapters in `packages/core`, the extension runtime, and portions of DOM preprocessing retain upstream copyright notices and are distributed under the GNU General Public License version 3. See [LICENSE](LICENSE).
|
|
6
|
+
|
|
7
|
+
The upstream source revision is recorded in [UPSTREAM.json](UPSTREAM.json). Private Wechatsync submodules, proprietary adapters, original branding assets, remote configuration, promotional UI, and analytics are not included.
|
|
8
|
+
|
|
9
|
+
WriteDock changes include an agent-oriented MCP service, an authenticated loopback bridge, request deduplication, local article previews, account and task management, and offscreen article preprocessing. The transport architecture references the public Wechatsync MCP server package (declared MIT upstream); no private adapter submodule is included.
|
|
10
|
+
|
|
11
|
+
The MCP SDK, ws, marked, YAML, linkedom, Zod, React, Lucide, DOMPurify, Vite, and other dependencies retain their respective licenses. Dependency licenses are available in their packages.
|
|
12
|
+
|
|
13
|
+
The creator-page automation for Xiaohongshu and Douyin references the public MultiPost-Extension project (https://github.com/leaperone/MultiPost-Extension), revision 5522ca01100a58572de3a652aebd7851f5fa648a. Its File/DataTransfer upload approach and creator-page selectors are adapted under Apache-2.0; see LICENSE-MULTIPOST. WriteDock adds MCP media grants, bounded chunk transfer, task/result tracking and publication deduplication.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import{p as he}from"./purify.es-1yEQDPgc.js";import{r as i,j as e,c as ue}from"./react-vendor-BrXlnJmF.js";import{S as H,s as V,e as xe}from"./task-utils-DwzGcJkm.js";/**
|
|
2
|
+
* @license lucide-react v0.303.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/var pe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
7
|
+
* @license lucide-react v0.303.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const me=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),j=(t,o)=>{const l=i.forwardRef(({color:E="currentColor",size:d=24,strokeWidth:N=2,absoluteStrokeWidth:m,className:g="",children:x,...C},c)=>i.createElement("svg",{ref:c,...pe,width:d,height:d,stroke:E,strokeWidth:m?Number(N)*24/Number(d):N,className:["lucide",`lucide-${me(t)}`,g].join(" "),...C},[...o.map(([f,u])=>i.createElement(f,u)),...Array.isArray(x)?x:[x]]));return l.displayName=`${t}`,l};/**
|
|
12
|
+
* @license lucide-react v0.303.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const Q=j("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
17
|
+
* @license lucide-react v0.303.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const O=j("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
22
|
+
* @license lucide-react v0.303.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const q=j("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]);/**
|
|
27
|
+
* @license lucide-react v0.303.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const je=j("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
32
|
+
* @license lucide-react v0.303.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const U=j("FileText",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["line",{x1:"16",x2:"8",y1:"13",y2:"13",key:"14keom"}],["line",{x1:"16",x2:"8",y1:"17",y2:"17",key:"17nazh"}],["line",{x1:"10",x2:"8",y1:"9",y2:"9",key:"1a5vjj"}]]);/**
|
|
37
|
+
* @license lucide-react v0.303.0 - ISC
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the ISC license.
|
|
40
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/const G=j("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
|
42
|
+
* @license lucide-react v0.303.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/const fe=j("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
47
|
+
* @license lucide-react v0.303.0 - ISC
|
|
48
|
+
*
|
|
49
|
+
* This source code is licensed under the ISC license.
|
|
50
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
+
*/const W=j("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
|
|
52
|
+
* @license lucide-react v0.303.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const K=j("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
57
|
+
* @license lucide-react v0.303.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/const Y=j("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
62
|
+
* @license lucide-react v0.303.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const ye=j("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
67
|
+
* @license lucide-react v0.303.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const ve=j("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
|
|
72
|
+
* @license lucide-react v0.303.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const ee=j("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);async function ke(){return(await chrome.storage.local.get(H.draftIndex))[H.draftIndex]||[]}async function Ne(t){const o=`writedockDraft:${t}`;return(await chrome.storage.local.get(o))[o]||null}async function ge(t){return T("DELETE_DRAFT",{draftId:t})}async function T(t,o={}){const l=await chrome.runtime.sendMessage({type:t,...o});if(l!=null&&l.error)throw new Error(l.error);if(!l||!("data"in l))throw new Error("扩展后台未响应,请在扩展管理页重新加载 WriteDock");return l.data}function we({bridge:t,busy:o,syncing:l,update:E,pair:d,connect:N,updateExtension:m,copy:g}){const[x,C]=i.useState(String(t.port)),[c,f]=i.useState(t.serverPath),[u,b]=i.useState("");i.useEffect(()=>C(String(t.port)),[t.port]),i.useEffect(()=>f(t.serverPath),[t.serverPath]);const w="帮我安装 WriteDock:运行 npx -y writedock-mcp@latest setup,然后告诉我怎么重启你。",y={WRITEDOCK_PORT:String(t.port)},S=()=>JSON.stringify({mcpServers:{writedock:{command:"node",args:[t.serverPath],env:y}}},null,2),I=[t.mcpVersion?`服务版本 v${t.mcpVersion}`:"",t.connected&&t.mcpLatestVersion?`最新 v${t.mcpLatestVersion}`:""].filter(Boolean).join(" · ");return e.jsxs("div",{className:"connection-page",children:[t.connected?e.jsxs("section",{className:"panel",children:[e.jsx("div",{className:"panel-heading",children:e.jsxs("div",{children:[e.jsxs("h2",{children:[e.jsx(Q,{size:16})," 已连接"]}),e.jsxs("p",{children:["告诉你的 agent 要写什么、发到哪些平台就行。",I&&` ${I}`]})]})}),t.mcpUpdateAvailable&&e.jsx("p",{className:"help-text",role:"status",children:"有新版本。等发布结束后重启你的 agent 就会更新,不用重新连接。"})]}):t.mcpFound?e.jsxs("section",{className:"panel",children:[e.jsx("h2",{children:"发现本机的 WriteDock 服务"}),e.jsxs("p",{className:"help-text",children:[t.mcpFoundVersion?`服务版本 v${t.mcpFoundVersion}。`:"","点一下就能连上,以后会自动连接。"]}),e.jsx("div",{className:"settings-actions",children:e.jsx("button",{className:"primary-button",disabled:o||l,onClick:()=>void N(),children:o?"正在连接…":"连接"})})]}):e.jsxs("section",{className:"panel",children:[e.jsx("h2",{children:"把这句话发给你的 agent"}),e.jsx("p",{className:"help-text",children:"它会帮你装好服务。需要电脑上有 Node.js 22 或更高版本。"}),e.jsx("pre",{tabIndex:0,className:"setup-sentence",children:w}),e.jsx("div",{className:"settings-actions",children:e.jsxs("button",{className:"primary-button",onClick:()=>void g(w),children:[e.jsx(O,{size:14}),"复制这句话"]})}),e.jsx("p",{className:"help-text",children:"agent 重启后,这里会出现“连接”按钮。"})]}),t.connected&&t.extensionUpdateVersion&&e.jsxs("section",{className:"panel",children:[e.jsxs("h2",{children:["扩展有新版本 v",t.extensionUpdateVersion]}),e.jsx("p",{className:"help-text",children:"点一下就能更新,连接和稿件都会保留。"}),e.jsx("div",{className:"settings-actions",children:e.jsx("button",{className:"primary-button",disabled:o||l,onClick:()=>void m(),children:o?"正在更新…":"更新扩展"})}),l&&e.jsx("p",{className:"help-text",children:"发布结束后才能更新。"})]}),e.jsxs("section",{className:"panel compact",children:[e.jsx("h2",{children:"怎么用"}),e.jsxs("ol",{children:[e.jsx("li",{children:"在「平台账号」里确认要发布的平台已登录。"}),e.jsx("li",{children:"告诉 agent 写什么、发到哪些平台。"}),e.jsx("li",{children:"遇到验证码时,agent 会告诉你去哪个页面完成。"})]})]}),e.jsxs("details",{className:"panel developer-settings",children:[e.jsx("summary",{children:"高级设置"}),e.jsx("p",{className:"help-text",children:"通常不需要动这里。"}),e.jsxs("label",{children:["启用自动连接",e.jsx("button",{role:"switch","aria-label":"启用 MCP 连接","aria-checked":t.enabled,className:`switch ${t.enabled?"on":""}`,disabled:o||l,onClick:()=>E({enabled:!t.enabled}),children:e.jsx("span",{})})]}),e.jsxs("form",{onSubmit:v=>{v.preventDefault(),!o&&!l&&u.trim()&&d(u).then(h=>{h&&b("")})},children:[e.jsxs("label",{children:["一次性配对码(仅旧版服务需要)",e.jsx("input",{"aria-label":"一次性配对码",value:u,onChange:v=>b(v.target.value),autoComplete:"off",spellCheck:!1,placeholder:"WD1-9647-XXXX-XXXX-XXXX-XXXX",disabled:o||l})]}),e.jsx("div",{className:"settings-actions",children:e.jsx("button",{className:"secondary-button",type:"submit",disabled:o||l||!u.trim(),children:o?"正在配对…":"配对并连接"})})]}),e.jsxs("div",{className:"settings-grid",children:[e.jsxs("label",{children:["连接端口",e.jsx("input",{"aria-label":"连接端口",inputMode:"numeric",value:x,onChange:v=>C(v.target.value)})]}),e.jsxs("label",{children:["当前浏览器配对密钥",e.jsxs("div",{className:"input-action",children:[e.jsx("input",{"aria-label":"连接密钥",type:"password",readOnly:!0,value:t.token}),e.jsx("button",{className:"icon-button","aria-label":"复制连接密钥",onClick:()=>g(t.token),children:e.jsx(O,{size:14})})]})]})]}),e.jsx("div",{className:"settings-actions",children:e.jsx("button",{className:"secondary-button",disabled:o||l||x===String(t.port),onClick:()=>E({port:Number(x)}),children:"保存端口"})}),e.jsxs("label",{className:"path-setting",children:["本机开发服务路径",e.jsx("input",{"aria-label":"本机开发服务路径",placeholder:"已构建的 packages/mcp-server/dist/index.cjs 路径",value:c,onChange:v=>f(v.target.value)})]}),e.jsxs("div",{className:"settings-actions",children:[e.jsx("button",{className:"secondary-button",disabled:o||c===t.serverPath,onClick:()=>E({serverPath:c}),children:"保存开发路径"}),e.jsx("button",{className:"secondary-button",disabled:!t.serverPath||c!==t.serverPath,onClick:()=>g(S()),children:"复制本机开发配置"})]})]})]})}const Z=t=>new Intl.DateTimeFormat("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).format(t),L=t=>t.trim()||"未命名稿件",be={syncing:"正在保存",completed:"已保存草稿",partial:"部分成功",failed:"失败",interrupted:"中断了",unknown:"请去平台确认",needs_user_action:"需要你处理",rehearsed:"演练完成"},se={syncing:"正在发布",completed:"已发布",partial:"部分成功",failed:"发布失败",interrupted:"中断了",unknown:"请去平台确认",needs_user_action:"需要你处理",rehearsed:"演练完成"},Ee={...se,syncing:"正在演练",completed:"演练完成",partial:"部分通过",failed:"演练失败"},Ce={pending:"排队中",checking_auth:"检查登录",uploading_images:"上传图片",transferring_media:"读取素材",uploading_media:"上传素材",preparing_article:"准备内容",publishing:"发布中",verifying:"等待平台确认",saving:"保存草稿",completed:"完成",failed:"失败",unknown:"请去平台确认",needs_user_action:"需要你处理",waiting_verification:"等你完成验证"},Te=t=>(t.videos||[]).reduce((o,l)=>o.replace(l.marker,`视频:${xe(l.asset.name)}`),t.html),Se=t=>t.publicationState==="rehearsed"?"演练通过,未发布":t.errorCode==="not_logged_in"?"未登录,已跳过":t.publicationState==="needs_user_action"?"需要你处理":t.publicationState==="unknown"?"请去平台确认":t.success?t.draftOnly===!1?"已发布":"已保存草稿":"失败";function J({title:t,children:o,close:l,wide:E=!1}){const d=i.useRef(null),N=i.useRef(l);return N.current=l,i.useEffect(()=>{var x,C;const m=document.activeElement;(C=(x=d.current)==null?void 0:x.querySelector("button"))==null||C.focus();const g=c=>{var w;if(c.key==="Escape"){c.preventDefault(),N.current();return}if(c.key!=="Tab")return;const f=Array.from(((w=d.current)==null?void 0:w.querySelectorAll('button:not(:disabled), a[href], input, [tabindex="0"]'))||[]),u=f[0],b=f.at(-1);c.shiftKey&&document.activeElement===u?(c.preventDefault(),b==null||b.focus()):!c.shiftKey&&document.activeElement===b&&(c.preventDefault(),u==null||u.focus())};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g),m==null||m.focus()}},[]),e.jsx("div",{className:"modal-backdrop",onMouseDown:m=>{m.target===m.currentTarget&&l()},children:e.jsxs("section",{className:`modal ${E?"wide":""}`,ref:d,role:"dialog","aria-modal":"true","aria-label":t,children:[e.jsxs("header",{children:[e.jsx("h2",{children:t}),e.jsx("button",{className:"icon-button","aria-label":"关闭弹窗",onClick:l,children:e.jsx(ee,{size:18})})]}),o]})})}function _e(){const[t,o]=i.useState("tasks"),[l,E]=i.useState([]),[d,N]=i.useState(null),[m,g]=i.useState([]),[x,C]=i.useState([]),[c,f]=i.useState(null),[u,b]=i.useState(!1),[w,y]=i.useState(!1),[S,I]=i.useState(!1),[v,h]=i.useState(""),[D,P]=i.useState(null),[X,z]=i.useState(null),R=i.useRef(!1),_=i.useCallback(async()=>{const[s,r,n]=await Promise.all([ke(),T("GET_SYNC_STATE"),T("GET_SYNC_HISTORY")]);E(s),N(r),g(n)},[]),A=i.useCallback(async()=>{const s=await T("GET_BRIDGE_STATE");return f(s),s},[]),$=i.useCallback(async(s=!1)=>{b(!0);try{C(await T("CHECK_ALL_AUTH",{forceRefresh:s}))}catch(r){h(r instanceof Error?r.message:"登录检测失败")}finally{b(!1)}},[]);i.useEffect(()=>{let s=!1;Promise.all([_(),A()]).then(([,a])=>{s||(a.connected||o("connection"),I(!0),$())}).catch(a=>h(String(a.message||a)));const r=a=>(a.type==="TASK_UPDATED"&&a.task&&(N(a.task),a.task.status!=="syncing"&&_().catch(()=>{})),["DRAFT_SAVED","DRAFT_DELETED"].includes(a.type)&&(a.type==="DRAFT_DELETED"&&(P(p=>(p==null?void 0:p.id)===a.draftId?null:p),N(p=>(p==null?void 0:p.draftId)===a.draftId?null:p),g(p=>p.filter(k=>k.draftId!==a.draftId))),_().catch(()=>{})),a.type==="BRIDGE_STATUS_UPDATED"&&A().catch(()=>{}),!1);chrome.runtime.onMessage.addListener(r);const n=()=>{R.current&&(R.current=!1,$(!0))};return window.addEventListener("focus",n),()=>{s=!0,chrome.runtime.onMessage.removeListener(r),window.removeEventListener("focus",n)}},[_,A,$]),i.useEffect(()=>{if(t!=="connection"||c!=null&&c.connected)return;const s=setInterval(()=>{A().catch(()=>{})},3e3);return()=>clearInterval(s)},[t,c==null?void 0:c.connected,A]),i.useEffect(()=>{if(!v)return;const s=setTimeout(()=>h(""),7e3);return()=>clearTimeout(s)},[v]);const te=async s=>{y(!0);try{f(await T("SET_BRIDGE_CONFIG",{payload:s}))}catch(r){h(r instanceof Error?r.message:"连接设置保存失败")}finally{y(!1)}},ae=async()=>{y(!0);try{return f(await T("CONNECT_BRIDGE")),!0}catch(s){return h(s instanceof Error?s.message:"连接失败"),!1}finally{y(!1)}},ne=async()=>{y(!0);try{await T("UPDATE_EXTENSION"),h("更新完成,正在重新加载")}catch(s){h(s instanceof Error?s.message:"更新失败")}finally{y(!1)}},ce=async s=>{y(!0);try{return f(await T("PAIR_BRIDGE",{code:s})),h("正在连接"),!0}catch(r){return h(r instanceof Error?r.message:"配对失败"),!1}finally{y(!1)}},F=(s,r=!1)=>{const n=V(s);n&&(async()=>{if(r){const a=new URL(n),k=(await chrome.tabs.query({})).find(de=>{try{const M=new URL(de.url||"");return M.origin===a.origin&&M.pathname===a.pathname&&(a.searchParams.has("article_id")?M.searchParams.get("article_id")===a.searchParams.get("article_id"):a.hash?M.hash===a.hash:M.href===a.href)}catch{return!1}});if(k!=null&&k.id){await chrome.tabs.update(k.id,{active:!0}),await chrome.windows.update(k.windowId,{focused:!0});return}}await chrome.tabs.create({url:n})})().catch(a=>h(a instanceof Error?a.message:"无法打开稿件页"))},re=async s=>{try{await navigator.clipboard.writeText(s),h("已复制")}catch{h("复制失败,请选中文字后复制")}},B=d?[d,...m.filter(s=>s.id!==d.id)]:m,ie=s=>{var r;return((r=x.find(n=>n.id===s))==null?void 0:r.name)||s},le=x.filter(s=>s.isAuthenticated).length,oe=s=>e.jsxs("section",{className:"task-card","aria-label":`任务:${s.title}`,children:[e.jsxs("div",{className:"task-title",children:[e.jsxs("div",{children:[e.jsx("h3",{children:L(s.title)}),e.jsx("span",{children:Z(s.startedAt)})]}),e.jsxs("span",{className:`task-status ${s.status}`,children:[s.status==="syncing"&&e.jsx(K,{size:13,className:"spin"}),(s.action==="rehearsal"?Ee:s.action==="publish"?se:be)[s.status]]})]}),e.jsx("div",{className:"task-result-list",children:s.platforms.map(r=>{var p;const n=s.results.find(k=>k.platform===r),a=s.progress[r];return e.jsxs("div",{className:"task-result",children:[e.jsxs("div",{children:[e.jsx("strong",{children:ie(r)}),e.jsxs("span",{className:(n==null?void 0:n.publicationState)==="needs_user_action"||(a==null?void 0:a.stage)==="waiting_verification"?"manual-text":n!=null&&n.success||(n==null?void 0:n.publicationState)==="rehearsed"?"success-text":n?"error-text":"",children:[n?Se(n):Ce[(a==null?void 0:a.stage)||"pending"],(a==null?void 0:a.stage)==="uploading_images"&&a.total?` ${a.current}/${a.total}`:"",(a==null?void 0:a.stage)==="transferring_media"&&a.total?` ${((a.current||0)/1048576).toFixed(1)} / ${(a.total/1048576).toFixed(1)} MB`:""]}),n&&(n.success||n.draftOnly===!1)&&V(((p=n.userAction)==null?void 0:p.url)||n.postUrl)&&e.jsxs("button",{className:"link-button",onClick:()=>{var k;return F(((k=n.userAction)==null?void 0:k.url)||n.postUrl,n.requiresUserAction===!0)},children:[n.requiresUserAction?"去页面处理":n.publicationState==="unknown"?"去平台确认":n.publicationState==="rehearsed"?"查看页面":n.draftOnly===!1?"查看":"打开草稿",e.jsx(q,{size:12})]})]}),(n==null?void 0:n.error)&&e.jsx("p",{className:"error-text",children:n.error}),(n==null?void 0:n.message)&&!n.success&&e.jsx("p",{children:n.message}),!n&&(a==null?void 0:a.message)&&e.jsx("p",{children:a.message})]},r)})}),s.error&&e.jsx("p",{className:"error-text task-error",children:s.error}),e.jsx("footer",{children:s.action==="rehearsal"?`演练 ${s.results.filter(r=>r.publicationState==="rehearsed").length} / ${s.platforms.length} 个平台通过`:`${s.results.filter(r=>r.success).length} / ${s.platforms.length} 个平台成功`})]},s.id);return e.jsxs("div",{className:"console-shell",children:[e.jsxs("header",{className:"app-header",children:[e.jsxs("div",{className:"brand",children:[e.jsx("img",{src:"/assets/icon-48.png",width:"26",height:"26",alt:""}),e.jsx("strong",{children:"WriteDock"})]}),e.jsxs("button",{className:`connection-indicator ${c!=null&&c.connected?"online":""}`,onClick:()=>o("connection"),children:[e.jsx("span",{}),c!=null&&c.connected?"已连接":"未连接"]})]}),e.jsxs("aside",{className:"navigation",children:[e.jsx("nav",{"aria-label":"控制台导航",children:[["tasks",G,"发布记录"],["accounts",ve,"平台登录"],["articles",U,"稿件"],["connection",W,"连接 agent"]].map(([s,r,n])=>e.jsxs("button",{className:t===s?"selected":"",onClick:()=>o(s),children:[e.jsx(r,{size:17}),n,s==="tasks"&&(d==null?void 0:d.status)==="syncing"&&e.jsx("span",{className:"nav-dot"}),s==="connection"&&((c==null?void 0:c.mcpUpdateAvailable)||(c==null?void 0:c.extensionUpdateVersion))&&e.jsx("span",{className:"nav-dot",title:"有新版本"})]},s))}),e.jsxs("footer",{children:[e.jsx(fe,{size:13}),e.jsxs("span",{children:["v",chrome.runtime.getManifest().version]})]})]}),e.jsxs("main",{className:"console-main",children:[e.jsxs("div",{className:"page-heading",children:[e.jsxs("div",{children:[e.jsx("h1",{children:{articles:"稿件",tasks:"发布记录",accounts:"平台登录",connection:"连接 agent"}[t]}),e.jsx("p",{children:{articles:"agent 写好的内容,可以在这里预览。",tasks:"每次发布到各平台的结果。",accounts:"在这个浏览器里登录要发布的平台。",connection:"连上后,你的 agent 就能把内容发到这个浏览器。"}[t]})]}),t==="articles"&&e.jsxs("button",{className:"secondary-button",onClick:()=>void _().catch(s=>h(s.message)),children:[e.jsx(Y,{size:14}),"刷新"]}),t==="accounts"&&e.jsxs("button",{className:"secondary-button",disabled:u,onClick:()=>$(!0),children:[e.jsx(Y,{size:14,className:u?"spin":""}),"重新检查"]})]}),!S&&e.jsxs("div",{className:"empty-state",children:[e.jsx(K,{className:"spin",size:24}),e.jsx("p",{children:"正在加载…"})]}),S&&t==="articles"&&e.jsxs(e.Fragment,{children:[!(c!=null&&c.connected)&&e.jsxs("div",{className:"connection-banner",children:[e.jsx(W,{size:17}),e.jsx("span",{children:c!=null&&c.mcpFound?"发现本机的 WriteDock 服务,点一下就能连接。":"还没有连接到你的 agent。"}),e.jsx("button",{className:"link-button",onClick:()=>o("connection"),children:"去连接"})]}),l.length===0?e.jsxs("div",{className:"empty-state bordered",children:[e.jsx(U,{size:30}),e.jsx("h2",{children:"还没有稿件"}),e.jsx("p",{children:"告诉你的 agent 要写什么,内容会出现在这里。"})]}):e.jsx("div",{className:"article-list",children:l.map(s=>e.jsxs("article",{className:"article-row",children:[e.jsx(U,{size:19}),e.jsxs("div",{children:[e.jsx("h2",{children:L(s.title)}),e.jsx("p",{children:Z(s.updatedAt)})]}),e.jsxs("button",{className:"secondary-button","aria-label":`预览稿件:${L(s.title)}`,onClick:()=>void Ne(s.id).then(r=>r&&P(r)),children:[e.jsx(je,{size:14}),"预览"]}),e.jsx("button",{className:"icon-button","aria-label":`删除稿件:${L(s.title)}`,disabled:(d==null?void 0:d.status)==="syncing"&&d.draftId===s.id,onClick:()=>z(s),children:e.jsx(ye,{size:15})})]},s.id))}),e.jsx("p",{className:"footnote",children:"稿件只保存在这台电脑上。"})]}),S&&t==="tasks"&&(B.length?e.jsx("div",{className:"task-list",children:B.map(oe)}):e.jsxs("div",{className:"empty-state bordered",children:[e.jsx(G,{size:30}),e.jsx("h2",{children:"还没有发布记录"}),e.jsx("p",{children:"让 agent 发布后,这里会显示每个平台的结果。"})]})),S&&t==="accounts"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"section-summary",children:["已登录 ",le," / ",x.length," 个平台",e.jsx("span",{children:u?"正在检查…":""})]}),e.jsx("div",{className:"account-grid",children:x.map(s=>e.jsxs("section",{className:"account-card",children:[e.jsxs("div",{children:[e.jsx("h2",{children:s.name}),e.jsx("span",{className:s.isAuthenticated?"success-text":"",children:s.isAuthenticated?s.username||"已登录":u&&!s.checked?"检查中…":s.error?"暂时查不到":"未登录"})]}),e.jsx("div",{children:e.jsxs("button",{className:"secondary-button","aria-label":`打开${s.name}`,onClick:()=>{R.current=!0,F(s.homepage)},children:[s.isAuthenticated?"打开":"去登录",e.jsx(q,{size:12})]})})]},s.id))}),e.jsx("p",{className:"footnote",children:"登录后回到这里会自动更新。显示“暂时查不到”时,可以打开平台确认后点“重新检查”。"})]}),S&&t==="connection"&&c&&e.jsx(we,{bridge:c,busy:w,syncing:(d==null?void 0:d.status)==="syncing",update:te,pair:ce,connect:ae,updateExtension:ne,copy:re})]}),v&&e.jsxs("div",{className:"toast",role:"status",children:[e.jsx(Q,{size:16}),e.jsx("span",{children:v}),e.jsx("button",{className:"icon-button","aria-label":"关闭提示",onClick:()=>h(""),children:e.jsx(ee,{size:15})})]}),D&&e.jsx(J,{title:"稿件预览",close:()=>P(null),wide:!0,children:e.jsxs("div",{className:"preview-content",children:[D.cover&&e.jsx("img",{className:"preview-cover",src:D.cover,alt:"文章封面"}),e.jsx("h1",{children:L(D.title)}),e.jsx("div",{className:"article-content",dangerouslySetInnerHTML:{__html:he.sanitize(Te(D))}})]})}),X&&e.jsx(J,{title:"删除这篇稿件?",close:()=>{w||z(null)},children:e.jsxs("div",{className:"modal-content",children:[e.jsx("p",{children:"只删除这台电脑上的稿件和记录,已发到平台的内容不受影响。"}),e.jsxs("div",{className:"modal-actions",children:[e.jsx("button",{className:"secondary-button",disabled:w,onClick:()=>z(null),children:"保留稿件"}),e.jsx("button",{className:"danger-button",disabled:w,onClick:async()=>{y(!0);try{await ge(X.id),z(null),await _()}catch(s){h(s instanceof Error?s.message:"删除失败")}finally{y(!1)}},children:w?"正在删除…":"删除稿件"})]})]})})]})}ue(document.getElementById("root")).render(e.jsx(i.StrictMode,{children:e.jsx(_e,{})}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Microsoft YaHei,sans-serif;color:#272b33;background:#f5f6f8;font-synthesis:none;--border: #e0e4e9;--muted: #717986;--blue: #2563eb}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer;color:inherit}button:disabled{cursor:default;opacity:.45}button svg{flex-shrink:0}button:focus-visible,input:focus-visible,summary:focus-visible,a:focus-visible,pre:focus-visible{outline:2px solid var(--blue);outline-offset:3px}.console-shell{display:grid;grid-template:56px minmax(0,1fr) / 192px minmax(0,1fr);height:100vh;height:100dvh;overflow:hidden;font-size:14px}.app-header{grid-column:1 / -1;display:flex;align-items:center;justify-content:space-between;padding:0 24px;background:#fff;border-bottom:1px solid var(--border)}.brand{display:flex;align-items:center;gap:10px}.brand img{border-radius:5px}.brand strong{font-size:16px;font-weight:600}.brand>span{margin-left:7px;padding-left:16px;border-left:1px solid var(--border);font-size:13px;color:var(--muted)}.connection-indicator{display:flex;align-items:center;gap:7px;padding:6px 0;border:0;background:transparent;color:#66707e;font-size:12px}.connection-indicator>span{width:6px;height:6px;border-radius:50%;background:#a1a8b3}.connection-indicator.online>span{background:#40845c}.navigation{display:flex;flex-direction:column;padding:25px 12px 18px;border-right:1px solid var(--border);background:#fafbfc}.navigation nav{display:grid;gap:6px}.navigation nav>button{display:flex;align-items:center;gap:11px;min-height:40px;padding:10px 13px;border:0;border-radius:5px;background:transparent;text-align:left;font-size:13px;color:#65707f}.navigation nav>button:hover{background:#eef0f4}.navigation nav>button.selected{background:#e9ecf1;color:#252b34;font-weight:500}.nav-dot{width:5px;height:5px;border-radius:50%;background:var(--blue);margin-left:auto}.navigation>footer{display:flex;align-items:center;gap:6px;margin-top:auto;padding:15px 8px 0;color:#838b97;font-size:11px}.console-main{min-width:0;padding:32px 40px 40px;overflow-y:auto}.console-main>*{max-width:1180px;margin-left:auto;margin-right:auto}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:28px}h1,h2,h3,p{margin:0}.page-heading h1{margin-bottom:9px;font-size:23px;font-weight:600;letter-spacing:-.5px}.page-heading p{color:var(--muted);font-size:13px;line-height:1.7}.primary-button,.secondary-button,.danger-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:7px 12px;border:1px solid #d1d7df;border-radius:4px;background:#fff;font-size:12px;line-height:1.5;white-space:nowrap}.secondary-button:hover:not(:disabled){background:#f2f4f7;border-color:#b8c0cc}.primary-button{text-decoration:none;background:var(--blue);border-color:var(--blue);color:#fff}.primary-button:hover:not(:disabled){background:#1e55cc}.danger-button{background:#b9382b;border-color:#b9382b;color:#fff}.icon-button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:30px;height:30px;border:0;border-radius:4px;background:transparent;color:#7b8390}.icon-button:hover:not(:disabled){background:#edf0f4;color:#303640}.link-button{display:inline-flex;align-items:center;gap:4px;padding:0;border:0;background:transparent;color:#42669e;font-size:12px;line-height:1.7}.link-button:hover{text-decoration:underline}.connection-banner{display:flex;align-items:center;gap:9px;padding:14px 17px;margin-bottom:20px;border:1px solid #dce2ea;border-radius:5px;background:#fff;color:#626e7e;font-size:13px;line-height:1.7}.connection-banner>svg{flex-shrink:0}.connection-banner .link-button{margin-left:auto;flex-shrink:0}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:320px;padding:45px 30px;color:#929ba8;text-align:center}.empty-state.bordered{background:#fff;border:1px solid var(--border);border-radius:6px;min-height:390px}.empty-state h2{margin-top:20px;color:#4b5665;font-size:15px;font-weight:500}.empty-state p{max-width:490px;margin-top:12px;color:#7c8593;font-size:13px;line-height:1.9}.empty-state .secondary-button{margin-top:23px}.footnote{margin-top:17px;color:#818a98;font-size:12px;line-height:1.9}.article-list{border:1px solid var(--border);border-radius:6px;background:#fff;overflow:hidden}.article-row{display:flex;align-items:center;gap:16px;padding:22px 23px;border-bottom:1px solid #e9ecf0}.article-row:last-child{border:0}.article-row>svg{color:#8a94a2;flex-shrink:0}.article-row>div{flex:1;min-width:0}.article-row h2{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-bottom:8px;font-size:14px;font-weight:500;line-height:1.5}.article-row p{color:#848d9a;font-size:11px}.task-list{display:grid;gap:19px}.task-card{overflow:hidden;border:1px solid var(--border);border-radius:6px;background:#fff}.task-title{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:20px 23px}.task-title>div{min-width:0}.task-title h3{margin-bottom:9px;font-size:15px;font-weight:500;line-height:1.6}.task-title>div>span{color:#8c94a0;font-family:inherit;font-size:11px;overflow-wrap:anywhere}.task-status{display:inline-flex;align-items:center;gap:6px;flex-shrink:0;padding-top:3px;color:#626e7e;font-size:12px}.task-status.syncing{color:#476ca9}.task-status.failed,.task-status.partial,.task-status.interrupted,.task-status.unknown{color:#966b35}.task-result-list{margin:0 23px}.task-result{padding:14px 0;border-top:1px solid #e9ecf0}.task-result>div{display:flex;align-items:center;gap:18px}.task-result strong{min-width:90px;font-size:13px;font-weight:500}.task-result span{color:#758190;font-size:12px}.task-result .link-button{margin-left:auto}.task-result>p{margin-top:8px;font-size:12px;line-height:1.7;overflow-wrap:anywhere}.success-text,.task-result span.success-text{color:#40815b}.error-text,.task-result span.error-text{color:#b34d40}.task-error{margin:0 23px 15px;font-size:12px;line-height:1.8}.task-card>footer{display:flex;justify-content:space-between;gap:10px;padding:13px 23px;border-top:1px solid #e9ecf0;color:#7d8795;font-size:12px}.section-summary{display:flex;justify-content:space-between;margin-bottom:17px;color:#5d6878;font-size:13px}.section-summary span{color:#8b94a0;font-size:12px}.account-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.account-card{display:flex;flex-direction:column;gap:21px;min-width:0;padding:20px;border:1px solid var(--border);border-radius:6px;background:#fff}.account-card>div{display:flex;justify-content:space-between;align-items:center;gap:12px}.account-card h2{font-size:14px;font-weight:500}.account-card span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:#9098a4}.account-card span.success-text{color:#40815b}.account-card code{min-width:0;color:#9098a4;font-size:11px;overflow-wrap:anywhere}.account-card .secondary-button{min-height:29px;padding:5px 8px;font-size:11px}.account-error{margin-top:-9px;color:#939ba6;font-size:11px;line-height:1.7;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.connection-page{display:grid;gap:20px}.panel{padding:23px 25px;border:1px solid var(--border);border-radius:6px;background:#fff}.panel h2{font-size:15px;font-weight:600;line-height:1.6}.panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.panel-heading p{margin-top:8px;color:#7e8896;font-size:12px;line-height:1.8}.switch{display:inline-flex;align-items:center;width:36px;height:21px;padding:3px;flex-shrink:0;border:0;border-radius:12px;background:#c4cbd5}.switch span{width:15px;height:15px;border-radius:50%;background:#fff;transition:transform .15s}.switch.on{background:#356ce0}.switch.on span{transform:translate(15px)}.settings-grid{display:grid;grid-template-columns:160px minmax(0,1fr);gap:24px;margin-top:23px}.settings-grid label,.path-setting{display:flex;flex-direction:column;gap:9px;color:#626f80;font-size:12px}.connection-page form label{display:flex;flex-direction:column;gap:9px;max-width:560px;margin-top:18px;color:#626f80;font-size:12px}input{min-width:0;width:100%;height:36px;padding:8px 10px;border:1px solid #d4dae3;border-radius:4px;background:#fff;color:#384353;font-size:12px;outline-offset:1px}.input-action{display:flex;align-items:center;gap:7px}.input-action input{flex:1}.input-action .icon-button{width:33px;height:33px}.settings-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:17px}.settings-actions>.link-button{margin-left:6px;font-size:11px}.help-text{margin-top:9px;color:#818b99;font-size:12px;line-height:1.9}.help-text code{color:#5e6a7c;font-size:11px}.path-setting{margin-top:20px}.config-details{margin-top:22px;padding-top:18px;border-top:1px solid var(--border)}.config-details summary{cursor:pointer;color:#697689;font-size:12px}.config-details pre{margin:12px 0 19px;padding:15px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;border:1px solid #e4e8ee;border-radius:4px;background:#f8f9fb;color:#5a677b;font-size:11px;line-height:1.9}.compact ol{margin:14px 0 0;padding-left:21px;color:#788393;font-size:12px;line-height:2.3}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:30px;background:#111b2b55}.modal{display:flex;flex-direction:column;width:min(470px,100%);max-height:88vh;overflow:hidden;border:1px solid #d7dde5;border-radius:8px;background:#fff;box-shadow:0 12px 60px #101c2c20}.modal.wide{width:min(860px,100%)}.modal>header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:17px 23px;border-bottom:1px solid var(--border)}.modal h2{font-size:16px;font-weight:600}.modal-content{padding:23px;color:#667283;font-size:13px;line-height:1.9}.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:25px}.preview-content{padding:28px 42px 38px;overflow-y:auto}.preview-cover{display:block;width:100%;max-height:260px;object-fit:cover;margin-bottom:27px}.preview-content>h1{margin:8px 0 28px;color:#242b34;font-size:29px;font-weight:600;line-height:1.55;overflow-wrap:anywhere}.article-content{color:#3d4653;font-size:16px;line-height:1.9;overflow-wrap:anywhere}.article-content p{margin:0 0 16px}.article-content h1,.article-content h2,.article-content h3{margin:25px 0 14px;line-height:1.6;font-weight:600}.article-content h2{font-size:23px}.article-content h3{font-size:19px}.article-content img{display:block;max-width:100%;height:auto;margin:20px auto}.article-content pre{padding:17px;overflow:auto;border-radius:4px;background:#f1f3f6;font-size:13px;line-height:1.7}.article-content blockquote{margin:19px 0;padding-left:18px;border-left:3px solid #ccd3dd;color:#7b8492}.article-content ul,.article-content ol{padding-left:25px}.article-content table{border-collapse:collapse;font-size:13px}.article-content th,.article-content td{padding:7px 10px;border:1px solid #dce1e8}.article-content a{color:#42669e}.toast{position:fixed;z-index:100;bottom:25px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:10px;max-width:min(640px,calc(100vw - 32px));padding:10px 11px 10px 15px;border:1px solid #d6dce5;border-radius:6px;background:#fff;box-shadow:0 5px 24px #111b2b15;color:#59677a;font-size:13px;line-height:1.7}.toast>svg{flex-shrink:0}.spin{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media (max-width: 1150px){.console-main{padding:28px}.account-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width: 800px){.console-shell{grid-template-columns:158px minmax(0,1fr)}.navigation{padding-left:8px;padding-right:8px}.navigation nav>button{padding-left:9px;font-size:12px;gap:8px}.navigation>footer{font-size:10px;padding-left:3px}.console-main{padding:24px 20px}.page-heading p{font-size:12px}.page-heading h1{font-size:21px}.settings-grid{grid-template-columns:110px minmax(0,1fr);gap:14px}.panel{padding:20px}.task-title,.article-row{padding-left:18px;padding-right:18px}.task-result-list{margin-left:18px;margin-right:18px}.task-title{flex-direction:column;gap:10px}.article-row{gap:10px}}@media (max-width: 600px){.console-shell{grid-template-columns:116px minmax(0,1fr)}.app-header{padding:0 14px}.brand>span{display:none}.brand strong{font-size:14px}.connection-indicator{font-size:10px}.navigation nav>button{padding-left:5px;padding-right:5px;gap:5px;font-size:11px}.navigation>footer svg{display:none}.navigation>footer{font-size:9px}.console-main{padding:22px 14px}.account-grid{grid-template-columns:minmax(0,1fr)}.page-heading{align-items:flex-start;gap:10px}.settings-grid{grid-template-columns:minmax(0,1fr);gap:15px}.article-row{flex-wrap:wrap}.article-row>div{min-width:100px}.article-row>svg{display:none}.connection-banner{flex-wrap:wrap;font-size:12px}.connection-banner .link-button{margin-left:26px}.modal-backdrop{padding:15px}.preview-content{padding:24px}.preview-content>h1{font-size:25px}.task-result strong{min-width:55px}.task-result>div{gap:10px}}@media (prefers-reduced-motion: reduce){*{transition:none!important}.spin{animation-duration:2s}}.release-note{margin-top:18px;padding:12px 14px;border:1px solid #e3e7ec;border-radius:4px;background:#fafbfc;color:#7f8997;font-size:12px;line-height:1.8}.developer-settings>summary{cursor:pointer;color:#7a8595;font-size:12px}.task-status.needs_user_action,.manual-text{color:#805c24}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|