change css class selector

pull/5370/head
Joseph Izang 10 months ago
parent 28072ed6e1
commit 639a2080ab
  1. 1
      libs/remix-ui/workspace/src/lib/components/file-explorer.tsx
  2. 8
      libs/remix-ui/workspace/src/lib/components/flat-tree-drop.tsx
  3. 2
      libs/remix-ui/workspace/src/lib/components/flat-tree.tsx

@ -310,7 +310,6 @@ export const FileExplorer = (props: FileExplorerProps) => {
props.modal(
intl.formatMessage({ id: 'filePanel.movingFileFailed' }),
intl.formatMessage({ id: 'filePanel.movingFileFailedMsg' }, { src: sourcesrc.join(' ') }),
intl.formatMessage({ id: 'filePanel.close' }),
async () => { }
)

@ -53,7 +53,6 @@ export const FlatTreeDrop = (props: FlatTreeDropProps) => {
}
const onDrop = async (event: SyntheticEvent) => {
event.stopPropagation()
event.preventDefault()
const target = await getEventTarget(event)
@ -92,6 +91,9 @@ export const FlatTreeDrop = (props: FlatTreeDropProps) => {
await moveFilesSilently(items, dragDestination.path)
}
}
document.querySelectorAll('li.remix_selected').forEach(item => {
item.classList.remove('remix_selected')
})
}
/**
@ -112,8 +114,8 @@ export const FlatTreeDrop = (props: FlatTreeDropProps) => {
}
}) => {
const selectItems = []
document.querySelectorAll('li.bg-secondary.li_tv').forEach(item => {
item.classList.add('dragging')
document.querySelectorAll('li.remix_selected').forEach(item => {
const dragTarget = {
position: { top: target?.position.top || 0, left: target?.position.left || 0 },
path: item.getAttribute('data-path') || item.getAttribute('data-label-path') || '',

@ -76,7 +76,7 @@ export const FlatTree = (props: FlatTreeProps) => {
props.focusEdit.element === file.path
? 'bg-light'
: props.focusElement.findIndex((item) => item.key === file.path) !== -1
? 'bg-secondary'
? 'bg-secondary remix_selected'
: hover == file.path
? 'bg-light border-no-shift'
: props.focusContext.element === file.path && props.focusEdit.element !== file.path

Loading…
Cancel
Save