mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 13:10:30 +08:00
adjust style
This commit is contained in:
parent
9b081a5adb
commit
c2bd36ff7a
@ -1,6 +1,6 @@
|
|||||||
import axios, { AxiosInstance } from 'axios'
|
import axios, { AxiosInstance } from 'axios'
|
||||||
import { getAppConfig, getControledMihomoConfig } from '../config'
|
import { getAppConfig, getControledMihomoConfig } from '../config'
|
||||||
import templateIcon from '../../../resources/iconTemplate.png?asset'
|
import templateIcon from '../../../resources/iconTemplate@2x.png?asset'
|
||||||
import { mainWindow } from '..'
|
import { mainWindow } from '..'
|
||||||
import WebSocket from 'ws'
|
import WebSocket from 'ws'
|
||||||
import { tray } from '../resolve/tray'
|
import { tray } from '../resolve/tray'
|
||||||
@ -189,6 +189,7 @@ const mihomoTraffic = async (): Promise<void> => {
|
|||||||
mihomoTrafficWs.onmessage = (e): void => {
|
mihomoTrafficWs.onmessage = (e): void => {
|
||||||
const data = e.data as string
|
const data = e.data as string
|
||||||
const json = JSON.parse(data) as IMihomoTrafficInfo
|
const json = JSON.parse(data) as IMihomoTrafficInfo
|
||||||
|
if (process.platform === 'darwin') {
|
||||||
if (showTraffic) {
|
if (showTraffic) {
|
||||||
const svgContent = `
|
const svgContent = `
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 125 36">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 125 36">
|
||||||
@ -205,6 +206,7 @@ const mihomoTraffic = async (): Promise<void> => {
|
|||||||
} else {
|
} else {
|
||||||
tray?.setImage(icon)
|
tray?.setImage(icon)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (process.platform !== 'linux') {
|
if (process.platform !== 'linux') {
|
||||||
tray?.setToolTip(
|
tray?.setToolTip(
|
||||||
'↑' +
|
'↑' +
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user