Merge branch 'develop' into 'reactions-page'
# Conflicts: # app/soapbox/utils/features.js
This commit is contained in:
commit
c2fc7a0331
71 changed files with 2109 additions and 2790 deletions
|
@ -1,6 +1,7 @@
|
|||
/node_modules/**
|
||||
/static/**
|
||||
/static-test/**
|
||||
/public/**
|
||||
/tmp/**
|
||||
/coverage/**
|
||||
!.eslintrc.js
|
||||
|
|
20
.gitignore
vendored
20
.gitignore
vendored
|
@ -8,20 +8,6 @@
|
|||
/.vs/
|
||||
yarn-error.log*
|
||||
|
||||
/static/packs
|
||||
/static/packs-test
|
||||
/static/emoji
|
||||
/static/index.html
|
||||
/static/index.html.gz
|
||||
/static/404.html
|
||||
/static/404.html.gz
|
||||
/static/manifest.json
|
||||
/static/manifest.json.gz
|
||||
/static/report.html
|
||||
/static/sw.js
|
||||
/static/instance/**
|
||||
!/static/instance/**.example
|
||||
!/static/instance/**.example.*
|
||||
!/static/instance/**.example/**
|
||||
/static-test
|
||||
/public
|
||||
/static/
|
||||
/static-test/
|
||||
/public/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
image: node:12
|
||||
image: node:14
|
||||
|
||||
variables:
|
||||
NODE_ENV: test
|
||||
|
@ -17,6 +17,7 @@ stages:
|
|||
- deploy
|
||||
|
||||
before_script:
|
||||
- env
|
||||
- yarn
|
||||
|
||||
lint-js:
|
||||
|
@ -85,10 +86,10 @@ docs-deploy:
|
|||
|
||||
pages:
|
||||
stage: deploy
|
||||
before_script: []
|
||||
script:
|
||||
- yarn build
|
||||
# artifacts are kept between jobs
|
||||
- mv static public
|
||||
- cp public/{index.html,404.html}
|
||||
variables:
|
||||
NODE_ENV: production
|
||||
artifacts:
|
||||
|
|
1
.tool-versions
Normal file
1
.tool-versions
Normal file
|
@ -0,0 +1 @@
|
|||
nodejs 14.17.6
|
|
@ -3,6 +3,8 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<!--server-generated-meta-->
|
||||
<link rel="icon" type="image/png" href="/favicon.png">
|
||||
</head>
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/soapbox/actions/export_data.js
Normal file
BIN
app/soapbox/actions/export_data.js
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -19,7 +19,7 @@ exports[`<EmojiSelector /> renders correctly 1`] = `
|
|||
}
|
||||
}
|
||||
onClick={[Function]}
|
||||
onKeyUp={[Function]}
|
||||
onKeyDown={[Function]}
|
||||
tabIndex={-1}
|
||||
/>
|
||||
<button
|
||||
|
@ -30,7 +30,7 @@ exports[`<EmojiSelector /> renders correctly 1`] = `
|
|||
}
|
||||
}
|
||||
onClick={[Function]}
|
||||
onKeyUp={[Function]}
|
||||
onKeyDown={[Function]}
|
||||
tabIndex={-1}
|
||||
/>
|
||||
<button
|
||||
|
@ -41,7 +41,7 @@ exports[`<EmojiSelector /> renders correctly 1`] = `
|
|||
}
|
||||
}
|
||||
onClick={[Function]}
|
||||
onKeyUp={[Function]}
|
||||
onKeyDown={[Function]}
|
||||
tabIndex={-1}
|
||||
/>
|
||||
<button
|
||||
|
@ -52,7 +52,7 @@ exports[`<EmojiSelector /> renders correctly 1`] = `
|
|||
}
|
||||
}
|
||||
onClick={[Function]}
|
||||
onKeyUp={[Function]}
|
||||
onKeyDown={[Function]}
|
||||
tabIndex={-1}
|
||||
/>
|
||||
<button
|
||||
|
@ -63,7 +63,7 @@ exports[`<EmojiSelector /> renders correctly 1`] = `
|
|||
}
|
||||
}
|
||||
onClick={[Function]}
|
||||
onKeyUp={[Function]}
|
||||
onKeyDown={[Function]}
|
||||
tabIndex={-1}
|
||||
/>
|
||||
<button
|
||||
|
@ -74,7 +74,7 @@ exports[`<EmojiSelector /> renders correctly 1`] = `
|
|||
}
|
||||
}
|
||||
onClick={[Function]}
|
||||
onKeyUp={[Function]}
|
||||
onKeyDown={[Function]}
|
||||
tabIndex={-1}
|
||||
/>
|
||||
</div>
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,6 +1,66 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<LoginForm /> renders correctly 1`] = `
|
||||
exports[`<LoginForm /> renders for Mastodon 1`] = `
|
||||
<form
|
||||
className="simple_form new_user"
|
||||
method="post"
|
||||
>
|
||||
<fieldset>
|
||||
<div
|
||||
className="fields-group"
|
||||
>
|
||||
<div
|
||||
className="input email user_email"
|
||||
>
|
||||
<input
|
||||
aria-label="Username"
|
||||
autoComplete="off"
|
||||
className="string email"
|
||||
name="username"
|
||||
placeholder="Username"
|
||||
required={true}
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="input password user_password"
|
||||
>
|
||||
<input
|
||||
aria-label="Password"
|
||||
autoComplete="off"
|
||||
className="password"
|
||||
name="password"
|
||||
placeholder="Password"
|
||||
required={true}
|
||||
type="password"
|
||||
/>
|
||||
</div>
|
||||
<p
|
||||
className="hint subtle-hint"
|
||||
>
|
||||
<a
|
||||
href="/auth/password/new"
|
||||
>
|
||||
Trouble logging in?
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div
|
||||
className="actions"
|
||||
>
|
||||
<button
|
||||
className="btn button button-primary"
|
||||
name="button"
|
||||
type="submit"
|
||||
>
|
||||
Log in
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
`;
|
||||
|
||||
exports[`<LoginForm /> renders for Pleroma 1`] = `
|
||||
<form
|
||||
className="simple_form new_user"
|
||||
method="post"
|
||||
|
|
|
@ -63,67 +63,3 @@ exports[`<LoginPage /> renders correctly on load 1`] = `
|
|||
</div>
|
||||
</form>
|
||||
`;
|
||||
|
||||
exports[`<LoginPage /> renders correctly on load 2`] = `
|
||||
<form
|
||||
className="simple_form new_user"
|
||||
method="post"
|
||||
onSubmit={[Function]}
|
||||
>
|
||||
<fieldset
|
||||
disabled={false}
|
||||
>
|
||||
<div
|
||||
className="fields-group"
|
||||
>
|
||||
<div
|
||||
className="input email user_email"
|
||||
>
|
||||
<input
|
||||
aria-label="Username"
|
||||
autoComplete="off"
|
||||
className="string email"
|
||||
name="username"
|
||||
placeholder="Username"
|
||||
required={true}
|
||||
type="text"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="input password user_password"
|
||||
>
|
||||
<input
|
||||
aria-label="Password"
|
||||
autoComplete="off"
|
||||
className="password"
|
||||
name="password"
|
||||
placeholder="Password"
|
||||
required={true}
|
||||
type="password"
|
||||
/>
|
||||
</div>
|
||||
<p
|
||||
className="hint subtle-hint"
|
||||
>
|
||||
<a
|
||||
href="/auth/reset_password"
|
||||
onClick={[Function]}
|
||||
>
|
||||
Trouble logging in?
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div
|
||||
className="actions"
|
||||
>
|
||||
<button
|
||||
className="btn button button-primary"
|
||||
name="button"
|
||||
type="submit"
|
||||
>
|
||||
Log in
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
`;
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
app/soapbox/features/export_data/components/csv_exporter.js
Normal file
BIN
app/soapbox/features/export_data/components/csv_exporter.js
Normal file
Binary file not shown.
BIN
app/soapbox/features/export_data/index.js
Normal file
BIN
app/soapbox/features/export_data/index.js
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -179,6 +179,8 @@
|
|||
}
|
||||
|
||||
&__avatar {
|
||||
display: block;
|
||||
border-radius: 50%;
|
||||
@media (max-width: 405px) { display: none; }
|
||||
}
|
||||
}
|
||||
|
|
BIN
babel.config.js
BIN
babel.config.js
Binary file not shown.
62
docs/development/build-config.md
Normal file
62
docs/development/build-config.md
Normal file
|
@ -0,0 +1,62 @@
|
|||
# Build Configuration
|
||||
|
||||
When compiling Soapbox FE, environment variables may be passed to change the build itself.
|
||||
For example:
|
||||
|
||||
```sh
|
||||
NODE_ENV="production" FE_BUILD_DIR="public" FE_SUBDIRECTORY="/soapbox" yarn build
|
||||
```
|
||||
|
||||
### `NODE_ENV`
|
||||
|
||||
The environment to build Soapbox FE for.
|
||||
|
||||
Options:
|
||||
|
||||
- `"production"` - For live sites
|
||||
- `"development"` - For local development
|
||||
- `"test"` - Bootstraps test environment
|
||||
|
||||
Default: `"development"`
|
||||
|
||||
It's recommended to always build in `"production"` mode for live sites.
|
||||
|
||||
### `BACKEND_URL`
|
||||
|
||||
The base URL for API calls.
|
||||
You only need to set this if Soapbox FE is hosted in a different place than the backend.
|
||||
|
||||
Options:
|
||||
|
||||
- An absolute URL, eg `"https://gleasonator.com"`
|
||||
- Empty string (`""`)`
|
||||
|
||||
Default: `""`
|
||||
|
||||
### `FE_BUILD_DIR`
|
||||
|
||||
The folder to put build files in. This is mostly useful for CI tasks like GitLab Pages.
|
||||
|
||||
Options:
|
||||
|
||||
- Any directory name, eg `"public"`
|
||||
|
||||
Default: `"static"`
|
||||
|
||||
### `FE_SUBDIRECTORY`
|
||||
|
||||
Subdirectory to host Soapbox FE out of.
|
||||
When hosting on a subdirectory, you must create a custom build for it.
|
||||
This option will set the imports in `index.html`, and the basename for routes in React.
|
||||
|
||||
Options:
|
||||
|
||||
- Any path, eg `"/soapbox"` or `"/fe/soapbox"`
|
||||
|
||||
Default: `"/"`
|
||||
|
||||
For example, if you want to host the build on `https://gleasonator.com/soapbox`, you can compile it like this:
|
||||
|
||||
```sh
|
||||
NODE_ENV="production" FE_SUBDIRECTORY="/soapbox" yarn build
|
||||
```
|
BIN
jsdoc.conf.js
Normal file
BIN
jsdoc.conf.js
Normal file
Binary file not shown.
56
package.json
56
package.json
|
@ -19,6 +19,7 @@
|
|||
"start": "npx webpack-dev-server --config webpack",
|
||||
"dev": "${npm_execpath} run start",
|
||||
"build": "npx webpack --config webpack",
|
||||
"jsdoc": "npx jsdoc -c jsdoc.conf.js",
|
||||
"manage:translations": "node ./webpack/translationRunner.js",
|
||||
"test": "${npm_execpath} run test:lint && ${npm_execpath} run test:jest",
|
||||
"test:lint": "${npm_execpath} run test:lint:js && ${npm_execpath} run test:lint:sass",
|
||||
|
@ -48,6 +49,7 @@
|
|||
"@babel/runtime": "^7.14.6",
|
||||
"@fontsource/montserrat": "^4.5.1",
|
||||
"@fontsource/roboto": "^4.5.0",
|
||||
"@lcdp/offline-plugin": "^5.1.0",
|
||||
"@popperjs/core": "^2.4.4",
|
||||
"@welldone-software/why-did-you-render": "^6.2.0",
|
||||
"array-includes": "^3.0.3",
|
||||
|
@ -62,9 +64,9 @@
|
|||
"blurhash": "^1.0.0",
|
||||
"bowser": "^2.11.0",
|
||||
"browserslist": "^4.16.6",
|
||||
"cheerio": "^1.0.0-rc.10",
|
||||
"classnames": "^2.2.5",
|
||||
"compression-webpack-plugin": "^6.0.2",
|
||||
"copy-webpack-plugin": "6.4.0",
|
||||
"copy-webpack-plugin": "^9.0.1",
|
||||
"core-js": "^3.15.2",
|
||||
"cryptocurrency-icons": "^0.17.2",
|
||||
"css-loader": "^5.2.6",
|
||||
|
@ -73,13 +75,14 @@
|
|||
"dotenv": "^8.0.0",
|
||||
"emoji-datasource": "5.0.0",
|
||||
"emoji-mart": "^3.0.1",
|
||||
"entities": "^3.0.1",
|
||||
"es6-symbol": "^3.1.1",
|
||||
"escape-html": "^1.0.3",
|
||||
"exif-js": "^2.3.0",
|
||||
"file-loader": "^6.0.0",
|
||||
"fork-awesome": "https://github.com/alexgleason/Fork-Awesome#c23fd34246a9f33c4bf24ea095a4cf26e7abe265",
|
||||
"html-webpack-harddisk-plugin": "^1.0.1",
|
||||
"html-webpack-plugin": "^4.3.0",
|
||||
"html-webpack-harddisk-plugin": "^2.0.0",
|
||||
"html-webpack-plugin": "^5.3.2",
|
||||
"http-link-header": "^1.0.2",
|
||||
"immutable": "^4.0.0-rc.12",
|
||||
"imports-loader": "^1.0.0",
|
||||
|
@ -87,8 +90,9 @@
|
|||
"intl": "^1.2.5",
|
||||
"intl-messageformat": "^9.0.0",
|
||||
"intl-messageformat-parser": "^6.0.0",
|
||||
"intl-pluralrules": "^1.1.1",
|
||||
"intl-pluralrules": "^1.3.0",
|
||||
"is-nan": "^1.2.1",
|
||||
"jsdoc": "~3.6.7",
|
||||
"lodash": "^4.7.11",
|
||||
"mark-loader": "^0.1.6",
|
||||
"marky": "^1.2.1",
|
||||
|
@ -96,10 +100,11 @@
|
|||
"object-assign": "^4.1.1",
|
||||
"object-fit-images": "^3.2.3",
|
||||
"object.values": "^1.1.0",
|
||||
"offline-plugin": "^5.0.7",
|
||||
"path-browserify": "^1.0.1",
|
||||
"postcss": "^8.1.1",
|
||||
"postcss-loader": "^4.0.3",
|
||||
"postcss-object-fit-images": "^1.1.2",
|
||||
"process": "^0.11.10",
|
||||
"prop-types": "^15.5.10",
|
||||
"punycode": "^2.1.0",
|
||||
"qrcode.react": "^1.0.0",
|
||||
|
@ -134,34 +139,35 @@
|
|||
"semver": "^7.3.2",
|
||||
"stringz": "^2.0.0",
|
||||
"substring-trie": "^1.0.2",
|
||||
"terser-webpack-plugin": "^4.2.3",
|
||||
"terser-webpack-plugin": "^5.2.3",
|
||||
"tiny-queue": "^0.2.1",
|
||||
"ts-jest": "^27.0.3",
|
||||
"ts-jest": "^27.0.5",
|
||||
"tslib": "^2.3.1",
|
||||
"twemoji": "https://github.com/twitter/twemoji#v13.0.2",
|
||||
"typescript": "^4.0.3",
|
||||
"unused-files-webpack-plugin": "^3.4.0",
|
||||
"uuid": "^8.0.0",
|
||||
"webpack": "^4.41.2",
|
||||
"webpack-assets-manifest": "^3.1.1",
|
||||
"webpack-bundle-analyzer": "^4.0.0",
|
||||
"webpack-cli": "^3.3.2",
|
||||
"webpack-merge": "^5.2.0",
|
||||
"util": "^0.12.4",
|
||||
"uuid": "^8.3.2",
|
||||
"webpack": "^5.52.0",
|
||||
"webpack-assets-manifest": "^5.0.6",
|
||||
"webpack-bundle-analyzer": "^4.4.2",
|
||||
"webpack-cli": "^4.8.0",
|
||||
"webpack-merge": "^5.8.0",
|
||||
"websocket.js": "^0.1.12",
|
||||
"wicg-inert": "^3.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"axios-mock-adapter": "^1.18.1",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-jest": "^27.0.6",
|
||||
"enzyme": "^3.8.0",
|
||||
"enzyme-adapter-react-16": "^1.7.1",
|
||||
"babel-jest": "^27.1.0",
|
||||
"enzyme": "^3.11.0",
|
||||
"enzyme-adapter-react-16": "^1.15.6",
|
||||
"eslint": "^7.0.0",
|
||||
"eslint-plugin-import": "~2.22.0",
|
||||
"eslint-plugin-jsx-a11y": "~6.4.0",
|
||||
"eslint-plugin-promise": "~4.2.0",
|
||||
"eslint-plugin-react": "~7.21.0",
|
||||
"eslint-plugin-react-hooks": "^4.0.4",
|
||||
"jest": "^27.0.6",
|
||||
"eslint-plugin-import": "^2.24.2",
|
||||
"eslint-plugin-jsx-a11y": "^6.4.1",
|
||||
"eslint-plugin-promise": "^5.1.0",
|
||||
"eslint-plugin-react": "^7.25.1",
|
||||
"eslint-plugin-react-hooks": "^4.2.0",
|
||||
"jest": "^27.1.0",
|
||||
"raf": "^3.4.1",
|
||||
"react-intl-translations-manager": "^5.0.3",
|
||||
"react-test-renderer": "^16.13.1",
|
||||
|
@ -169,7 +175,7 @@
|
|||
"stylelint": "^13.7.2",
|
||||
"stylelint-config-standard": "^20.0.0",
|
||||
"stylelint-scss": "^3.18.0",
|
||||
"webpack-dev-server": "^3.5.1",
|
||||
"webpack-dev-server": "^4.1.0",
|
||||
"yargs": "^16.0.3"
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
webpack/rules/babel-build-config.js
Normal file
BIN
webpack/rules/babel-build-config.js
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
webpack/test.js
BIN
webpack/test.js
Binary file not shown.
Loading…
Reference in a new issue