Skip to content

Commit

Permalink
update new folder button
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouwenxuan authored and zhouwenxuan committed Nov 6, 2024
1 parent 279083b commit ac77038
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 5 additions & 3 deletions frontend/src/components/dialog/select-dirent-body.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,15 @@ class SelectDirentBody extends React.Component {
autoFocus
/>
) : (
<div className='footer-left-btns'
<Button
className="footer-left-btns"
color="secondary"
onClick={this.onShowNewFolderInput}
style={{ display: mode === MODE_TYPE_MAP.SEARCH_RESULTS ? 'none' : 'block' }}
disabled={mode === MODE_TYPE_MAP.SEARCH_RESULTS}
>
<i className='sf3-font-new sf3-font mr-2'></i>
<span>{gettext('New folder')}</span>
</div>
</Button>
)}
<div className='footer-right-btns'>
<Button color="secondary m-1" onClick={this.onCancel}>{gettext('Cancel')}</Button>
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/css/lib-content-view.css
Original file line number Diff line number Diff line change
Expand Up @@ -450,10 +450,15 @@
justify-content: center;
align-items: center;
padding: 6px 12px;
border: 0;
cursor: pointer;
}

.custom-modal .modal-footer .footer-left-btns:hover {
.custom-modal .modal-footer .footer-left-btns.disabled {
cursor: not-allowed;
}

.custom-modal .modal-footer .footer-left-btns:not(.disabled):hover {
background-color: #f0f0f0;
border-radius: 3px;
}
Expand Down

0 comments on commit ac77038

Please sign in to comment.