Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/components/include.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
$color-features: #0093e7;
$color-features-active: #0357a5;
$color-red: #ca3b3b;
$color-light-red: #f26666;
$color-yellow: #ffd439;
$color-yellow-hover: #ffc904;
$color-yellow-bg: #ffeca8;
$color-orange: #ffba5d;
$color-dark-orange: #864c00;
$color-green: #c5dd60;
$color-purple: #b944cc;

$very-light-gray: #ececec;
$light-gray: #dadada;
$gray: #9a9a9a;
$moderate-gray: #797979;
$extremely-dark-gray: #333;
Comment thread
clpetersonucf marked this conversation as resolved.

$color-background-dark: #21232a;
Expand Down
2 changes: 1 addition & 1 deletion src/components/modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Modal = (props) => {
<span className='close-button'
id='close-button'
aria-label={`close${props.testId ? `-${props.testId}-` : '-'}modal`}
onClick={props.onClose}>X</span>
onClick={props.onClose}>&#10005;</span>
<div className={`modal-guts ${props.noGutter ? 'no-gutter' : ''}`}>
{props.children}
</div>
Expand Down
61 changes: 36 additions & 25 deletions src/components/my-widgets-collaborate-dialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ const MyWidgetsCollaborateDialog = ({onClose, inst, myPerms, otherUserPerms, set
onChange={(e) => setState({...state, searchText: e.target.value})}
className='user-add'
type='text'
placeholder="Enter a Materia user's name or e-mail"/>
placeholder="Enter a user's name or e-mail"/>
<span className="collab-input-disclaimer">Only individuals who have previously used Materia will show up in search.</span>
{ searchResultsRender }
</div>
)
Expand All @@ -273,33 +274,41 @@ const MyWidgetsCollaborateDialog = ({onClose, inst, myPerms, otherUserPerms, set
mainContentRender = <NoContentIcon />

if (containsUser) {
const mainContentElements = Array.from(state.updatedAllUserPerms).map(([userId, userPerms]) => {

const mainContentElements = []
let userContentElement = null

Array.from(state.updatedAllUserPerms).forEach(([userId, userPerms]) => {
if (userPerms.remove === true) return

let user = collabUsers[userId]
if (!user)
{
return <div key={userId}></div>
}

user.is_owner = user.id === inst.user_id;

return <CollaborateUserRow
key={user.id}
user={user}
perms={userPerms}
myPerms={myPerms}
isCurrentUser={currentUser.id === user.id}
onlyOneFullPermHolder={onlyOneFullPermHolder}
removedCurrentUser={removedCurrentUser}
onChange={(userId, perms) => updatePerms(userId, perms)}
readOnly={myPerms?.can?.share === false}
/>
if (!user) return

user.is_owner = user.id === inst.user_id
const rowElement = (
<CollaborateUserRow
key={user.id}
user={user}
perms={userPerms}
myPerms={myPerms}
isCurrentUser={currentUser.id === user.id}
onlyOneFullPermHolder={onlyOneFullPermHolder}
removedCurrentUser={removedCurrentUser}
onChange={(userId, perms) => updatePerms(userId, perms)}
readOnly={myPerms?.can?.share === false}
/>
)

if (currentUser.id === user.id) userContentElement = rowElement
else mainContentElements.push(rowElement)
})

mainContentRender = (
<>
{ mainContentElements }
<header className='access-list-header'>You</header>
{ userContentElement }
<header className='access-list-header'>Users With Access</header>
{ mainContentElements.length > 0 ? mainContentElements : <span className='not-shared'>No other users have access to your widget.</span> }
</>
)
}
Expand Down Expand Up @@ -342,12 +351,14 @@ const MyWidgetsCollaborateDialog = ({onClose, inst, myPerms, otherUserPerms, set
{/* Calendar portal used to bring calendar popup out of access-list to avoid cutting off the overflow */}
<div id='calendar-portal' />
<p className='disclaimer'>
Users with full access can edit or copy this widget and can
Users with full access can edit this widget and can
add or remove people in this list.
{onlyOneFullPermHolder && myPerms.accessLevel == access.FULL && (
<em>
{'\u00A0'}Note: There must be at least one user with full access.
</em>
<span>
<em>
{ '\u00A0'}Note: There must be at least one user with full access.
</em>
</span>
)}
</p>
<div className='btn-box'>
Expand Down
Loading
Loading