mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-09-20 01:52:47 +08:00
refactor: skipLibCheck
This commit is contained in:
parent
1f8efbc869
commit
b4739d6dba
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
|
.idea
|
||||||
node_modules
|
node_modules
|
||||||
dist
|
dist
|
@ -26,7 +26,7 @@ export const App = () => {
|
|||||||
|
|
||||||
createEffect(() => {
|
createEffect(() => {
|
||||||
if (selectedEndpoint() && endpoint()) {
|
if (selectedEndpoint() && endpoint()) {
|
||||||
useProxies().updateProxies()
|
void useProxies().updateProxies()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ export const App = () => {
|
|||||||
<Show when={selectedEndpoint()}>
|
<Show when={selectedEndpoint()}>
|
||||||
<Route path={ROUTES.Overview} component={Overview} />
|
<Route path={ROUTES.Overview} component={Overview} />
|
||||||
<Route path={ROUTES.Proxies} component={Proxies} />
|
<Route path={ROUTES.Proxies} component={Proxies} />
|
||||||
<Route path={ROUTES.Proxyprovider} component={ProxyProvider} />
|
<Route path={ROUTES.ProxyProvider} component={ProxyProvider} />
|
||||||
<Route path={ROUTES.Rules} component={Rules} />
|
<Route path={ROUTES.Rules} component={Rules} />
|
||||||
<Route path={ROUTES.Conns} component={Connections} />
|
<Route path={ROUTES.Conns} component={Connections} />
|
||||||
<Route path={ROUTES.Log} component={Logs} />
|
<Route path={ROUTES.Log} component={Logs} />
|
||||||
|
@ -103,7 +103,7 @@ export const Header = () => {
|
|||||||
|
|
||||||
if (proxyProviders().length > 0) {
|
if (proxyProviders().length > 0) {
|
||||||
list.splice(2, 0, {
|
list.splice(2, 0, {
|
||||||
href: ROUTES.Proxyprovider,
|
href: ROUTES.ProxyProvider,
|
||||||
name: t('proxyProviders'),
|
name: t('proxyProviders'),
|
||||||
icon: <IconGlobeFilled />,
|
icon: <IconGlobeFilled />,
|
||||||
})
|
})
|
||||||
|
@ -36,7 +36,7 @@ export const themes = [
|
|||||||
export enum ROUTES {
|
export enum ROUTES {
|
||||||
Overview = '/overview',
|
Overview = '/overview',
|
||||||
Proxies = '/proxies',
|
Proxies = '/proxies',
|
||||||
Proxyprovider = '/proxyprovider',
|
ProxyProvider = '/proxyprovider',
|
||||||
Rules = '/rules',
|
Rules = '/rules',
|
||||||
Conns = '/conns',
|
Conns = '/conns',
|
||||||
Log = '/logs',
|
Log = '/logs',
|
||||||
|
@ -308,7 +308,7 @@ export default () => {
|
|||||||
<td
|
<td
|
||||||
onContextMenu={(e) => {
|
onContextMenu={(e) => {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
writeClipboard(cell.renderValue() as string)
|
void writeClipboard(cell.renderValue() as string)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{flexRender(
|
{flexRender(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { useI18n } from '@solid-primitives/i18n'
|
import { useI18n } from '@solid-primitives/i18n'
|
||||||
import { IconBrandSpeedtest } from '@tabler/icons-solidjs'
|
import { IconBrandSpeedtest } from '@tabler/icons-solidjs'
|
||||||
import { Show, createSignal } from 'solid-js'
|
import { createSignal, Show } from 'solid-js'
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
Collapse,
|
Collapse,
|
||||||
@ -26,7 +26,7 @@ export default () => {
|
|||||||
)
|
)
|
||||||
|
|
||||||
const onProxyNodeClick = async (proxy: Proxy, proxyName: string) => {
|
const onProxyNodeClick = async (proxy: Proxy, proxyName: string) => {
|
||||||
setProxyGroupByProxyName(proxy, proxyName)
|
void setProxyGroupByProxyName(proxy, proxyName)
|
||||||
}
|
}
|
||||||
|
|
||||||
const onSpeedTestClick = async (e: MouseEvent, name: string) => {
|
const onSpeedTestClick = async (e: MouseEvent, name: string) => {
|
||||||
@ -79,7 +79,7 @@ export default () => {
|
|||||||
proxyNames={sortedProxyNames}
|
proxyNames={sortedProxyNames}
|
||||||
now={proxy.now}
|
now={proxy.now}
|
||||||
onClick={(name) => {
|
onClick={(name) => {
|
||||||
onProxyNodeClick(proxy, name)
|
void onProxyNodeClick(proxy, name)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
|
@ -19,7 +19,7 @@ const [proxyNodeMap, setProxyNodeMap] = createSignal<Record<string, ProxyInfo>>(
|
|||||||
export const useProxies = () => {
|
export const useProxies = () => {
|
||||||
const request = useRequest()
|
const request = useRequest()
|
||||||
|
|
||||||
const setProxyInfoByProixes = (proxies: Proxy[] | ProxyNode[]) => {
|
const setProxyInfoByProxies = (proxies: Proxy[] | ProxyNode[]) => {
|
||||||
proxies.forEach((proxy) => {
|
proxies.forEach((proxy) => {
|
||||||
const latency = proxy.history.at(-1)?.delay || -1
|
const latency = proxy.history.at(-1)?.delay || -1
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ export const useProxies = () => {
|
|||||||
.json<{ providers: Record<string, ProxyProvider> }>()
|
.json<{ providers: Record<string, ProxyProvider> }>()
|
||||||
|
|
||||||
Object.values(providers).forEach((provider) => {
|
Object.values(providers).forEach((provider) => {
|
||||||
setProxyInfoByProixes(provider.proxies)
|
setProxyInfoByProxies(provider.proxies)
|
||||||
})
|
})
|
||||||
|
|
||||||
setProxyProviders(
|
setProxyProviders(
|
||||||
@ -60,7 +60,7 @@ export const useProxies = () => {
|
|||||||
const sortIndex = [...(proxies['GLOBAL'].all ?? []), 'GLOBAL']
|
const sortIndex = [...(proxies['GLOBAL'].all ?? []), 'GLOBAL']
|
||||||
const proxiesArray = Object.values(proxies)
|
const proxiesArray = Object.values(proxies)
|
||||||
|
|
||||||
setProxyInfoByProixes(proxiesArray)
|
setProxyInfoByProxies(proxiesArray)
|
||||||
setProxies(
|
setProxies(
|
||||||
proxiesArray
|
proxiesArray
|
||||||
.filter((proxy) => proxy.all?.length)
|
.filter((proxy) => proxy.all?.length)
|
||||||
@ -122,7 +122,7 @@ export const useProxies = () => {
|
|||||||
|
|
||||||
const healthCheckByProviderName = async (providerName: string) => {
|
const healthCheckByProviderName = async (providerName: string) => {
|
||||||
await request.get(`providers/proxies/${providerName}/healthcheck`, {
|
await request.get(`providers/proxies/${providerName}/healthcheck`, {
|
||||||
timeout: 30 * 1000, // thie api is a little bit slow sometimes...
|
timeout: 30 * 1000, // this api is a little bit slow sometimes...
|
||||||
})
|
})
|
||||||
await updateProxies()
|
await updateProxies()
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
"target": "ESNext",
|
"target": "ESNext",
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
|
Loading…
Reference in New Issue
Block a user