Compare commits

...

5 Commits

Author SHA1 Message Date
FatttSnake
dcc0017d63 Merge pull request 'Add auto import icon' (#4) from dev into master
Reviewed-on: #4
2023-08-31 23:31:14 +08:00
FatttSnake
a496ea3dc2 Merge pull request 'Add auto import svg as icon' (#3) from FatttSnake into dev
Reviewed-on: #3
2023-08-31 23:29:52 +08:00
9e9907434c Add auto import svg as icon 2023-08-31 23:21:16 +08:00
FatttSnake
10e7bdca59 Merge pull request 'Update package.json' (#1) from FatttSnake into dev
Reviewed-on: #1
2023-08-31 23:08:45 +08:00
ff803e579e Update package.json 2023-08-31 20:21:43 +08:00
5 changed files with 1933 additions and 890 deletions

2747
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -12,40 +12,43 @@
"preview": "vite preview"
},
"dependencies": {
"@ant-design/icons": "^5.1.4",
"antd": "^5.7.0",
"axios": "^1.4.0",
"@ant-design/icons": "^5.2.5",
"antd": "^5.8.5",
"axios": "^1.5.0",
"jwt-decode": "^3.1.2",
"localforage": "^1.10.0",
"lodash": "^4.17.21",
"match-sorter": "^6.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "^6.14.1",
"react-router-dom": "^6.14.1",
"sort-by": "^1.2.0"
"react-router": "^6.15.0",
"react-router-dom": "^6.15.0",
"sort-by": "^0.0.2"
},
"devDependencies": {
"@types/jsdom": "^21.1.1",
"@types/lodash": "^4.14.195",
"@types/node": "^20.4.2",
"@types/react": "^18.2.14",
"@types/react-dom": "^18.2.6",
"@typescript-eslint/eslint-plugin": "^5.61.0",
"@typescript-eslint/parser": "^5.61.0",
"@vitejs/plugin-react": "^4.0.1",
"eslint": "^8.44.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-standard-with-typescript": "^36.0.0",
"eslint-plugin-import": "^2.27.5",
"@svgr/core": "^8.1.0",
"@svgr/plugin-jsx": "^8.1.0",
"@types/jsdom": "^21.1.2",
"@types/lodash": "^4.14.197",
"@types/node": "^20.5.7",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"@vitejs/plugin-react": "^4.0.4",
"eslint": "^8.48.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-standard-with-typescript": "^39.0.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.1",
"eslint-plugin-react-refresh": "^0.4.3",
"jsdom": "^22.1.0",
"prettier": "^3.0.0",
"prettier": "^3.0.3",
"stylelint-config-prettier": "^9.0.5",
"typescript": "^5.0.2",
"vite": "^4.4.0"
"typescript": "^5.2.2",
"unplugin-icons": "^0.16.6",
"vite": "^4.4.9"
}
}

1
src/assets/svg/home.svg Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="24" height="24" viewBox="0 0 24 24"><g style="mix-blend-mode:passthrough"><g style="mix-blend-mode:passthrough"><path d="M11.2633,0.229798C11.6966,-0.0765992,12.3034,-0.0765992,12.7367,0.229798C12.7367,0.229798,23.5367,7.86616,23.5367,7.86616C23.829,8.07284,24,8.39063,24,8.72727C24,8.72727,24,20.7273,24,20.7273C24,21.5953,23.6207,22.4277,22.9456,23.0414C22.2704,23.6552,21.3548,24,20.4,24C20.4,24,3.6,24,3.6,24C2.64522,24,1.72955,23.6552,1.05442,23.0414C0.379284,22.4277,0,21.5953,0,20.7273C0,20.7273,0,8.72727,0,8.72727C0,8.39063,0.170968,8.07284,0.463271,7.86616C0.463271,7.86616,11.2633,0.229798,11.2633,0.229798C11.2633,0.229798,11.2633,0.229798,11.2633,0.229798ZM9.6,21.8182C9.6,21.8182,14.4,21.8182,14.4,21.8182C14.4,21.8182,14.4,13.0909,14.4,13.0909C14.4,13.0909,9.6,13.0909,9.6,13.0909C9.6,13.0909,9.6,21.8182,9.6,21.8182C9.6,21.8182,9.6,21.8182,9.6,21.8182ZM16.8,21.8182C16.8,21.8182,16.8,12,16.8,12C16.8,11.3975,16.2628,10.9091,15.6,10.9091C15.6,10.9091,8.4,10.9091,8.4,10.9091C7.73726,10.9091,7.2,11.3975,7.2,12C7.2,12,7.2,21.8182,7.2,21.8182C7.2,21.8182,3.6,21.8182,3.6,21.8182C3.28174,21.8182,2.97652,21.7032,2.75147,21.4987C2.52643,21.2941,2.4,21.0166,2.4,20.7273C2.4,20.7273,2.4,9.26081,2.4,9.26081C2.4,9.26081,12,2.47294,12,2.47294C12,2.47294,21.6,9.26081,21.6,9.26081C21.6,9.26081,21.6,20.7273,21.6,20.7273C21.6,21.0166,21.4735,21.2941,21.2485,21.4987C21.0235,21.7032,20.7182,21.8182,20.4,21.8182C20.4,21.8182,16.8,21.8182,16.8,21.8182C16.8,21.8182,16.8,21.8182,16.8,21.8182Z" fill-rule="evenodd" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -22,7 +22,9 @@
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,
"types": ["unplugin-icons/types/react"]
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]

View File

@@ -2,13 +2,27 @@ import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import Icons from 'unplugin-icons/vite'
import { FileSystemIconLoader } from 'unplugin-icons/loaders'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
plugins: [
react(),
Icons({
compiler: 'jsx',
jsx: 'react',
autoInstall: true,
customCollections: {
framework: FileSystemIconLoader('src/assets/svg', (svg) =>
svg.replace(/^svg /, '<svg fill="currentColor"')
)
}
})
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
}
}
})