mirror of
https://github.com/pompurin404/mihomo-party.git
synced 2024-11-15 19:22:31 +08:00
fix 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 / macos10 (arm64) (push) Waiting to run
Build / macos10 (x64) (push) Waiting to run
Build / artifact-windows (push) Blocked by required conditions
Build / artifact-windows7 (push) Blocked by required conditions
Build / artifact-macos (push) Blocked by required conditions
Build / artifact-macos10 (push) Blocked by required conditions
Build / artifact-linux (push) Blocked by required conditions
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 / macos10 (arm64) (push) Waiting to run
Build / macos10 (x64) (push) Waiting to run
Build / artifact-windows (push) Blocked by required conditions
Build / artifact-windows7 (push) Blocked by required conditions
Build / artifact-macos (push) Blocked by required conditions
Build / artifact-macos10 (push) Blocked by required conditions
Build / artifact-linux (push) Blocked by required conditions
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
cd0a9dd911
commit
6e4a87fda8
|
@ -37,7 +37,6 @@ import { driver } from 'driver.js'
|
|||
import 'driver.js/dist/driver.css'
|
||||
|
||||
let navigate: NavigateFunction
|
||||
const narrowWidth = platform === 'darwin' ? 70 : 60
|
||||
|
||||
const App: React.FC = () => {
|
||||
const { appConfig, patchAppConfig } = useAppConfig()
|
||||
|
@ -62,6 +61,7 @@ const App: React.FC = () => {
|
|||
'substore'
|
||||
]
|
||||
} = appConfig || {}
|
||||
const narrowWidth = platform === 'darwin' ? 70 : 60
|
||||
const [order, setOrder] = useState(siderOrder)
|
||||
const [siderWidthValue, setSiderWidthValue] = useState(siderWidth)
|
||||
const siderWidthValueRef = useRef(siderWidthValue)
|
||||
|
@ -200,6 +200,7 @@ const App: React.FC = () => {
|
|||
{platform !== 'darwin' && (
|
||||
<MihomoIcon className="h-[32px] leading-[32px] text-lg mx-[1px]" />
|
||||
)}
|
||||
<UpdaterButton iconOnly={true} />
|
||||
</div>
|
||||
<div className="h-[calc(100%-110px)] overflow-y-auto no-scrollbar">
|
||||
<div className="h-full w-full flex flex-col gap-2">
|
||||
|
|
|
@ -5,9 +5,15 @@ import React, { useState } from 'react'
|
|||
import useSWR from 'swr'
|
||||
import UpdaterModal from './updater-modal'
|
||||
import { platform } from '@renderer/utils/init'
|
||||
import { MdNewReleases } from 'react-icons/md'
|
||||
|
||||
const UpdaterButton: React.FC = () => {
|
||||
interface Props {
|
||||
iconOnly?: boolean
|
||||
}
|
||||
|
||||
const UpdaterButton: React.FC<Props> = (props) => {
|
||||
const { appConfig } = useAppConfig()
|
||||
const { iconOnly } = props
|
||||
const { autoCheckUpdate, useWindowFrame = false } = appConfig || {}
|
||||
const [openModal, setOpenModal] = useState(false)
|
||||
const { data: latest } = useSWR(
|
||||
|
@ -30,6 +36,20 @@ const UpdaterButton: React.FC = () => {
|
|||
}}
|
||||
/>
|
||||
)}
|
||||
{iconOnly ? (
|
||||
<Button
|
||||
isIconOnly
|
||||
variant="flat"
|
||||
className={`fixed rounded-full app-nodrag`}
|
||||
color="danger"
|
||||
size="md"
|
||||
onPress={() => {
|
||||
setOpenModal(true)
|
||||
}}
|
||||
>
|
||||
<MdNewReleases className="text-[35px]" />
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
className={`fixed left-[85px] app-nodrag ${!useWindowFrame && platform === 'darwin' ? 'ml-[60px]' : ''}`}
|
||||
color="danger"
|
||||
|
@ -40,6 +60,7 @@ const UpdaterButton: React.FC = () => {
|
|||
>
|
||||
v{latest.version}
|
||||
</Button>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user