adjust style

This commit is contained in:
pompurin404 2024-08-26 11:13:09 +08:00
parent 9b081a5adb
commit c2bd36ff7a
No known key found for this signature in database

View File

@ -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(
'↑' + '↑' +