Skip to content

Commit c4bb16b

Browse files
committed
Merge branch 'release/1.2.0' into released
2 parents d885225 + f125579 commit c4bb16b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+4347
-3446
lines changed

.storybook/addons.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
import '@storybook/addon-knobs/register'
22
import '@storybook/addon-actions/register'
33
import '@storybook/addon-links/register'
4-
import '@storybook/addon-options/register'

.storybook/config.js

Lines changed: 19 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,27 @@
1-
import { configure, addDecorator } from '@storybook/react'
1+
import { addParameters, configure, addDecorator } from '@storybook/react'
22
import { withKnobs } from '@storybook/addon-knobs'
3-
import { withInfo } from '@storybook/addon-info'
43
import { muiTheme } from 'storybook-addon-material-ui'
5-
import { withOptions } from '@storybook/addon-options'
6-
import { themes } from '@storybook/components'
74
import { MaskbookDarkTheme, MaskbookLightTheme } from '../src/utils/theme'
8-
import { merge } from 'lodash'
5+
import { create } from '@storybook/theming'
6+
function loadStories() {
7+
require('../src/stories/index')
8+
}
9+
configure(loadStories, module)
910

10-
// UI
11-
addDecorator(
12-
withOptions({
13-
name: 'Maskbook',
14-
addonPanelInRight: true,
15-
// @ts-ignore
16-
theme: { ...themes.dark, mainBackground: 'black' },
17-
}),
18-
)
19-
addDecorator(
20-
withInfo({
21-
inline: true,
22-
header: false,
23-
TableComponent,
24-
styles: x =>
25-
merge(x, {
26-
infoBody: { background: 'transparent', filter: 'invert(1)', padding: '0', border: 'none' },
27-
infoStory: { background: '#e8e8e8', padding: '2em' },
28-
infoContent: { marginTop: 16 },
29-
jsxInfoContent: { filter: 'invert(1)', marginTop: 16 },
30-
source: {
31-
h1: { fontWeight: 100 },
32-
},
33-
propTableHead: { fontWeight: 100 },
34-
}),
35-
}),
36-
)
11+
addParameters({
12+
options: {
13+
theme: create({
14+
base: 'dark',
15+
brandTitle: 'Maskbook',
16+
brandUrl: 'https://maskbook.io/',
17+
brandImage: 'https://maskbook.io/img/maskbook--logotype-white.png',
18+
}),
19+
isFullscreen: false,
20+
panelPosition: 'right',
21+
isToolshown: true,
22+
},
23+
})
3724
// Addons
3825
addDecorator(withKnobs)
3926
// Theme for MUI
4027
addDecorator(muiTheme([MaskbookLightTheme, MaskbookDarkTheme]))
41-
function loadStories() {
42-
require('../src/stories')
43-
}
44-
45-
configure(loadStories, module)
46-
47-
import React from 'react'
48-
import Table from '@material-ui/core/Table'
49-
import TableBody from '@material-ui/core/TableBody'
50-
import TableCell from '@material-ui/core/TableCell'
51-
import TableHead from '@material-ui/core/TableHead'
52-
import TableRow from '@material-ui/core/TableRow'
53-
54-
function TableComponent({ propDefinitions }) {
55-
const props = propDefinitions.map(({ property, propType, required, description, defaultValue }) => {
56-
return (
57-
<TableRow key={property}>
58-
<TableCell>
59-
{property}
60-
{required ? null : '?'}
61-
</TableCell>
62-
<TableCell>{propType.name}</TableCell>
63-
<TableCell>{defaultValue}</TableCell>
64-
<TableCell>{description}</TableCell>
65-
</TableRow>
66-
)
67-
})
68-
69-
return (
70-
<Table>
71-
<TableHead>
72-
<TableRow>
73-
<TableCell>名称</TableCell>
74-
<TableCell>类型</TableCell>
75-
<TableCell>默认值</TableCell>
76-
<TableCell>描述</TableCell>
77-
</TableRow>
78-
</TableHead>
79-
<TableBody>{props}</TableBody>
80-
</Table>
81-
)
82-
}

.storybook/webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
const path = require('path')
2-
module.exports = (baseConfig, env, config) => {
1+
module.exports = ({ config }) => {
32
config.module.rules.push({
43
test: /\.(ts|tsx)$/,
54
use: [
@@ -12,5 +11,6 @@ module.exports = (baseConfig, env, config) => {
1211
],
1312
})
1413
config.resolve.extensions.push('.ts', '.tsx')
14+
config.module.rules = config.module.rules.filter(x => x.enforce !== 'pre')
1515
return config
1616
}

.vscode/component.code-snippets

Lines changed: 0 additions & 40 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
# Maskbook &middot; ![GitHub license](https://img.shields.io/badge/license-AGPL-blue.svg?style=flat-square) ![Ciecle CI](https://img.shields.io/circleci/project/github/project-maskbook/Maskbook.svg?style=flat-square&logo=circleci)
1+
# Maskbook &middot; ![GitHub license](https://img.shields.io/badge/license-AGPL-blue.svg?style=flat-square) ![Ciecle CI](https://img.shields.io/circleci/project/github/DimensionDev/Maskbook.svg?style=flat-square&logo=circleci) [![Join the chat at https://gitter.im/Maskbook/community](https://badges.gitter.im/Maskbook/community.svg)](https://gitter.im/Maskbook/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) ![Chrome Web Store](https://img.shields.io/chrome-web-store/v/jkoeaghipilijlahjplgbfiocjhldnap.svg?logo=Maskbook&logoColor=%231c68f3&style=flat-square)
22

3-
[![Join the chat at https://gitter.im/Maskbook/community](https://badges.gitter.im/Maskbook/community.svg)](https://gitter.im/Maskbook/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
43

54
Encrypt your posts & chats on You-Know-Where. Allow only your friends to decrypt.
65

76
For general introductions, see https://Maskbook.io/
87

9-
[Install Maskbook](https://maskbook.io/install/)
8+
[Install Maskbook on Chrome Web Store](https://chrome.google.com/webstore/detail/maskbook/jkoeaghipilijlahjplgbfiocjhldnap/)
109

1110
## Documentation for developers
1211

config-overrides.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ module.exports = function override(/** @type{import("webpack").Configuration} */
2121
config.module.unknownContextCritical = false
2222

2323
// @ts-ignore
24-
config.plugins.push(new (require('write-file-webpack-plugin'))())
24+
config.plugins.push(
25+
new (require('write-file-webpack-plugin'))({
26+
test: /(static\/.*|.+\.png|index\.html|manifest\.json)/,
27+
}),
28+
)
29+
// Write files to /public
2530
config.plugins.push(
2631
new (require('copy-webpack-plugin'))(
2732
[
@@ -36,6 +41,7 @@ module.exports = function override(/** @type{import("webpack").Configuration} */
3641
for (const x of config.module.rules) {
3742
if (!x.oneOf) continue
3843
for (const rule of x.oneOf) {
44+
// Replace babel-loader with ts-loader
3945
if (rule.loader === require.resolve('babel-loader')) {
4046
if (rule.include) {
4147
rule.loader = require.resolve('ts-loader')
@@ -50,7 +56,11 @@ module.exports = function override(/** @type{import("webpack").Configuration} */
5056
}
5157
}
5258
config.module.rules.forEach(rule => {
59+
// Remove the babel-loader
5360
if (rule.oneOf) rule.oneOf = rule.oneOf.filter(x => x.loader !== require.resolve('babel-loader'))
5461
})
62+
// Disable the eslint linter. We have tslint.
63+
config.module.rules = config.module.rules.filter(x => x.enforce !== 'pre')
64+
config.output.futureEmitAssets = false
5565
return config
5666
}

package.json

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,42 @@
11
{
22
"name": "maskbook",
3-
"version": "1.1.1",
3+
"version": "1.2.0",
44
"private": true,
55
"dependencies": {
66
"@material-ui/core": "^3.9.2",
77
"@material-ui/icons": "^3.0.2",
8-
"@types/chrome": "^0.0.81",
8+
"@types/chrome": "^0.0.83",
99
"@types/classnames": "^2.2.7",
1010
"@types/gun": "^0.9.1",
1111
"@types/jest": "^24.0.6",
1212
"@types/lodash-es": "^4.17.3",
13-
"@types/node": "11.9.4",
14-
"@types/react": "16.8.4",
15-
"@types/react-dom": "16.8.2",
13+
"@types/node": "11.13.7",
14+
"@types/react": "16.8.14",
15+
"@types/react-dom": "16.8.4",
16+
"@types/react-jss": "^8.6.3",
1617
"@types/tiny-secp256k1": "^1.0.0",
1718
"classnames": "^2.2.6",
19+
"construct-style-sheets-polyfill": "^1.0.3",
1820
"copy-webpack-plugin": "^5.0.0",
1921
"elliptic": "^6.4.1",
20-
"gun": "0.2019.323",
22+
"gun": "0.2019.422",
2123
"lodash-es": "^4.17.11",
2224
"node-sass": "^4.11.0",
2325
"npm-run-all": "^4.1.5",
2426
"pvtsutils": "^1.0.4",
2527
"react": "^16.8.3",
2628
"react-app-rewired": "^2.1.0",
2729
"react-dom": "^16.8.3",
28-
"react-scripts": "2.1.5",
30+
"react-jss": "^8.6.1",
31+
"react-scripts": "3.0.0",
2932
"reflect-metadata": "^0.1.13",
30-
"storybook-addon-material-ui": "0.9.0-alpha.17",
31-
"tiny-secp256k1": "^1.0.1",
32-
"ts-loader": "^5.3.3",
33-
"tslint": "^5.12.1",
33+
"storybook-addon-material-ui": "0.9.0-alpha.18",
34+
"tiny-secp256k1": "^1.1.0",
35+
"ts-loader": "^5.4.3",
36+
"tslint": "^5.16.0",
3437
"typed-db": "^1.0.1-1",
35-
"typescript": "^3.4.1",
36-
"webcrypto-liner": "^0.1.38",
38+
"typescript": "^3.4.4",
39+
"webcrypto-liner": "0.1.38",
3740
"write-file-webpack-plugin": "^4.5.0"
3841
},
3942
"scripts": {
@@ -53,21 +56,19 @@
5356
"not op_mini all"
5457
],
5558
"devDependencies": {
56-
"@babel/core": "^7.3.3",
57-
"@storybook/addon-actions": "^4.1.13",
58-
"@storybook/addon-info": "^4.1.13",
59-
"@storybook/addon-knobs": "^4.1.13",
60-
"@storybook/addon-links": "^4.1.13",
61-
"@storybook/addon-options": "^4.1.13",
62-
"@storybook/addons": "^4.1.13",
63-
"@storybook/react": "^4.1.13",
59+
"@babel/core": "^7.4.3",
60+
"@storybook/addon-actions": "^5.1.0-alpha.33",
61+
"@storybook/addon-info": "^5.1.0-alpha.33",
62+
"@storybook/addon-knobs": "^5.1.0-alpha.33",
63+
"@storybook/addon-links": "^5.1.0-alpha.33",
64+
"@storybook/addons": "^5.1.0-alpha.33",
65+
"@storybook/react": "^5.1.0-alpha.33",
6466
"@types/storybook__addon-actions": "^3.4.2",
6567
"@types/storybook__addon-info": "^4.1.0",
66-
"@types/storybook__addon-knobs": "^4.0.1",
68+
"@types/storybook__addon-knobs": "^5.0.0",
6769
"@types/storybook__addon-links": "^3.3.4",
68-
"@types/storybook__addon-options": "^4.0.1",
6970
"@types/storybook__react": "^4.0.1",
7071
"awesome-typescript-loader": "^5.2.1",
71-
"react-docgen-typescript-loader": "^3.0.1"
72+
"react-docgen-typescript-loader": "^3.1.0"
7273
}
7374
}

public/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "http://json.schemastore.org/chrome-manifest",
33
"name": "Maskbook",
4-
"version": "1.1.1",
4+
"version": "1.2.0",
55
"manifest_version": 2,
66
"content_scripts": [
77
{
@@ -18,7 +18,7 @@
1818
}
1919
],
2020
"web_accessible_resources": ["*.css", "*.js", "*.jpg", "*.png"],
21-
"permissions": ["https://www.facebook.com/", "storage", "downloads", "background"],
21+
"permissions": ["https://*.facebook.com/*", "storage", "downloads", "background"],
2222
"background": {
2323
"scripts": ["/static/js/backgroundservice.js"]
2424
},

resources/1400.png

70.6 KB
Loading

resources/440.png

47.4 KB
Loading

0 commit comments

Comments
 (0)