diff --git a/src/components/ProxyPreviewBar.tsx b/src/components/ProxyPreviewBar.tsx index 6f68d09..72b506b 100644 --- a/src/components/ProxyPreviewBar.tsx +++ b/src/components/ProxyPreviewBar.tsx @@ -41,7 +41,7 @@ export const ProxyPreviewBar = (props: { return (
-
+
{ - return version.includes('sing-box') -} - export const transformEndpointURL = (url: string) => /^https?:\/\//.test(url) ? url : `${window.location.protocol}//${url}` diff --git a/src/pages/Config.tsx b/src/pages/Config.tsx index 141cad2..27c2b05 100644 --- a/src/pages/Config.tsx +++ b/src/pages/Config.tsx @@ -5,7 +5,6 @@ import { toast } from 'solid-toast' import { z } from 'zod' import { fetchBackendConfigAPI, - fetchBackendVersionAPI, flushFakeIPDataAPI, flushingFakeIPData, isUpdateAvailableAPI, @@ -23,7 +22,6 @@ import { } from '~/apis' import { Button, ConfigTitle } from '~/components' import { LANG, MODE_OPTIONS, ROUTES, themes } from '~/constants' -import { isSingBox } from '~/helpers' import { locale, setLocale, useI18n } from '~/i18n' import { autoSwitchTheme, @@ -38,6 +36,11 @@ import { useRequest, useTwemoji, } from '~/signals' +import { + backendVersion, + isSingBox, + updateBackendVersion, +} from '~/signals/version' import type { DNSQuery } from '~/types' const dnsQueryFormSchema = z.object({ @@ -109,9 +112,7 @@ const configFormSchema = z.object({ 'mixed-port': z.number(), }) -const ConfigForm: Component<{ backendVersion: Accessor }> = ({ - backendVersion, -}) => { +const ConfigForm = () => { const [t] = useI18n() const portList = [ @@ -192,7 +193,7 @@ const ConfigForm: Component<{ backendVersion: Accessor }> = ({ - +
{(item) => ( @@ -344,7 +345,7 @@ const ConfigForm: Component<{ backendVersion: Accessor }> = ({ {t('restartCore')} - +