mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2026-04-13 08:00:30 +08:00
Compare commits
4 Commits
436ef9a030
...
294dd75b48
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
294dd75b48 | ||
|
|
f56c585818 | ||
|
|
ef96819621 | ||
|
|
5e0c5b6e69 |
14
changelog.md
14
changelog.md
@ -1,4 +1,18 @@
|
||||
## 1.8.3
|
||||
**本次更新移除了 Windows 下启动必须管理员模式的机制,改为只在启用虚拟网卡模式的时候,申请 UAC 权限重启软件,安全性更好,更灵活,给无法使用管理员模式运行软件的企业用户提供了更大的便利**
|
||||
|
||||
### 新功能 (Feat)
|
||||
- 移除 Windows 下启动必须管理员模式的机制,改为只在启用虚拟网卡模式的时候,申请 UAC 权限重启软件
|
||||
|
||||
### 重构 (Refactor)
|
||||
- Geodata 文件只有在源文件更新的时候才会在启动时覆盖更新
|
||||
|
||||
### 修复 (Fix)
|
||||
- 修复 DNS/嗅探覆写开关逻辑,修改设置不再会直接写入运行时配置,增加了“仅保存”按钮
|
||||
- 悬浮窗改为纯矩形,修复 windows 下兼容性问题带来的白边
|
||||
|
||||
## 1.8.2
|
||||
|
||||
**本次更新主要集中在重大内核更新和依赖升级后所产生的 bug 修复,解决了自1.7版以后首次安装无法启动的问题,推荐更新**
|
||||
|
||||
### 新功能 (Feat)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mihomo-party",
|
||||
"version": "1.8.2",
|
||||
"version": "1.8.3",
|
||||
"description": "Mihomo Party",
|
||||
"main": "./out/main/index.js",
|
||||
"author": "mihomo-party-org",
|
||||
|
||||
@ -28,7 +28,6 @@ async function createFloatingWindow(): Promise<void> {
|
||||
maximizable: false,
|
||||
fullscreenable: false,
|
||||
closable: false,
|
||||
backgroundColor: '#00000000',
|
||||
webPreferences: {
|
||||
preload: join(__dirname, '../preload/index.js'),
|
||||
spellcheck: false,
|
||||
|
||||
@ -82,6 +82,18 @@ async function fixDataDirPermissions(): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
// 比较修改geodata文件修改时间
|
||||
async function isSourceNewer(sourcePath: string, targetPath: string): Promise<boolean> {
|
||||
try {
|
||||
const sourceStats = await stat(sourcePath)
|
||||
const targetStats = await stat(targetPath)
|
||||
|
||||
return sourceStats.mtime > targetStats.mtime
|
||||
} catch {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
async function initDirs(): Promise<void> {
|
||||
await fixDataDirPermissions()
|
||||
|
||||
@ -137,11 +149,18 @@ async function initFiles(): Promise<void> {
|
||||
const sourcePath = path.join(resourcesFilesDir(), file)
|
||||
|
||||
try {
|
||||
if (!existsSync(targetPath) && existsSync(sourcePath)) {
|
||||
await cp(sourcePath, targetPath, { recursive: true })
|
||||
// 检查是否需要复制
|
||||
if (existsSync(sourcePath)) {
|
||||
const shouldCopyToWork = !existsSync(targetPath) || await isSourceNewer(sourcePath, targetPath)
|
||||
if (shouldCopyToWork) {
|
||||
await cp(sourcePath, targetPath, { recursive: true })
|
||||
}
|
||||
}
|
||||
if (!existsSync(testTargetPath) && existsSync(sourcePath)) {
|
||||
await cp(sourcePath, testTargetPath, { recursive: true })
|
||||
if (existsSync(sourcePath)) {
|
||||
const shouldCopyToTest = !existsSync(testTargetPath) || await isSourceNewer(sourcePath, testTargetPath)
|
||||
if (shouldCopyToTest) {
|
||||
await cp(sourcePath, testTargetPath, { recursive: true })
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(`Failed to copy ${file}:`, error)
|
||||
|
||||
@ -60,7 +60,7 @@ const FloatingApp: React.FC = () => {
|
||||
|
||||
return (
|
||||
<div className="app-drag h-screen w-screen overflow-hidden">
|
||||
<div className="floating-bg border border-divider flex rounded-full bg-content1 h-[calc(100%-2px)] w-[calc(100%-2px)]">
|
||||
<div className="floating-bg border border-divider flex bg-content1 h-full w-full">
|
||||
<div className="flex justify-center items-center h-full aspect-square">
|
||||
<div
|
||||
onContextMenu={(e) => {
|
||||
@ -78,7 +78,7 @@ const FloatingApp: React.FC = () => {
|
||||
}
|
||||
: {}
|
||||
}
|
||||
className={`app-nodrag cursor-pointer floating-thumb ${tunEnabled ? 'bg-secondary' : sysProxyEnabled ? 'bg-primary' : 'bg-default'} hover:opacity-hover rounded-full h-[calc(100%-4px)] aspect-square`}
|
||||
className={`app-nodrag cursor-pointer floating-thumb ${tunEnabled ? 'bg-secondary' : sysProxyEnabled ? 'bg-primary' : 'bg-default'} hover:opacity-hover h-[calc(100%-4px)] aspect-square`}
|
||||
>
|
||||
<MihomoIcon className="floating-icon text-primary-foreground h-full leading-full text-[22px] mx-auto" />
|
||||
</div>
|
||||
|
||||
@ -12,11 +12,9 @@
|
||||
BlinkMacSystemFont;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
background: transparent !important;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
html {
|
||||
background: none !important;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.app-nodrag {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user