mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 08:31:23 -05:00
Fix conflicts
d
This commit is contained in:
parent
3212ccf7cb
commit
6798380ca8
4 changed files with 12 additions and 10 deletions
|
@ -1,5 +1,3 @@
|
|||
import { false } from 'tap';
|
||||
|
||||
const {selectUserId, selectIsAdmin, selectIsSocial,
|
||||
selectIsLoggedIn, selectUsername, selectIsMuted} = require('./session');
|
||||
|
||||
|
|
|
@ -14,8 +14,6 @@ import {
|
|||
import ValidationMessage from '../../components/forms/validation-message.jsx';
|
||||
import decorateText from '../../lib/decorate-text.jsx';
|
||||
import StudioMuteEditMessage from './studio-mute-edit-message.jsx';
|
||||
import MediaQuery from 'react-responsive';
|
||||
import frameless from '../../lib/frameless';
|
||||
|
||||
const errorToMessageId = error => {
|
||||
switch (error) {
|
||||
|
@ -29,27 +27,27 @@ const errorToMessageId = error => {
|
|||
const StudioDescription = ({
|
||||
descriptionError, isFetching, isMutating, isMutedEditor, description, canEditInfo, handleUpdate
|
||||
}) => {
|
||||
const [showMuteMessage, setShowMuteMessage] = useState(false);
|
||||
|
||||
const fieldClassName = classNames('studio-description', {
|
||||
'mod-fetching': isFetching,
|
||||
'mod-mutating': isMutating,
|
||||
'mod-form-error': !!descriptionError,
|
||||
'muted-editor': isMutedEditor
|
||||
'muted-editor': showMuteMessage
|
||||
});
|
||||
|
||||
const [showMuteMessage, setShowMuteMessage] = useState(false);
|
||||
|
||||
return (
|
||||
<div
|
||||
className="studio-info-section"
|
||||
onMouseEnter={() => isMutedEditor && setShowMuteMessage(true)}
|
||||
onMouseLeave={() => isMutedEditor && setShowMuteMessage(false)}
|
||||
>
|
||||
{canEditInfo ? (
|
||||
{canEditInfo || isMutedEditor ? (
|
||||
<React.Fragment>
|
||||
<textarea
|
||||
rows="20"
|
||||
className={fieldClassName}
|
||||
disabled={isMutating || isFetching}
|
||||
disabled={isMutating || isFetching || isMutedEditor}
|
||||
defaultValue={description}
|
||||
onBlur={e => e.target.value !== description &&
|
||||
handleUpdate(e.target.value)}
|
||||
|
|
|
@ -38,7 +38,7 @@ const StudioTitle = ({
|
|||
onMouseEnter={() => isMutedEditor && setShowMuteMessage(true)}
|
||||
onMouseLeave={() => isMutedEditor && setShowMuteMessage(false)}
|
||||
>
|
||||
{canEditInfo ? (
|
||||
{canEditInfo || isMutedEditor ? (
|
||||
<React.Fragment>
|
||||
<textarea
|
||||
className={fieldClassName}
|
||||
|
|
|
@ -77,6 +77,12 @@ $radius: 8px;
|
|||
box-sizing: border-box;
|
||||
height: 24rem;
|
||||
overflow-y: scroll;
|
||||
|
||||
&.muted-editor {
|
||||
@media #{$intermediate-and-smaller} {
|
||||
height: 18rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Overrides for when title and description are editable textareas */
|
||||
|
|
Loading…
Reference in a new issue