Already logged in
@@ -54,6 +60,11 @@ const Login = () => {
return (
+
diff --git a/src/client/components/views/Logout/index.js b/src/client/components/views/Logout/index.js
index a821ac28e5..d455d85d84 100644
--- a/src/client/components/views/Logout/index.js
+++ b/src/client/components/views/Logout/index.js
@@ -4,6 +4,7 @@ import config from 'payload/config';
import { useUser } from '../../data/User';
import Minimal from '../../templates/Minimal';
import Button from '../../elements/Button';
+import Meta from '../../utilities/Meta';
import './index.scss';
@@ -22,6 +23,11 @@ const Logout = (props) => {
return (
+
{inactivity && (
You have been logged out due to inactivity.
diff --git a/src/client/components/views/NotFound/index.js b/src/client/components/views/NotFound/index.js
index b6700cc661..265d6ea51c 100644
--- a/src/client/components/views/NotFound/index.js
+++ b/src/client/components/views/NotFound/index.js
@@ -3,6 +3,7 @@ import config from 'payload/config';
import Eyebrow from '../../elements/Eyebrow';
import { useStepNav } from '../../elements/StepNav';
import Button from '../../elements/Button';
+import Meta from '../../utilities/Meta';
const { routes: { admin } } = config;
@@ -17,6 +18,11 @@ const NotFound = () => {
return (
+
Nothing found
Sorry—there is nothing to correspond with your request.
diff --git a/src/client/components/views/ResetPassword/index.js b/src/client/components/views/ResetPassword/index.js
index e0eb5a48b1..02d5624ae3 100644
--- a/src/client/components/views/ResetPassword/index.js
+++ b/src/client/components/views/ResetPassword/index.js
@@ -7,6 +7,7 @@ import Password from '../../forms/field-types/Password';
import ConfirmPassword from '../../forms/field-types/ConfirmPassword';
import FormSubmit from '../../forms/Submit';
import Button from '../../elements/Button';
+import Meta from '../../utilities/Meta';
import { useUser } from '../../data/User';
import './index.scss';
@@ -31,6 +32,12 @@ const ResetPassword = () => {
if (user) {
return (
+
+
Already logged in
diff --git a/src/client/components/views/Unauthorized/index.js b/src/client/components/views/Unauthorized/index.js
index c521c68258..50e157bb4a 100644
--- a/src/client/components/views/Unauthorized/index.js
+++ b/src/client/components/views/Unauthorized/index.js
@@ -1,24 +1,26 @@
import React from 'react';
import config from 'payload/config';
import Button from '../../elements/Button';
+import Meta from '../../utilities/Meta';
import MinimalTemplate from '../../templates/Minimal';
const { routes: { admin } } = config;
-const Unauthorized = () => {
- return (
-
- Not authorized
- You are not allowed to access this page.
-
-
- Log out
-
-
- );
-};
-
+const Unauthorized = () => (
+
+
+ You are not allowed to access this page.
+
+
+ Log out
+
+
+);
export default Unauthorized;
diff --git a/src/client/components/views/collections/Edit/Default.js b/src/client/components/views/collections/Edit/Default.js
index 89c947207e..a950838b71 100644
--- a/src/client/components/views/collections/Edit/Default.js
+++ b/src/client/components/views/collections/Edit/Default.js
@@ -12,6 +12,7 @@ import RenderFields from '../../../forms/RenderFields';
import CopyToClipboard from '../../../elements/CopyToClipboard';
import DuplicateDocument from '../../../elements/DuplicateDocument';
import DeleteDocument from '../../../elements/DeleteDocument';
+import Meta from '../../../utilities/Meta';
import * as fieldTypes from '../../../forms/field-types';
import RenderTitle from '../../../elements/RenderTitle';
import LeaveWithoutSaving from '../../../modals/LeaveWithoutSaving';
@@ -69,6 +70,11 @@ const DefaultEditView = (props) => {
initialState={initialState}
>
+
diff --git a/src/client/components/views/collections/List/Default.js b/src/client/components/views/collections/List/Default.js
index 9e0a0e9db2..fef8ed8d62 100644
--- a/src/client/components/views/collections/List/Default.js
+++ b/src/client/components/views/collections/List/Default.js
@@ -10,6 +10,7 @@ import Pill from '../../../elements/Pill';
import Button from '../../../elements/Button';
import SortColumn from '../../../elements/SortColumn';
import Table from '../../../elements/Table';
+import Meta from '../../../utilities/Meta';
import Cell from './Cell';
import './index.scss';
@@ -42,6 +43,9 @@ const DefaultList = (props) => {
return (
+
diff --git a/src/collections/init.js b/src/collections/init.js
index 09816b2b91..c2c57f2bc7 100644
--- a/src/collections/init.js
+++ b/src/collections/init.js
@@ -2,7 +2,7 @@ const mongoose = require('mongoose');
const express = require('express');
const mongooseHidden = require('mongoose-hidden')({
hidden: {
- salt: true, hash: true, _id: true, __v: true,
+ _id: true, __v: true,
},
applyRecursively: true,
});
@@ -21,6 +21,8 @@ function registerCollections() {
if (collection.auth) {
schema.plugin(passportLocalMongoose, { usernameField: 'email' });
+ schema.path('hash').options.hide = true;
+ schema.path('salt').options.hide = true;
}
schema.plugin(mongooseHidden);
diff --git a/src/webpack/getWebpackDevConfig.js b/src/webpack/getWebpackDevConfig.js
index 904b4a3bd1..71d03ad758 100644
--- a/src/webpack/getWebpackDevConfig.js
+++ b/src/webpack/getWebpackDevConfig.js
@@ -128,7 +128,7 @@ module.exports = (config) => {
const plugins = [
new HtmlWebpackPlugin({
- template: path.resolve(__dirname, '../client/index.html'),
+ template: config.admin && config.admin.indexHTML ? config.admin.indexHTML : path.resolve(__dirname, '../client/index.html'),
filename: './index.html',
}),
new webpack.HotModuleReplacementPlugin(),
diff --git a/src/webpack/getWebpackProdConfig.js b/src/webpack/getWebpackProdConfig.js
index 52523c24c0..9b52bf2bf9 100644
--- a/src/webpack/getWebpackProdConfig.js
+++ b/src/webpack/getWebpackProdConfig.js
@@ -119,7 +119,7 @@ module.exports = (config) => {
const plugins = [
// new BundleAnalyzerPlugin(),
new HtmlWebpackPlugin({
- template: path.resolve(__dirname, '../client/index.html'),
+ template: config.admin && config.admin.indexHTML ? config.admin.indexHTML : path.resolve(__dirname, '../client/index.html'),
filename: './index.html',
minify: true,
}),
diff --git a/yarn.lock b/yarn.lock
index 78912950d0..f97e1e5dcb 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -9406,6 +9406,21 @@ react-dom@^16.13.1:
prop-types "^15.6.2"
scheduler "^0.19.1"
+react-fast-compare@^3.1.1:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.0.tgz#641a9da81b6a6320f270e89724fb45a0b39e43bb"
+ integrity sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==
+
+react-helmet@^6.1.0:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-6.1.0.tgz#a750d5165cb13cf213e44747502652e794468726"
+ integrity sha512-4uMzEY9nlDlgxr61NL3XbKRy1hEkXmKNXhjbAIOVw5vcFrsdYbH2FEwcNyWvWinl103nXgzYNlns9ca+8kFiWw==
+ dependencies:
+ object-assign "^4.1.1"
+ prop-types "^15.7.2"
+ react-fast-compare "^3.1.1"
+ react-side-effect "^2.1.0"
+
react-hook-form@^5.7.2:
version "5.7.2"
resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-5.7.2.tgz#a84e259e5d37dd30949af4f79c4dac31101b79ac"
@@ -9507,6 +9522,11 @@ react-side-effect@^1.1.0:
dependencies:
shallowequal "^1.0.1"
+react-side-effect@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-2.1.0.tgz#1ce4a8b4445168c487ed24dab886421f74d380d3"
+ integrity sha512-IgmcegOSi5SNX+2Snh1vqmF0Vg/CbkycU9XZbOHJlZ6kMzTmi3yc254oB1WCkgA7OQtIAoLmcSFuHTc/tlcqXg==
+
react-transition-group@^4.3.0:
version "4.4.1"
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.1.tgz#63868f9325a38ea5ee9535d828327f85773345c9"