1 Commits
Author SHA1 Message Date
3970260761 38f5c400d6 feat: 独立窗口固定停靠屏幕右侧 (v2.1.5)
- 窗口按钮打开的 popup 窗口贴屏幕右缘、占满可用高度、宽 440
- top=0 起始,排除任务栏高度(availHeight)
2026-11-10 21:09:09 +08:00
4 changed files with 20 additions and 7 deletions

No files matched your search

+6
View File
@@ -1,5 +1,11 @@
# Changelog
## v2.1.5 (2026-10-23)
- ✨ 「窗口」按钮打开的独立窗口**固定停靠屏幕右侧**:贴右缘、占满可用高度(排除任务栏)、宽 440
---
## v2.1.4 (2026-10-23)
- ✨ 设置内容全部**移出抽屉、内联到首页**(同步桥接状态/Token/地址、悬浮按钮、自建站点、历史入口直接可见)
+2 -2
View File
@@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "文章同步助手",
"description": "一键同步文章到知乎、头条、掘金等 20+ 平台,支持公众号多账号保持在线",
"version": "2.1.4",
"version": "2.1.5",
"icons": {
"16": "assets/icon-16.png",
"48": "assets/icon-48.png",
@@ -96,4 +96,4 @@
]
}
]
}
}
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@wechatsync/extension",
"version": "2.1.4",
"version": "2.1.5",
"private": true,
"description": "微信公众号同步助手 Chrome 扩展",
"type": "module",
@@ -40,4 +40,4 @@
"vite": "^5.0.10",
"vitest": "^2.0.0"
}
}
}
+10 -3
View File
@@ -102,12 +102,19 @@ export function HomeNew() {
}
// 在独立窗口打开扩展(popup 点外部会自动关闭,独立窗口可常驻保持打开)
// 固定停靠屏幕右侧:贴右缘、占满可用高度(排除任务栏),宽度 440 便于阅读
const handleOpenInWindow = async () => {
const width = 440
const height = screen.availHeight
const left = Math.max(0, screen.availWidth - width)
await chrome.windows.create({
url: chrome.runtime.getURL('src/popup/index.html'),
type: 'popup',
width: 420,
height: 720,
width,
height,
left,
top: 0,
focused: true,
})
window.close()
}
@@ -165,7 +172,7 @@ export function HomeNew() {
<button
onClick={handleOpenInWindow}
className="flex flex-col items-center gap-0.5 px-2 py-1 rounded-lg hover:bg-muted transition-colors"
title="在独立窗口打开(常驻保持,不随点击关闭)"
title="在右侧独立窗口打开(贴屏幕右缘常驻,不随点击关闭)"
>
<Maximize2 className="w-3.5 h-3.5" />
<span className="text-[10px] text-muted-foreground leading-none">窗口</span>