mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-13 05:20:28 +08:00
Compare commits
3 Commits
acf7ddf896
...
70ee047f7a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70ee047f7a | ||
|
|
c2aa9d79ff | ||
|
|
bff78d96b4 |
@ -1,13 +0,0 @@
|
|||||||
# README.md
|
|
||||||
# Changelog.md
|
|
||||||
# CONTRIBUTING.md
|
|
||||||
|
|
||||||
.changelog_backups
|
|
||||||
pnpm-lock.yaml
|
|
||||||
|
|
||||||
src-tauri/target/
|
|
||||||
src-tauri/gen/
|
|
||||||
|
|
||||||
target
|
|
||||||
Cargo.lock
|
|
||||||
.github/workflows/*.lock.yml
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"semi": false,
|
|
||||||
"singleQuote": true,
|
|
||||||
"plugins": ["prettier-plugin-toml"]
|
|
||||||
}
|
|
||||||
46
biome.json
Normal file
46
biome.json
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://biomejs.dev/schemas/2.4.10/schema.json",
|
||||||
|
"assist": {
|
||||||
|
"actions": {
|
||||||
|
"source": {
|
||||||
|
"organizeImports": "off"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"linter": {
|
||||||
|
"enabled": true,
|
||||||
|
"rules": {
|
||||||
|
"recommended": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"formatter": {
|
||||||
|
"enabled": true,
|
||||||
|
"indentStyle": "space",
|
||||||
|
"indentWidth": 2,
|
||||||
|
"lineWidth": 80
|
||||||
|
},
|
||||||
|
"javascript": {
|
||||||
|
"formatter": {
|
||||||
|
"quoteStyle": "single",
|
||||||
|
"trailingCommas": "all",
|
||||||
|
"semicolons": "asNeeded"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"files": {
|
||||||
|
"includes": [
|
||||||
|
"**",
|
||||||
|
"!dist",
|
||||||
|
"!node_modules",
|
||||||
|
"!src-tauri/target",
|
||||||
|
"!src-tauri/gen",
|
||||||
|
"!target",
|
||||||
|
"!Cargo.lock",
|
||||||
|
"!pnpm-lock.yaml",
|
||||||
|
"!README.md",
|
||||||
|
"!Changelog.md",
|
||||||
|
"!CONTRIBUTING.md",
|
||||||
|
"!.changelog_backups",
|
||||||
|
"!.github/workflows/*.lock.yml"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
18
package.json
18
package.json
@ -26,8 +26,8 @@
|
|||||||
"publish-version": "node scripts/publish-version.mjs",
|
"publish-version": "node scripts/publish-version.mjs",
|
||||||
"lint": "eslint -c eslint.config.ts --max-warnings=0 --cache --cache-location .eslintcache src",
|
"lint": "eslint -c eslint.config.ts --max-warnings=0 --cache --cache-location .eslintcache src",
|
||||||
"lint:fix": "eslint -c eslint.config.ts --max-warnings=0 --cache --cache-location .eslintcache --fix src",
|
"lint:fix": "eslint -c eslint.config.ts --max-warnings=0 --cache --cache-location .eslintcache --fix src",
|
||||||
"format": "prettier --write .",
|
"format": "biome format --write .",
|
||||||
"format:check": "prettier --check .",
|
"format:check": "biome format .",
|
||||||
"i18n:check": "node scripts/cleanup-unused-i18n.mjs",
|
"i18n:check": "node scripts/cleanup-unused-i18n.mjs",
|
||||||
"i18n:format": "node scripts/cleanup-unused-i18n.mjs --align --apply",
|
"i18n:format": "node scripts/cleanup-unused-i18n.mjs --align --apply",
|
||||||
"i18n:types": "node scripts/generate-i18n-keys.mjs",
|
"i18n:types": "node scripts/generate-i18n-keys.mjs",
|
||||||
@ -81,6 +81,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@actions/github": "^9.0.0",
|
"@actions/github": "^9.0.0",
|
||||||
|
"@biomejs/biome": "^2.4.10",
|
||||||
"@eslint-react/eslint-plugin": "^4.0.0",
|
"@eslint-react/eslint-plugin": "^4.0.0",
|
||||||
"@eslint/js": "^10.0.1",
|
"@eslint/js": "^10.0.1",
|
||||||
"@tauri-apps/cli": "2.10.1",
|
"@tauri-apps/cli": "2.10.1",
|
||||||
@ -92,9 +93,8 @@
|
|||||||
"@types/validator": "^13.15.10",
|
"@types/validator": "^13.15.10",
|
||||||
"@vitejs/plugin-legacy": "^8.0.0",
|
"@vitejs/plugin-legacy": "^8.0.0",
|
||||||
"@vitejs/plugin-react": "^6.0.1",
|
"@vitejs/plugin-react": "^6.0.1",
|
||||||
"adm-zip": "^0.5.16",
|
|
||||||
"axios": "^1.13.6",
|
"axios": "^1.13.6",
|
||||||
"babel-plugin-react-compiler": "^1.0.0",
|
"adm-zip": "^0.5.16",
|
||||||
"cli-color": "^2.0.4",
|
"cli-color": "^2.0.4",
|
||||||
"commander": "^14.0.3",
|
"commander": "^14.0.3",
|
||||||
"cross-env": "^10.1.0",
|
"cross-env": "^10.1.0",
|
||||||
@ -112,8 +112,6 @@
|
|||||||
"jiti": "^2.6.1",
|
"jiti": "^2.6.1",
|
||||||
"lint-staged": "^16.4.0",
|
"lint-staged": "^16.4.0",
|
||||||
"node-fetch": "^3.3.2",
|
"node-fetch": "^3.3.2",
|
||||||
"prettier": "^3.8.1",
|
|
||||||
"prettier-plugin-toml": "^2.0.6",
|
|
||||||
"sass": "^1.98.0",
|
"sass": "^1.98.0",
|
||||||
"tar": "^7.5.12",
|
"tar": "^7.5.12",
|
||||||
"terser": "^5.46.1",
|
"terser": "^5.46.1",
|
||||||
@ -123,12 +121,12 @@
|
|||||||
"vite-plugin-svgr": "^5.0.0"
|
"vite-plugin-svgr": "^5.0.0"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{ts,tsx}": [
|
"*.{ts,tsx,js,mjs}": [
|
||||||
"eslint --fix --max-warnings=0",
|
"eslint --fix --max-warnings=0",
|
||||||
"prettier --write"
|
"biome format --write"
|
||||||
],
|
],
|
||||||
"*.{js,mjs,css,scss,json,md,toml,yaml,yml}": [
|
"*.{css,scss,json,md,yaml,yml}": [
|
||||||
"prettier --write"
|
"biome format --write"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
909
pnpm-lock.yaml
generated
909
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1,58 +1,57 @@
|
|||||||
import { alpha, Box, styled } from '@mui/material'
|
import { alpha, Box, styled } from '@mui/material'
|
||||||
|
|
||||||
export const ProfileBox = styled(Box)(({
|
export const ProfileBox = styled(Box)(
|
||||||
theme,
|
({ theme, 'aria-selected': selected }) => {
|
||||||
'aria-selected': selected,
|
const { mode, primary, text } = theme.palette
|
||||||
}) => {
|
const key = `${mode}-${!!selected}`
|
||||||
const { mode, primary, text } = theme.palette
|
|
||||||
const key = `${mode}-${!!selected}`
|
|
||||||
|
|
||||||
const backgroundColor = mode === 'light' ? '#ffffff' : '#282A36'
|
const backgroundColor = mode === 'light' ? '#ffffff' : '#282A36'
|
||||||
|
|
||||||
const color = {
|
const color = {
|
||||||
'light-true': text.secondary,
|
'light-true': text.secondary,
|
||||||
'light-false': text.secondary,
|
'light-false': text.secondary,
|
||||||
'dark-true': alpha(text.secondary, 0.65),
|
'dark-true': alpha(text.secondary, 0.65),
|
||||||
'dark-false': alpha(text.secondary, 0.65),
|
'dark-false': alpha(text.secondary, 0.65),
|
||||||
}[key]!
|
}[key]!
|
||||||
|
|
||||||
const h2color = {
|
const h2color = {
|
||||||
'light-true': primary.main,
|
'light-true': primary.main,
|
||||||
'light-false': text.primary,
|
'light-false': text.primary,
|
||||||
'dark-true': primary.main,
|
'dark-true': primary.main,
|
||||||
'dark-false': text.primary,
|
'dark-false': text.primary,
|
||||||
}[key]!
|
}[key]!
|
||||||
|
|
||||||
const borderSelect = {
|
const borderSelect = {
|
||||||
'light-true': {
|
'light-true': {
|
||||||
borderLeft: `3px solid ${primary.main}`,
|
borderLeft: `3px solid ${primary.main}`,
|
||||||
width: `calc(100% + 3px)`,
|
width: `calc(100% + 3px)`,
|
||||||
marginLeft: `-3px`,
|
marginLeft: `-3px`,
|
||||||
},
|
},
|
||||||
'light-false': {
|
'light-false': {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
},
|
},
|
||||||
'dark-true': {
|
'dark-true': {
|
||||||
borderLeft: `3px solid ${primary.main}`,
|
borderLeft: `3px solid ${primary.main}`,
|
||||||
width: `calc(100% + 3px)`,
|
width: `calc(100% + 3px)`,
|
||||||
marginLeft: `-3px`,
|
marginLeft: `-3px`,
|
||||||
},
|
},
|
||||||
'dark-false': {
|
'dark-false': {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
},
|
},
|
||||||
}[key]
|
}[key]
|
||||||
|
|
||||||
return {
|
return {
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
display: 'block',
|
display: 'block',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
textAlign: 'left',
|
textAlign: 'left',
|
||||||
padding: '8px 16px',
|
padding: '8px 16px',
|
||||||
boxSizing: 'border-box',
|
boxSizing: 'border-box',
|
||||||
backgroundColor,
|
backgroundColor,
|
||||||
...borderSelect,
|
...borderSelect,
|
||||||
borderRadius: '8px',
|
borderRadius: '8px',
|
||||||
color,
|
color,
|
||||||
'& h2': { color: h2color },
|
'& h2': { color: h2color },
|
||||||
}
|
}
|
||||||
})
|
},
|
||||||
|
)
|
||||||
|
|||||||
3
src/types/global.d.ts
vendored
3
src/types/global.d.ts
vendored
@ -841,8 +841,7 @@ interface IProxySnellConfig extends IProxyBaseConfig {
|
|||||||
version?: number
|
version?: number
|
||||||
}
|
}
|
||||||
interface IProxyConfig
|
interface IProxyConfig
|
||||||
extends
|
extends IProxyBaseConfig,
|
||||||
IProxyBaseConfig,
|
|
||||||
IProxyDirectConfig,
|
IProxyDirectConfig,
|
||||||
IProxyDnsConfig,
|
IProxyDnsConfig,
|
||||||
IProxyHttpConfig,
|
IProxyHttpConfig,
|
||||||
|
|||||||
@ -10,11 +10,7 @@ export default defineConfig({
|
|||||||
server: { port: 3000 },
|
server: { port: 3000 },
|
||||||
plugins: [
|
plugins: [
|
||||||
svgr(),
|
svgr(),
|
||||||
react({
|
react(),
|
||||||
babel: {
|
|
||||||
plugins: ['babel-plugin-react-compiler'],
|
|
||||||
},
|
|
||||||
} as any),
|
|
||||||
legacy({
|
legacy({
|
||||||
modernTargets: ['edge>=109', 'safari>=14'],
|
modernTargets: ['edge>=109', 'safari>=14'],
|
||||||
renderLegacyChunks: false,
|
renderLegacyChunks: false,
|
||||||
@ -30,24 +26,6 @@ export default defineConfig({
|
|||||||
outDir: '../dist',
|
outDir: '../dist',
|
||||||
emptyOutDir: true,
|
emptyOutDir: true,
|
||||||
chunkSizeWarningLimit: 4000,
|
chunkSizeWarningLimit: 4000,
|
||||||
rollupOptions: {
|
|
||||||
output: {
|
|
||||||
manualChunks: (id) => {
|
|
||||||
if (id.includes('monaco-yaml')) return 'monaco-yaml'
|
|
||||||
if (
|
|
||||||
id.includes('node_modules/react/') ||
|
|
||||||
id.includes('node_modules/react-dom/')
|
|
||||||
)
|
|
||||||
return 'react'
|
|
||||||
if (id.includes('node_modules/react-router')) return 'router'
|
|
||||||
if (
|
|
||||||
id.includes('node_modules/i18next') ||
|
|
||||||
id.includes('node_modules/react-i18next')
|
|
||||||
)
|
|
||||||
return 'i18n'
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
@ -58,13 +36,4 @@ export default defineConfig({
|
|||||||
define: {
|
define: {
|
||||||
OS_PLATFORM: `"${process.platform}"`,
|
OS_PLATFORM: `"${process.platform}"`,
|
||||||
},
|
},
|
||||||
optimizeDeps: {
|
|
||||||
include: [
|
|
||||||
'react',
|
|
||||||
'react-dom',
|
|
||||||
'react-router-dom',
|
|
||||||
'i18next',
|
|
||||||
'react-i18next',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user