fix: typo in files and filenames
This commit is contained in:
parent
2236c0da31
commit
d675991f42
13 changed files with 20 additions and 20 deletions
|
@ -2,7 +2,7 @@ import type { MutableRefObject } from 'react';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import ResizeObserver from 'resize-observer-polyfill';
|
import ResizeObserver from 'resize-observer-polyfill';
|
||||||
|
|
||||||
import { framerMotionResouce } from '../misc/motion';
|
import { framerMotionResource } from '../misc/motion';
|
||||||
|
|
||||||
const { memo, useState, useRef, useEffect } = React;
|
const { memo, useState, useRef, useEffect } = React;
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ const variantsCollpapsibleChildContainer = {
|
||||||
type CollapsibleProps = { children: React.ReactNode; isOpen?: boolean };
|
type CollapsibleProps = { children: React.ReactNode; isOpen?: boolean };
|
||||||
|
|
||||||
const Collapsible = memo(({ children, isOpen }: CollapsibleProps) => {
|
const Collapsible = memo(({ children, isOpen }: CollapsibleProps) => {
|
||||||
const module = framerMotionResouce.read();
|
const module = framerMotionResource.read();
|
||||||
const motion = module.motion;
|
const motion = module.motion;
|
||||||
const previous = usePrevious(isOpen);
|
const previous = usePrevious(isOpen);
|
||||||
const [refToMeature, { height }] = useMeasure();
|
const [refToMeature, { height }] = useMeasure();
|
||||||
|
|
|
@ -162,7 +162,7 @@ function Conn({ apiConfig }) {
|
||||||
return [...closed, ...prev].slice(0, 101);
|
return [...closed, ...prev].slice(0, 101);
|
||||||
});
|
});
|
||||||
// if previous connections and current connections are both empty
|
// if previous connections and current connections are both empty
|
||||||
// arrays, we wont update state to avaoid rerender
|
// arrays, we wont update state to avoid rerender
|
||||||
if (x && (x.length !== 0 || prevConnsRef.current.length !== 0) && !isRefreshPaused) {
|
if (x && (x.length !== 0 || prevConnsRef.current.length !== 0) && !isRefreshPaused) {
|
||||||
prevConnsRef.current = x;
|
prevConnsRef.current = x;
|
||||||
setConns(x);
|
setConns(x);
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { areEqual, VariableSizeList } from 'react-window';
|
||||||
import { RuleProviderItem } from 'src/components/rules/RuleProviderItem';
|
import { RuleProviderItem } from 'src/components/rules/RuleProviderItem';
|
||||||
import { useRuleAndProvider } from 'src/components/rules/rules.hooks';
|
import { useRuleAndProvider } from 'src/components/rules/rules.hooks';
|
||||||
import { RulesPageFab } from 'src/components/rules/RulesPageFab';
|
import { RulesPageFab } from 'src/components/rules/RulesPageFab';
|
||||||
import { TextFilter } from 'src/components/shared/TextFitler';
|
import { TextFilter } from '$src/components/shared/TextFilter';
|
||||||
import { ruleFilterText } from 'src/store/rules';
|
import { ruleFilterText } from 'src/store/rules';
|
||||||
import { State } from 'src/store/types';
|
import { State } from 'src/store/types';
|
||||||
import { ClashAPIConfig, RuleType } from 'src/types';
|
import { ClashAPIConfig, RuleType } from 'src/types';
|
||||||
|
|
|
@ -23,7 +23,7 @@ function SvgYacd({
|
||||||
eye = '#eee',
|
eye = '#eee',
|
||||||
mouth = '#eee',
|
mouth = '#eee',
|
||||||
}: Props) {
|
}: Props) {
|
||||||
const faceClasName = cx({ [s.path]: animate });
|
const faceClassName = cx({ [s.path]: animate });
|
||||||
return (
|
return (
|
||||||
<svg width={width} height={height} viewBox="0 0 320 320" xmlns="http://www.w3.org/2000/svg">
|
<svg width={width} height={height} viewBox="0 0 320 320" xmlns="http://www.w3.org/2000/svg">
|
||||||
<g fill="none" fillRule="evenodd">
|
<g fill="none" fillRule="evenodd">
|
||||||
|
@ -34,7 +34,7 @@ function SvgYacd({
|
||||||
strokeWidth="4"
|
strokeWidth="4"
|
||||||
strokeLinecap="round"
|
strokeLinecap="round"
|
||||||
fill={c0}
|
fill={c0}
|
||||||
className={faceClasName}
|
className={faceClassName}
|
||||||
/>
|
/>
|
||||||
<circle fill={eye} cx="216.5" cy="181.5" r="14.5" />
|
<circle fill={eye} cx="216.5" cy="181.5" r="14.5" />
|
||||||
<circle fill={eye} cx="104.5" cy="181.5" r="14.5" />
|
<circle fill={eye} cx="104.5" cy="181.5" r="14.5" />
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { ProxyPageFab } from 'src/components/proxies/ProxyPageFab';
|
||||||
import { ProxyProviderList } from 'src/components/proxies/ProxyProviderList';
|
import { ProxyProviderList } from 'src/components/proxies/ProxyProviderList';
|
||||||
import Settings from 'src/components/proxies/Settings';
|
import Settings from 'src/components/proxies/Settings';
|
||||||
import BaseModal from 'src/components/shared/BaseModal';
|
import BaseModal from 'src/components/shared/BaseModal';
|
||||||
import { TextFilter } from 'src/components/shared/TextFitler';
|
import { TextFilter } from '$src/components/shared/TextFilter';
|
||||||
import { connect, useStoreActions } from 'src/components/StateProvider';
|
import { connect, useStoreActions } from 'src/components/StateProvider';
|
||||||
import Equalizer from 'src/components/svg/Equalizer';
|
import Equalizer from 'src/components/svg/Equalizer';
|
||||||
import { getClashAPIConfig } from 'src/store/app';
|
import { getClashAPIConfig } from 'src/store/app';
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
height: var(--size-dot);
|
height: var(--size-dot);
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
// For non-primitive proxy type like "Selector", "LoadBalance", "DIRECT", etc. we are using a transparent
|
// For non-primitive proxy type like "Selector", "LoadBalance", "DIRECT", etc. we are using a transparent
|
||||||
// background, and this selected indicator has a white background. In "light" them mode, the constrast
|
// background, and this selected indicator has a white background. In "light" them mode, the contrast
|
||||||
// between the bg of the indicator and the "background" is too small. In that case we want to add a
|
// between the bg of the indicator and the "background" is too small. In that case we want to add a
|
||||||
// border around this indicator so it's more distinguishable.
|
// border around this indicator so it's more distinguishable.
|
||||||
border: 1px solid var(--color-proxy-dot-selected-ind-bo);
|
border: 1px solid var(--color-proxy-dot-selected-ind-bo);
|
||||||
|
|
|
@ -6,7 +6,7 @@ import Button from 'src/components/Button';
|
||||||
import CollapsibleSectionHeader from 'src/components/CollapsibleSectionHeader';
|
import CollapsibleSectionHeader from 'src/components/CollapsibleSectionHeader';
|
||||||
import { useUpdateProviderItem } from 'src/components/proxies/proxies.hooks';
|
import { useUpdateProviderItem } from 'src/components/proxies/proxies.hooks';
|
||||||
import { connect, useStoreActions } from 'src/components/StateProvider';
|
import { connect, useStoreActions } from 'src/components/StateProvider';
|
||||||
import { framerMotionResouce } from 'src/misc/motion';
|
import { framerMotionResource } from 'src/misc/motion';
|
||||||
import {
|
import {
|
||||||
getClashAPIConfig,
|
getClashAPIConfig,
|
||||||
getCollapsibleIsOpen,
|
getCollapsibleIsOpen,
|
||||||
|
@ -113,7 +113,7 @@ const arrow = {
|
||||||
hover: { rotate: 360, transition: { duration: 0.3 } },
|
hover: { rotate: 360, transition: { duration: 0.3 } },
|
||||||
};
|
};
|
||||||
function Refresh() {
|
function Refresh() {
|
||||||
const module = framerMotionResouce.read();
|
const module = framerMotionResource.read();
|
||||||
const motion = module.motion;
|
const motion = module.motion;
|
||||||
return (
|
return (
|
||||||
<motion.div
|
<motion.div
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import type { RecoilState } from 'recoil';
|
import type { RecoilState } from 'recoil';
|
||||||
import { useTextInut } from 'src/hooks/useTextInput';
|
import { useTextInput } from 'src/hooks/useTextInput';
|
||||||
|
|
||||||
import s from './TextFitler.module.scss';
|
import s from './TextFilter.module.scss';
|
||||||
|
|
||||||
export function TextFilter(props: { textAtom: RecoilState<string>; placeholder?: string }) {
|
export function TextFilter(props: { textAtom: RecoilState<string>; placeholder?: string }) {
|
||||||
const [onChange, text] = useTextInut(props.textAtom);
|
const [onChange, text] = useTextInput(props.textAtom);
|
||||||
return (
|
return (
|
||||||
<input
|
<input
|
||||||
className={s.input}
|
className={s.input}
|
|
@ -5,7 +5,7 @@ import * as React from 'react';
|
||||||
import { Check } from 'react-feather';
|
import { Check } from 'react-feather';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { connect } from 'src/components/StateProvider';
|
import { connect } from 'src/components/StateProvider';
|
||||||
import { framerMotionResouce } from 'src/misc/motion';
|
import { framerMotionResource } from 'src/misc/motion';
|
||||||
import { getTheme, switchTheme } from 'src/store/app';
|
import { getTheme, switchTheme } from 'src/store/app';
|
||||||
import { State } from 'src/store/types';
|
import { State } from 'src/store/types';
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ function ThemeMenuItem(props: {
|
||||||
}
|
}
|
||||||
|
|
||||||
function MoonA() {
|
function MoonA() {
|
||||||
const module = framerMotionResouce.read();
|
const module = framerMotionResource.read();
|
||||||
const motion = module.motion;
|
const motion = module.motion;
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
|
@ -87,7 +87,7 @@ function MoonA() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function Sun() {
|
function Sun() {
|
||||||
const module = framerMotionResouce.read();
|
const module = framerMotionResource.read();
|
||||||
const motion = module.motion;
|
const motion = module.motion;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -118,7 +118,7 @@ function Sun() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function Auto() {
|
function Auto() {
|
||||||
const module = framerMotionResouce.read();
|
const module = framerMotionResource.read();
|
||||||
const motion = module.motion;
|
const motion = module.motion;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { RecoilState, useRecoilState } from 'recoil';
|
||||||
|
|
||||||
const { useCallback, useState, useMemo } = React;
|
const { useCallback, useState, useMemo } = React;
|
||||||
|
|
||||||
export function useTextInut(
|
export function useTextInput(
|
||||||
x: RecoilState<string>
|
x: RecoilState<string>
|
||||||
): [(e: React.ChangeEvent<HTMLInputElement>) => void, string] {
|
): [(e: React.ChangeEvent<HTMLInputElement>) => void, string] {
|
||||||
const [, setTextGlobal] = useRecoilState(x);
|
const [, setTextGlobal] = useRecoilState(x);
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
import { createResource } from './createResource';
|
import { createResource } from './createResource';
|
||||||
|
|
||||||
export const framerMotionResouce = createResource(() => import('framer-motion'));
|
export const framerMotionResource = createResource(() => import('framer-motion'));
|
||||||
|
|
|
@ -196,7 +196,7 @@ async function switchProxyImpl(
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log(err, 'failed to swith proxy');
|
console.log(err, 'failed to switch proxy');
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue