Skip to content

Commit

Permalink
[optimize] upgrade Upstream packages
Browse files Browse the repository at this point in the history
  • Loading branch information
TechQuery committed Jan 10, 2021
1 parent f7139af commit 8fd5f05
Show file tree
Hide file tree
Showing 12 changed files with 63 additions and 47 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,24 @@ on:
push:
branches:
- dev
pull_request:
branches:
- dev
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
node-version: '14'
- name: Install & build
run: |
npm install
npm run build
echo wuhan2020.kaiyuanshe.cn > dist/CNAME
- name: Deploy
uses: peaceiris/[email protected]
env:
PUBLISH_DIR: ./dist
PUBLISH_BRANCH: gh-pages
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
uses: peaceiris/actions-gh-pages@v3
with:
forceOrphan: true
publish_dir: ./dist
cname: wuhan2020.kaiyuanshe.cn
personal_token: ${{ secrets.GITHUB_TOKEN }}
force_orphan: true
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
},
"main": "source/index.html",
"dependencies": {
"boot-cell": "^1.9.1",
"boot-cell": "^1.9.3",
"browser-unhandled-rejection": "^1.0.2",
"cell-router": "^2.0.3",
"cell-router": "^2.0.4",
"classnames": "^2.2.6",
"clipboard-polyfill": "^3.0.1",
"clipboard-polyfill": "^3.0.2",
"echarts": "^4.9.0",
"github-web-widget": "^3.0.0-beta.8",
"iterable-observer": "^1.0.0-beta.5",
Expand All @@ -27,24 +27,24 @@
"marked": "^1.2.7",
"mobx": "^5.15.7",
"mobx-web-cell": "^0.3.4",
"web-cell": "^2.3.0-beta.4",
"web-utility": "^2.2.2",
"web-cell": "^2.3.0-rc.1",
"web-utility": "^2.4.3",
"yaml": "^1.10.0"
},
"devDependencies": {
"@babel/helper-compilation-targets": "^7.12.5",
"@octokit/openapi-types": "^2.0.1",
"@octokit/openapi-types": "^2.2.0",
"@types/classnames": "^2.2.11",
"@types/echarts": "^4.9.3",
"@types/js-base64": "^3.0.0",
"@types/marked": "^1.2.1",
"@types/yaml": "^1.9.7",
"@typescript-eslint/parser": "^4.11.1",
"@typescript-eslint/parser": "^4.12.0",
"autoprefixer": "^9.8.6",
"cross-env": "^7.0.3",
"eslint": "^7.16.0",
"husky": "^4.3.6",
"less": "^4.0.0",
"eslint": "^7.17.0",
"husky": "^4.3.7",
"less": "^4.1.0",
"lint-staged": "^10.5.3",
"parcel-bundler": "^1.12.4",
"postcss-modules": "^3.2.2",
Expand Down
3 changes: 2 additions & 1 deletion source/component/AddressField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import {
createCell,
Fragment
} from 'web-cell';
import type { HTMLFieldProps } from 'web-utility';
import { Field } from 'boot-cell/source/Form/Field';

import { searchAddress, coordsOf } from '../service';

interface AddressFieldProps extends WebCellProps {
export interface AddressFieldProps extends HTMLFieldProps, WebCellProps {
place?: string;
province: string;
city: string;
Expand Down
11 changes: 5 additions & 6 deletions source/page/Admin/User.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { component, mixin, createCell } from 'web-cell';
import { observer } from 'mobx-web-cell';
import { SpinnerBox } from 'boot-cell/source/Prompt/Spinner';
import 'boot-cell/source/Content/EdgeDetector';
import { EdgeEvent } from 'boot-cell/source/Content/EdgeDetector';
import { Table, TableRow } from 'boot-cell/source/Content/Table';
import { ToggleField } from 'boot-cell/source/Form/ToggleField';
import { Button } from 'boot-cell/source/Form/Button';
import { EdgeEvent, EdgeDetector } from 'boot-cell/source/Content/EdgeDetector';
import { Table, TableRow } from 'boot-cell/source/Content/Table';

import { User } from '../../service';
import { user } from '../../model';
import { Button } from 'boot-cell/source/Form/Button';

@observer
@component({
Expand Down Expand Up @@ -88,7 +87,7 @@ export class UserAdmin extends mixin() {
</form>
</header>

<edge-detector onTouchEdge={this.loadMore}>
<EdgeDetector onTouchEdge={this.loadMore}>
<Table center striped hover>
<TableRow type="head">
<th>手机号</th>
Expand All @@ -101,7 +100,7 @@ export class UserAdmin extends mixin() {
<p slot="bottom" className="text-center mt-2">
{noMore ? '没有更多数据了' : '加载更多...'}
</p>
</edge-detector>
</EdgeDetector>
</SpinnerBox>
);
}
Expand Down
4 changes: 2 additions & 2 deletions source/page/Clinic/Edit.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { component, mixin, watch, createCell } from 'web-cell';
import { WebCellProps, component, mixin, watch, createCell } from 'web-cell';
import { FormField } from 'boot-cell/source/Form/FormField';
import { InputGroup } from 'boot-cell/source/Form/InputGroup';
import { Field } from 'boot-cell/source/Form/Field';
Expand All @@ -8,7 +8,7 @@ import { Clinic, history, clinic } from '../../model';
import { RouteRoot } from '../data/menu';
import { SessionBox, ContactField } from '../../component';

interface ClinicEditProps {
export interface ClinicEditProps extends WebCellProps {
dataId?: string;
}

Expand Down
8 changes: 6 additions & 2 deletions source/page/Donation/edit.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { component, mixin, watch, createCell } from 'web-cell';
import { WebCellProps, component, mixin, watch, createCell } from 'web-cell';
import { FormField } from 'boot-cell/source/Form/FormField';
import { InputGroup } from 'boot-cell/source/Form/InputGroup';
import { Field } from 'boot-cell/source/Form/Field';
Expand All @@ -14,12 +14,16 @@ import {
import { Contact } from '../../service';
import { SessionBox, ContactField } from '../../component';

export interface DonationEditProps extends WebCellProps {
dataId: string;
}

@component({
tagName: 'donation-edit',
renderTarget: 'children'
})
export class DonationEdit extends mixin<
{ dataId: string },
DonationEditProps,
DonationRecipient
>() {
@watch
Expand Down
8 changes: 6 additions & 2 deletions source/page/Factory/edit.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { component, mixin, watch, createCell } from 'web-cell';
import { component, mixin, watch, createCell, WebCellProps } from 'web-cell';
import { FormField } from 'boot-cell/source/Form/FormField';
import { Button } from 'boot-cell/source/Form/Button';

Expand All @@ -14,11 +14,15 @@ import {
ContactField
} from '../../component';

export interface FactoryEditProps extends WebCellProps {
dataId: string;
}

@component({
tagName: 'factory-edit',
renderTarget: 'children'
})
export class FactoryEdit extends mixin<{ dataId: string }, Factory>() {
export class FactoryEdit extends mixin<FactoryEditProps, Factory>() {
@watch
dataId = '';

Expand Down
2 changes: 1 addition & 1 deletion source/page/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function HomePage() {
/>
<ul className="row list-unstyled">
{menu.slice(1, -1).map(({ title, href, icon }) => (
<li class="col-sm-6 col-md-6 col-lg-4">
<li className="col-sm-6 col-md-6 col-lg-4">
<a
className="card text-center text-decoration-none mb-3"
href={href}
Expand Down
8 changes: 6 additions & 2 deletions source/page/Hospital/Edit.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { component, mixin, watch, createCell } from 'web-cell';
import { WebCellProps, component, mixin, watch, createCell } from 'web-cell';
import { FormField } from 'boot-cell/source/Form/FormField';
import { Button } from 'boot-cell/source/Form/Button';

Expand All @@ -19,12 +19,16 @@ import {
SuppliesField
} from '../../component';

export interface HospitalEditProps extends WebCellProps {
dataId: string;
}

@component({
tagName: 'hospital-edit',
renderTarget: 'children'
})
export class HospitalEdit extends mixin<
{ dataId: string },
HospitalEditProps,
SuppliesRequirement
>() {
@watch
Expand Down
8 changes: 6 additions & 2 deletions source/page/Hotel/Edit.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { component, mixin, watch, createCell } from 'web-cell';
import { WebCellProps, component, mixin, watch, createCell } from 'web-cell';
import { FormField } from 'boot-cell/source/Form/FormField';
import { Button } from 'boot-cell/source/Form/Button';

Expand All @@ -7,11 +7,15 @@ import { Hotel, hotel, history } from '../../model';
import { GeoCoord, Contact } from '../../service';
import { SessionBox, AddressField, ContactField } from '../../component';

export interface HotelEditProps extends WebCellProps {
dataId: string;
}

@component({
tagName: 'hotel-edit',
renderTarget: 'children'
})
export class HotelEdit extends mixin<{ dataId: string }, Hotel>() {
export class HotelEdit extends mixin<HotelEditProps, Hotel>() {
@watch
dataId = '';

Expand Down
12 changes: 8 additions & 4 deletions source/page/Logistics/Edit.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { component, mixin, watch, createCell } from 'web-cell';
import { WebCellProps, component, mixin, watch, createCell } from 'web-cell';
import { FormField } from 'boot-cell/source/Form/FormField';
import { InputGroup } from 'boot-cell/source/Form/InputGroup';
import { Field } from 'boot-cell/source/Form/Field';
Expand All @@ -14,11 +14,15 @@ const initServiceArea: ServiceArea = {
personal: false
};

export interface LogisticsEditProps extends WebCellProps {
dataId: string;
}

@component({
tagName: 'logistics-edit',
renderTarget: 'children'
})
export class LogisticsEdit extends mixin<{ dataId: string }, Logistics>() {
export class LogisticsEdit extends mixin<LogisticsEditProps, Logistics>() {
@watch
dataId = '';

Expand Down Expand Up @@ -154,13 +158,13 @@ export class LogisticsEdit extends mixin<{ dataId: string }, Logistics>() {
是否接受个人捐赠
</option>
<option
value={true}
value="true"
selected={personal}
>
</option>
<option
value={false}
value="false"
selected={!personal}
>
Expand Down
5 changes: 3 additions & 2 deletions source/page/Map/component/HierarchicalVirusMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
* resolution: 时间精度
*/
import {
WebCellProps,
component,
mixin,
createCell,
attribute,
watch,
createCell,
Fragment
} from 'web-cell';
import { observer } from 'mobx-web-cell';
Expand All @@ -32,7 +33,7 @@ import {

import style from './HierarchicalVirusMap.module.css';

interface Props {
interface Props extends WebCellProps {
data: OverallCountryData;
resolution: number;
}
Expand Down

0 comments on commit 8fd5f05

Please sign in to comment.