diff --git a/src/_colors.scss b/src/_colors.scss
index 4c682f34d15..3f095f120a4 100644
--- a/src/_colors.scss
+++ b/src/_colors.scss
@@ -64,6 +64,9 @@ $ui-border: hsla(0, 0%, 85%, 1); //#D9D9D9
$ui-border-light-blue: hsla(215, 50%, 90%, 1); //#D9E3F2
$ui-border-orange: hsla(37, 96%, 55%, 1); // #FAA51D
+$ui-text-disabled: hsla(227, 15%, 70%, 1); //#A7ACBE
+$ui-background-disabled: hsla(231, 14%, 90%, 1); //#E2E3E9
+
/* modals */
$ui-mint-green: hsl(163, 69%, 44%);
$ui-light-mint: hsl(163, 53%, 67%);
diff --git a/src/components/overflow-menu/overflow-icon-disabled.svg b/src/components/overflow-menu/overflow-icon-disabled.svg
new file mode 100644
index 00000000000..3a8313b61c2
--- /dev/null
+++ b/src/components/overflow-menu/overflow-icon-disabled.svg
@@ -0,0 +1,4 @@
+
diff --git a/src/components/overflow-menu/overflow-menu.jsx b/src/components/overflow-menu/overflow-menu.jsx
index 9b85d581900..ff0de1d649a 100644
--- a/src/components/overflow-menu/overflow-menu.jsx
+++ b/src/components/overflow-menu/overflow-menu.jsx
@@ -5,15 +5,19 @@ import classNames from 'classnames';
import Dropdown from '../dropdown/dropdown.jsx';
import overflowIcon from './overflow-icon.svg';
+import overflowIconDisabled from './overflow-icon-disabled.svg';
import './overflow-menu.scss';
const OverflowMenu = ({
children,
dropdownAs = 'ul',
- className
+ className,
+ disabled
}) => {
const [open, setOpen] = useState(false);
+ const iconSrc = disabled ? overflowIconDisabled : overflowIcon;
+
return (
{open &&
(
+const Banner = ({
+ className,
+ message,
+ actionMessage,
+ onAction,
+ buttonDisabled
+}) => (
@@ -14,7 +20,8 @@ const Banner = ({className, message, actionMessage, onAction}) => (
{actionMessage && onAction && (
@@ -593,6 +595,7 @@ const PreviewPresentation = ({
projectInfo={projectInfo}
onFavoriteClicked={onFavoriteClicked}
onLoveClicked={onLoveClicked}
+ disabled={process.env.READ_ONLY_MODE === 'true'}
/>
{
const authorAvatarBadge = authorPresent && author.profile.membership_avatar_badge;
const userOwnsProject = isLoggedIn && authorPresent &&
state.session.session.user.id.toString() === authorId;
- const isEditable = isLoggedIn &&
+
+ // if we don't have projectInfo, assume it's shared until we know otherwise
+ const isShared = !projectInfoPresent || state.preview.projectInfo.is_published;
+
+ const isEditable = isLoggedIn && (process.env.READ_ONLY_MODE !== 'true' || !isShared) &&
(authorUsername === state.session.session.user.username ||
state.permissions.admin === true);
const areCommentsOn = state.session.session.flags && selectProjectCommentsGloballyEnabled(state);
@@ -1415,9 +1421,6 @@ const mapStateToProps = state => {
const acceptedTermsOfService = state.session.session.flags?.accepted_terms_of_service;
const isStudent = state.session.session.permissions?.student;
- // if we don't have projectInfo, assume it's shared until we know otherwise
- const isShared = !projectInfoPresent || state.preview.projectInfo.is_published;
-
return {
authorId: authorId,
authorThumbnailUrl: thumbnailUrl(authorId),
diff --git a/src/views/preview/stats.jsx b/src/views/preview/stats.jsx
index 041f55f2e1f..fb79048c737 100644
--- a/src/views/preview/stats.jsx
+++ b/src/views/preview/stats.jsx
@@ -8,7 +8,7 @@ const projectShape = require('./projectshape.jsx').projectShape;
require('./stats.scss');
const Stats = props => (
-
+
}
{
/>
diff --git a/src/views/studio/studio-description.jsx b/src/views/studio/studio-description.jsx
index 3b1418db8a1..1a40a55af53 100644
--- a/src/views/studio/studio-description.jsx
+++ b/src/views/studio/studio-description.jsx
@@ -17,6 +17,7 @@ import ValidationMessage from '../../components/forms/validation-message.jsx';
import decorateText from '../../lib/decorate-text.jsx';
import StudioMuteEditMessage from './studio-mute-edit-message.jsx';
+
const errorToMessageId = error => {
switch (error) {
case Errors.INAPPROPRIATE: return 'studio.updateErrors.inappropriate';
@@ -53,12 +54,16 @@ const StudioDescription = ({
onMouseLeave={() => isMutedEditor && setShowMuteMessage(false)}
ref={ref}
>
- {canEditInfo || isMutedEditor ? (
+ {(canEditInfo || isMutedEditor) ? (