Update modal parameters

pull/1194/head
ioedeveloper 4 years ago
parent 6a8442f568
commit d6a3e6c728
  1. 10
      libs/remix-ui/file-explorer/src/lib/file-explorer.tsx

@ -592,10 +592,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
if (state.focusEdit.isNew) { if (state.focusEdit.isNew) {
if (hasReservedKeyword(content)) { if (hasReservedKeyword(content)) {
removeInputField(parentFolder)(dispatch) removeInputField(parentFolder)(dispatch)
modal('Reserved Keyword', `File name contains remix reserved keywords. '${content}'`, { modal('Reserved Keyword', `File name contains remix reserved keywords. '${content}'`, 'Close', () => {})
label: 'Close',
fn: () => {}
}, null)
} else { } else {
state.focusEdit.type === 'file' ? createNewFile(joinPath(parentFolder, content)) : createNewFolder(joinPath(parentFolder, content)) state.focusEdit.type === 'file' ? createNewFile(joinPath(parentFolder, content)) : createNewFolder(joinPath(parentFolder, content))
removeInputField(parentFolder)(dispatch) removeInputField(parentFolder)(dispatch)
@ -603,10 +600,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
} else { } else {
if (hasReservedKeyword(content)) { if (hasReservedKeyword(content)) {
editRef.current.textContent = state.focusEdit.lastEdit editRef.current.textContent = state.focusEdit.lastEdit
modal('Reserved Keyword', `File name contains remix reserved keywords. '${content}'`, { modal('Reserved Keyword', `File name contains remix reserved keywords. '${content}'`, 'Close', () => {})
label: 'Close',
fn: () => {}
}, null)
} else { } else {
const oldPath: string = state.focusEdit.element const oldPath: string = state.focusEdit.element
const oldName = extractNameFromKey(oldPath) const oldName = extractNameFromKey(oldPath)

Loading…
Cancel
Save