Skip to content

Commit

Permalink
ant design pro v5 发布 (#8642)
Browse files Browse the repository at this point in the history
* init

* remove Authorized

* remove login

* remove request

* remove path-to-regexp"

* remove create-umi

* clean dependencies

* remove unused less

* better login mock

* add ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION=site env

* support settings dynamic

* support umi-plugin-setting-drawer

* 🎨 format: clean code

* remove clean fetch:blocks

* add NoticeIcon

* add NoticeIcon

* use  "@ant-design/pro-layout": "6.0.0-1"

* support errorHandler

* remove SelectLang

* update version

* PageHeaderWrapper to PageContainer

* PageHeaderWrapper to PageContainer (#6622)

* 📌 versions: use alpha version (#6634)

* use alpha version

5.0.0 no yet

* less test

* fix lint error

* rename setting

Co-authored-by: chenshuai2144 <[email protected]>

* fix 401 do not to login error

* 405 start:no-mock

* siderWidth: 208

* side

* false

* username

* remove resolutions

* update list demo

* correct the text

* fix tabs style in [email protected]

* fix login error

* use  "@ant-design/pro-layout": "6.0.0-5"

* eslint

* access

* pro-layout 6.0.0-7

* merge master

* up layout version

* 💄 UI: fix login style warning

* upgrade dependency

* delete throw error

* versions: up @umijs/fabric

* change login

* do not open defaultOpenAll

* rebase error

* update demos

* deps upgreade

* 🐛 修复切换不同权限的账户登录后,access的鉴权不生效问题 (#6997)

* 🐛 修复切换不同权限的账户登录后,access的鉴权不生效问题

* 🎨 prettier code

* 修改hash路由下search参数在hash之前,search最后一个参数错误bug (#6908)

* 🐛 bug: fix tsc error

* config.js里面 history.type 为 hash时,退出重登录后,拼接返回路径时,#号前路径会重复

* prettier all code

* merge master

* 🐛 bug: fix the problem that modifying URL can bypass permissions

* reset hash

* fix infinite loop of login page (#7095)

* merge master

* rm unuse code

* rm unuse code

* remove unuse code

* 🐛 bug: fix redirect error in hash mode

* fix redirect

* 💥 feat: support defaultSettings

close #7407

* sort

* sorter

* default close umi ui

* goto reload window.location.href

* add setupTests.js

* add localStorageMock init

* open esbuild

* add exportStatic

* better code

* add initialStateConfig

* remove unuse code

* login 翻译

* add key

* update siderWidth

close #7585

* fix redirect error

close #7632

* add childrenRender type

* better styles

* better styles

* remove unuse code

close #7648

* default use browser history

* close

* support unAccessible

* up @umijs/preset-react version

* merge master

* support dumi function

* ✨ feat: add react-dev-inspector plugins

* 🚑 hotfix: support InspectorWrapper

* 🚑 hotfix: support InspectorWrapper

* add dumi docs href

* 👷 CI: fix Deploy CI

* 👷 CI : fix azure-pipelines

* fix keys error

* fix: version (#7789)

* fix lint

* fix lint

* fix typo

* fix type

* better code

* add openAPI plugins

* use openapi plugins

* support schemaPath = url

* add umi-plugins

* add dumi doc

* add plugin doc

* add config doc

* fix: outLogin request  method (#8059) (#8061)

Co-authored-by: luqili <[email protected]>

* 非 dev 环境不展示 openapi

* locale pt_br Pages added (#8088)

* revert surge preview

* test: update rebase action

* add persian local and fix menu direction for rtl display (#8079)

* up @umijs/preset-dumi version

* up typescript verison

* add waterMark

* default open webpack5

* default open webpack5

* support webpack5

* support openAPI is array

* upgrade deps

* dir

* 页面代码结构推荐

* Update global.tsx

* Update index.tsx

* refactor(app.tsx): dev links use Link

* loginPath

* fix ci

* fix tsc

* fix tsc

* fix(app.tsx): dev links use umi Link

* fix tes

* fix warn

* refactor(app.tsx): optimization import Link

* resetv5-app-tsx-links 

#8226

* use link to hash

* default open fastRefresh

* Update README.md (#8356)

Ant Design Pro V5 is not released yet.
`trial` is often used for released paid product, and `preview` is the regularly used word for pre-release version.

* Fixing a few issues with internationalization on the login (#7945)

Co-authored-by: chenshuai2144 <[email protected]>

* Update api.ts (#8424)

* chore: support verify commit

* fix locale error

* support all block

* locale: 增加标记,以便删除国际化脚本识别

* fix(locale): 删除request错误捕捉

* chore: remove tag

* chore: use fabric verify-commit

* chore: up to 5.0.0-beta.3

* chore: remove home page png

* use latest

* merge master

* fix conflict type and eslint waring! (#8644)

* chore: open mfsu and webpack5

* try fix ci

* fix ci

* try fix ci

* add test

* add test

* 增加加载时间

* fix test

* prettier all code

* docs: change oneapi doc

* chore: add umi

* rmeove unuse code

Co-authored-by: lijiehua <[email protected]>
Co-authored-by: 偏右 <[email protected]>
Co-authored-by: Jerry <[email protected]>
Co-authored-by: Vern Brandl <[email protected]>
Co-authored-by: Lee Fan <[email protected]>
Co-authored-by: zhangshuling <Zsl0516>
Co-authored-by: Justin <[email protected]>
Co-authored-by: Jeff Tian <[email protected]>
Co-authored-by: luqili <[email protected]>
Co-authored-by: luqili <[email protected]>
Co-authored-by: Thiago Tognoli <[email protected]>
Co-authored-by: abolfazl <[email protected]>
Co-authored-by: HouKunLin <[email protected]>
Co-authored-by: SHINCHVEN <[email protected]>
Co-authored-by: Scott Goci <[email protected]>
Co-authored-by: _XiaoTian <[email protected]>
Co-authored-by: 丁田秀 <[email protected]>
Co-authored-by: Jiankian <[email protected]>
  • Loading branch information
18 people authored Jul 1, 2021
1 parent 09ca467 commit a2d434f
Show file tree
Hide file tree
Showing 98 changed files with 3,178 additions and 2,510 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: [10.x, 12.x]
node_version: [12.x, 14.x]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1
Expand All @@ -16,7 +16,7 @@ jobs:
with:
node-version: ${{ matrix.node_version }}
- run: echo ${{github.ref}}
- run: npm install
- run: yarn
- run: yarn run lint
- run: yarn run tsc
- run: yarn run build
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ jobs:
uses: actions/checkout@master

- name: install
run: npm install
run: yarn

- name: plugins
run: yarn add umi-plugin-antd-theme umi-plugin-pro
run: yarn add umi-plugin-antd-theme umi-plugin-pro umi-plugin-setting-drawer

- name: fetch-blocks
run: yarn run pro fetch-blocks --branch=v5

- name: site
run: npm run site
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/preview-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:

- name: build
run: |
npm install
npm install umi-plugin-pro --save
npm run build
yarn
yarn add umi-plugin-pro --save
yarn build
- name: upload dist artifact
uses: actions/upload-artifact@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/preview-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Preview Deploy

on:
workflow_run:
workflows: ["Preview Build"]
workflows: ['Preview Build']
types:
- completed

Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Automatic Rebase
uses: cirrus-actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@master
with:
fetch-depth: 0
- name: Automatic Rebase
uses: cirrus-actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ An out-of-box UI solution for enterprise applications as a React boilerplate.
- FAQ: http://pro.ant.design/docs/faq
- Mirror Site in China: http://ant-design-pro.gitee.io

## 5.0 is ready for trial! 🎉🎉🎉
## 5.0 is ready for preview! 🎉🎉🎉

[Try Ant Design Pro 5.0.0](https://beta-pro.ant.design/docs/upgrade-v5-cn)

Expand Down
4 changes: 4 additions & 0 deletions config/config.dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ export default defineConfig({
babelPlugins: [],
babelOptions: {},
},
// mfsu: {},
// webpack5: {
// lazyCompilation: {},
// },
});
35 changes: 30 additions & 5 deletions config/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// https://umijs.org/config/
import { defineConfig } from 'umi';
import { join } from 'path';

import defaultSettings from './defaultSettings';
import proxy from './proxy';
import routes from './routes';
Expand All @@ -12,9 +14,13 @@ export default defineConfig({
dva: {
hmr: true,
},
history: {
type: 'browser',
layout: {
// https://umijs.org/zh-CN/plugins/plugin-layout
locale: true,
siderWidth: 208,
...defaultSettings,
},
// https://umijs.org/zh-CN/plugins/plugin-locale
locale: {
// default zh-CN
default: 'zh-CN',
Expand All @@ -23,7 +29,7 @@ export default defineConfig({
baseNavigator: true,
},
dynamicImport: {
loading: '@/components/PageLoading/index',
loading: '@ant-design/pro-layout/es/PageLoading',
},
targets: {
ie: 11,
Expand All @@ -34,14 +40,33 @@ export default defineConfig({
theme: {
'primary-color': defaultSettings.primaryColor,
},
// esbuild is father build tools
// https://umijs.org/plugins/plugin-esbuild
esbuild: {},
title: false,
ignoreMomentLocale: true,
proxy: proxy[REACT_APP_ENV || 'dev'],
manifest: {
basePath: '/',
},
// 快速刷新功能 https://umijs.org/config#fastrefresh
// Fast Refresh 热更新
fastRefresh: {},
esbuild: {},
openAPI: [
{
requestLibPath: "import { request } from 'umi'",
// 或者使用在线的版本
// schemaPath: "https://gw.alipayobjects.com/os/antfincdn/M%24jrzTTYJN/oneapi.json"
schemaPath: join(__dirname, 'oneapi.json'),
mock: false,
},
{
requestLibPath: "import { request } from 'umi'",
schemaPath: 'https://gw.alipayobjects.com/os/antfincdn/CA1dOm%2631B/openapi.json',
projectName: 'swagger',
},
],
nodeModulesTransform: { type: 'none' },
mfsu: {},
webpack5: {},
exportStatic: {},
});
20 changes: 9 additions & 11 deletions config/defaultSettings.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
import { Settings as ProSettings } from '@ant-design/pro-layout';
import { Settings as LayoutSettings } from '@ant-design/pro-layout';

type DefaultSettings = Partial<ProSettings> & {
pwa: boolean;
};

const proSettings: DefaultSettings = {
navTheme: 'dark',
const Settings: LayoutSettings & {
pwa?: boolean;
logo?: string;
} = {
navTheme: 'light',
// 拂晓蓝
primaryColor: '#1890ff',
layout: 'side',
layout: 'mix',
contentWidth: 'Fluid',
fixedHeader: false,
fixSiderbar: true,
colorWeak: false,
title: 'Ant Design Pro',
pwa: false,
logo: 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',
iconfontUrl: '',
};

export type { DefaultSettings };

export default proSettings;
export default Settings;
Loading

0 comments on commit a2d434f

Please sign in to comment.