Skip to content

Commit

Permalink
feat: v1.2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
surmon-china committed Dec 20, 2021
1 parent 2a346cd commit 9dbd567
Show file tree
Hide file tree
Showing 12 changed files with 493 additions and 588 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to this project will be documented in this file.

### v1.2.9 (2021-12-21)

- Fix `antd` bundle error
- Improve bundle chunk

### v1.2.5 (2021-12-20)

- Improve Sider slogan text style
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "veact-admin",
"version": "1.2.8",
"version": "1.2.9",
"author": "Surmon",
"license": "MIT",
"repository": {
Expand All @@ -20,22 +20,22 @@
},
"dependencies": {
"ali-oss": "^6.16.0",
"antd": "^4.17.3",
"antd": "^4.17.4",
"axios": "^0.24.0",
"bezier-easing": "^2.1.0",
"classnames": "^2.3.1",
"gravatar": "^1.8.2",
"highlight.js": "^11.3.1",
"js-base64": "^3.7.2",
"lodash": "^4.17.21",
"marked": "^4.0.7",
"marked": "^4.0.8",
"moment": "^2.29.1",
"monaco-editor": "^0.30.1",
"monaco-editor": "^0.31.1",
"performant-array-to-tree": "^1.9.1",
"query-string": "^7.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^6.0.2",
"react-router-dom": "^6.2.1",
"react-top-loading-bar": "^2.1.0",
"react-transition-group": "^4.4.2",
"ua-parser-js": "^1.0.2",
Expand All @@ -47,20 +47,20 @@
"@types/gravatar": "^1.8.3",
"@types/lodash": "^4.14.178",
"@types/marked": "^4.0.1",
"@types/node": "^16.11.12",
"@types/node": "^17.0.1",
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.11",
"@types/react-transition-group": "^4.4.4",
"@types/ua-parser-js": "^0.7.36",
"@typescript-eslint/eslint-plugin": "^5.6.0",
"@typescript-eslint/parser": "^5.6.0",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"@vitejs/plugin-react-refresh": "^1.3.6",
"eslint": "^8.4.1",
"eslint": "^8.5.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"less": "^4.1.2",
"prettier": "^2.5.1",
"typescript": "^4.5.3",
"vite": "^2.7.1"
"typescript": "^4.5.4",
"vite": "^2.7.4"
}
}
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author Surmon <https://github.com/surmon-china>
*/

import { SizeType } from 'antd/lib/config-provider/SizeContext'
import type { SizeType } from 'antd/lib/config-provider/SizeContext'

export const APP_TITLE = 'Surmon.me'
export const BLOG_HOST = '//surmon.me'
Expand Down
12 changes: 10 additions & 2 deletions src/pages/Article/Editor/Category.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import React from 'react'
import { useRef, onMounted } from 'veact'
import { Spin, Button, Form, Tree, Typography, Divider, Space } from 'antd'
import { FormInstance } from 'antd/lib/form'
import {
Spin,
Button,
Form,
Tree,
Typography,
Divider,
Space,
FormInstance,
} from 'antd'
import { ReloadOutlined } from '@ant-design/icons'
import { useLoading } from 'veact-use'
import { getCategories, CategoryTree, getAntdTreeByTree } from '@/store/category'
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Article/Editor/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
Divider,
Space,
Typography,
FormInstance,
} from 'antd'
import {
ReloadOutlined,
Expand All @@ -20,7 +21,6 @@ import {
FileImageOutlined,
CloudUploadOutlined,
} from '@ant-design/icons'
import { FormInstance } from 'antd/lib/form'
import { UniversalEditor, UEditorLanguage } from '@/components/common/UniversalEditor'
import { MultipleUploader } from '@/components/common/ImageUploader'
import { getTags } from '@/store/tag'
Expand Down
3 changes: 1 addition & 2 deletions src/pages/Article/Editor/State.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react'
import { Button, Form, Select, Input, Divider, Space } from 'antd'
import { FormInstance } from 'antd/lib/form'
import { Button, Form, Select, Input, Divider, Space, FormInstance } from 'antd'
import { CheckOutlined } from '@ant-design/icons'
import { publishStates } from '@/constants/publish'
import { articleOrigins } from '@/constants/article/origin'
Expand Down
11 changes: 5 additions & 6 deletions src/pages/Article/Editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import React from 'react'
import { Ref, useWatch, onMounted } from 'veact'
import { Card, Row, Col, Form, message, Spin } from 'antd'
import { useForm } from 'antd/lib/form/Form'
import { APP_LAYOUT_GUTTER_SIZE } from '@/config'
import { ImageUploader } from '@/components/common/ImageUploader'
import { FormDataExtend } from '@/components/common/FormDataExtend'
Expand Down Expand Up @@ -54,11 +53,11 @@ export interface ArticleEditorProps {
onSubmit(article: Article): any
}
export const ArticleEditor: React.FC<ArticleEditorProps> = (props) => {
const [mainForm] = useForm<BaseFormModel>()
const [categoryFormModel] = useForm<CategoryFormModel>()
const [thumbFormModel] = useForm<ThumbFormModel>()
const [extendFormModel] = useForm<ExtendFormModel>()
const [stateFormModel] = useForm<StateFormModel>()
const [mainForm] = Form.useForm<BaseFormModel>()
const [categoryFormModel] = Form.useForm<CategoryFormModel>()
const [thumbFormModel] = Form.useForm<ThumbFormModel>()
const [extendFormModel] = Form.useForm<ExtendFormModel>()
const [stateFormModel] = Form.useForm<StateFormModel>()

const setFormsValue = (formValue: Article) => {
mainForm.setFieldsValue(formValue)
Expand Down
5 changes: 2 additions & 3 deletions src/pages/Category/EditModal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react'
import { Ref, useWatch } from 'veact'
import { Form, Input, Modal, TreeSelect, Typography, Divider } from 'antd'
import { DataNode } from 'antd/lib/tree'
import { Form, Input, Modal, TreeSelect, Typography, Divider, TreeDataNode } from 'antd'
import { FormDataExtend } from '@/components/common/FormDataExtend'
import { Category as CategoryType } from '@/constants/category'
import { stringToYMD } from '@/transforms/date'
Expand All @@ -17,7 +16,7 @@ export interface EditModalProps {
loading: boolean
visible: Ref<boolean>
category: Ref<CategoryType | null>
tree: DataNode[]
tree: TreeDataNode[]
categories: CategoryType[]
onSubmit(category: CategoryType): void
onCancel(): void
Expand Down
8 changes: 4 additions & 4 deletions src/pages/Dashboard/Analytics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ export const Analytics: React.FC = () => {
gapi.analytics.auth.authorize({
serverAuth: { access_token },
})

const viewSelector = new gapi.analytics.ViewSelector({
container: GOOGLE_CHART_VIEW_SELECTOR_ID,
})
viewSelector.execute()

const timeline = new gapi.analytics.googleCharts.DataChart({
reportType: 'ga',
query: {
Expand Down Expand Up @@ -111,7 +111,7 @@ export const Analytics: React.FC = () => {
},
},
})

const getPieChart = (dimensions: string, container: string, title: string) => {
return new gapi.analytics.googleCharts.DataChart({
query: {
Expand Down Expand Up @@ -185,7 +185,7 @@ export const Analytics: React.FC = () => {
GOOGLE_CHART_ID_MAP.OS,
'操作系统'
)

viewSelector.on('change', (ids: any) => {
const newIds = {
query: { ids },
Expand Down
4 changes: 2 additions & 2 deletions src/store/category.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { arrayToTree } from 'performant-array-to-tree'
import { DataNode } from 'antd/lib/tree'
import { TreeDataNode } from 'antd'

import http from '@/services/http'
import { Category } from '@/constants/category'
Expand Down Expand Up @@ -38,7 +38,7 @@ export function getAntdTreeByTree(
tree: Array<CategoryTree>,
currentCategoryId?: string
) {
const toAntdTree = (_tree: Array<CategoryTree>): DataNode[] => {
const toAntdTree = (_tree: Array<CategoryTree>): TreeDataNode[] => {
return _tree.map((category) => ({
data: category,
title: category.name,
Expand Down
4 changes: 2 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const config: UserConfig = {
if (id.includes('node_modules/monaco-editor')) {
return 'monaco-editor'
} else if (
['lodash', 'marked', 'antd', '@ant-design', 'moment', 'highlight.js'].some(
(exp) => id.includes(`/node_modules/${exp}`)
['axios', 'lodash', 'moment', 'marked', 'highlight.js'].some((exp) =>
id.includes(`/node_modules/${exp}`)
)
) {
return 'basic'
Expand Down
Loading

0 comments on commit 9dbd567

Please sign in to comment.