mirror of
https://github.com/pompurin404/mihomo-party.git
synced 2024-11-16 03:32:17 +08:00
adjust floating window style
Some checks are pending
Build / windows (arm64) (push) Waiting to run
Build / windows (ia32) (push) Waiting to run
Build / windows (x64) (push) Waiting to run
Build / windows7 (ia32) (push) Waiting to run
Build / windows7 (x64) (push) Waiting to run
Build / linux (arm64) (push) Waiting to run
Build / linux (x64) (push) Waiting to run
Build / macos (arm64) (push) Waiting to run
Build / macos (x64) (push) Waiting to run
Build / updater (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-bin) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron-bin) (push) Blocked by required conditions
Build / aur-git-updater (push) Waiting to run
Build / Update WinGet Package (push) Blocked by required conditions
Build / Update Homebrew cask (push) Blocked by required conditions
Some checks are pending
Build / windows (arm64) (push) Waiting to run
Build / windows (ia32) (push) Waiting to run
Build / windows (x64) (push) Waiting to run
Build / windows7 (ia32) (push) Waiting to run
Build / windows7 (x64) (push) Waiting to run
Build / linux (arm64) (push) Waiting to run
Build / linux (x64) (push) Waiting to run
Build / macos (arm64) (push) Waiting to run
Build / macos (x64) (push) Waiting to run
Build / updater (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-bin) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron) (push) Blocked by required conditions
Build / aur-release-updater (mihomo-party-electron-bin) (push) Blocked by required conditions
Build / aur-git-updater (push) Waiting to run
Build / Update WinGet Package (push) Blocked by required conditions
Build / Update Homebrew cask (push) Blocked by required conditions
This commit is contained in:
parent
5d0136ddea
commit
0bc06024af
|
@ -14,8 +14,8 @@ async function createFloatingWindow(): Promise<void> {
|
|||
})
|
||||
const { customTheme = 'default.css' } = await getAppConfig()
|
||||
floatingWindow = new BrowserWindow({
|
||||
width: 126,
|
||||
height: 50,
|
||||
width: 120,
|
||||
height: 42,
|
||||
x: floatingWindowState.x,
|
||||
y: floatingWindowState.y,
|
||||
show: false,
|
||||
|
|
|
@ -25,9 +25,9 @@ const FloatingApp: React.FC = () => {
|
|||
}
|
||||
}, [])
|
||||
return (
|
||||
<div className="app-drag p-[4px] h-[100vh]">
|
||||
<div className="floating-bg border-1 border-divider drop-shadow-md flex rounded-[calc(calc(100vh-8px)/2)] bg-content1 h-[calc(100vh-8px)] w-[calc(100vw-8px)]">
|
||||
<div className="flex justify-center items-center h-full w-[calc(100vh-8px)]">
|
||||
<div className="app-drag h-[100vh] w-[100vw]">
|
||||
<div className="floating-bg border-1 border-divider flex rounded-full bg-content1 h-[calc(100%-2px)] w-[calc(100%-2px)]">
|
||||
<div className="flex justify-center items-center h-[100%] aspect-square">
|
||||
<div
|
||||
onContextMenu={(e) => {
|
||||
e.preventDefault()
|
||||
|
@ -36,21 +36,19 @@ const FloatingApp: React.FC = () => {
|
|||
onClick={() => {
|
||||
triggerMainWindow()
|
||||
}}
|
||||
className={`app-nodrag cursor-pointer floating-thumb ${tunEnabled ? 'bg-secondary' : sysProxyEnabled ? 'bg-primary' : 'bg-default'} hover:opacity-hover rounded-full h-[calc(100vh-14px)] w-[calc(100vh-14px)]`}
|
||||
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`}
|
||||
>
|
||||
<MihomoIcon className="floating-icon text-primary-foreground h-full leading-full text-[22px] mx-auto" />
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-col justify-center w-[calc(100%-42px)]">
|
||||
<div className="flex justify-end">
|
||||
<div className="floating-text whitespace-nowrap overflow-hidden text-[12px] mr-[10px] font-bold">
|
||||
<div className="w-full">
|
||||
<div className="flex flex-col justify-center h-full w-full">
|
||||
<h2 className="text-end floating-text whitespace-nowrap overflow-hidden text-[12px] mr-2 font-bold">
|
||||
{calcTraffic(upload)}/s
|
||||
</div>
|
||||
</div>
|
||||
<div className="w-full flex justify-end">
|
||||
<div className="floating-text whitespace-nowrap overflow-hidden text-[12px] mr-[10px] font-bold">
|
||||
</h2>
|
||||
<h2 className="text-end floating-text whitespace-nowrap overflow-hidden text-[12px] mr-2 font-bold">
|
||||
{calcTraffic(download)}/s
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2,6 +2,14 @@
|
|||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
.floating-text {
|
||||
font-family:
|
||||
'Microsoft YaHei',
|
||||
system-ui,
|
||||
-apple-system,
|
||||
BlinkMacSystemFont;
|
||||
}
|
||||
|
||||
html {
|
||||
background: none !important;
|
||||
background-color: transparent !important;
|
||||
|
|
Loading…
Reference in New Issue
Block a user