diff --git a/src/containers/Proxies/components/Provider/index.tsx b/src/containers/Proxies/components/Provider/index.tsx index 7c3ab3f..ed495f0 100644 --- a/src/containers/Proxies/components/Provider/index.tsx +++ b/src/containers/Proxies/components/Provider/index.tsx @@ -41,7 +41,7 @@ export function Provider (props: ProvidersProps) { return ( -
+
{ provider.name } { provider.vehicleType } diff --git a/src/containers/Proxies/components/Proxy/index.tsx b/src/containers/Proxies/components/Proxy/index.tsx index 9a69f94..9f0f583 100644 --- a/src/containers/Proxies/components/Proxy/index.tsx +++ b/src/containers/Proxies/components/Proxy/index.tsx @@ -68,12 +68,21 @@ export function Proxy (props: ProxyProps) { [delay], ) - const backgroundColor = hasError ? undefined : color + const backgroundColor = hasError ? '#E5E7EB' : color return ( -
- {config.type} -

{config.name}

-

{delay === 0 ? '-' : `${delay}ms`}

+
+
+ + {config.type} + +

{config.name}

+
+
+

{delay === 0 ? '-' : `${delay}ms`}

+ { config.udp &&

UDP

} +
) } diff --git a/src/containers/Proxies/components/Proxy/style.scss b/src/containers/Proxies/components/Proxy/style.scss index 63360b4..2f2180b 100644 --- a/src/containers/Proxies/components/Proxy/style.scss +++ b/src/containers/Proxies/components/Proxy/style.scss @@ -1,4 +1,6 @@ .proxy-item { + display: flex; + flex-flow: column nowrap; position: relative; width: 100%; height: 110px; @@ -6,20 +8,14 @@ border-radius: 4px; background: $color-white; user-select: none; + overflow: hidden; cursor: default; box-shadow: 2px 5px 20px -3px rgba($color-primary-dark, 0.2); transition: all 300ms ease; - .proxy-type { - padding: 2px 5px; - font-size: 10px; - color: $color-white; - border-radius: 2px; - } - .proxy-name { display: -webkit-box; - margin-top: 10px; + margin: 6px 0; color: $color-primary-darken; font-size: 10px; overflow: hidden; @@ -29,39 +25,12 @@ } .proxy-delay { - position: absolute; - left: 10px; - bottom: 13px; font-size: 10px; color: rgba($color: $color-primary-darken, $alpha: 0.8); } - .proxy-editor { - position: absolute; - right: 10px; - bottom: 10px; - cursor: pointer; - color: rgba($color: $color-primary-darken, $alpha: 0.8); - opacity: 0; - pointer-events: none; - transition: all 300ms ease; - } - &:hover { box-shadow: 0 14px 20px -4px rgba($color-primary-darken, 0.4); - - .proxy-editor { - opacity: 1; - pointer-events: visible; - } - } -} - -.proxy-error { - opacity: 0.5; - - .proxy-type { - background-color: $color-gray-darken; } } @@ -69,15 +38,7 @@ .proxy-item { $height: 70px; + flex-flow: row nowrap; height: $height; - - .proxy-delay { - left: unset; - bottom: unset; - top: 0; - right: 20px; - height: $height; - line-height: $height; - } } } diff --git a/src/lib/request.ts b/src/lib/request.ts index b686731..c53b6ca 100644 --- a/src/lib/request.ts +++ b/src/lib/request.ts @@ -58,6 +58,7 @@ export interface Proxy { name: string type: 'Direct' | 'Reject' | 'Shadowsocks' | 'Vmess' | 'Trojan' | 'Socks' | 'Http' | 'Snell' history: History[] + udp: boolean } export interface Group {