Ok to OK in file explorer modals

pull/5370/head
aniket-engg 4 years ago committed by Aniket
parent b6ad8ffd96
commit 3c30761a3b
  1. 10
      libs/remix-ui/file-explorer/src/lib/file-explorer.tsx

@ -366,7 +366,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
const isDir = state.fileManager.isDirectory(path) const isDir = state.fileManager.isDirectory(path)
modal(`Delete ${isDir ? 'folder' : 'file'}`, `Are you sure you want to delete ${path} ${isDir ? 'folder' : 'file'}?`, { modal(`Delete ${isDir ? 'folder' : 'file'}`, `Are you sure you want to delete ${path} ${isDir ? 'folder' : 'file'}?`, {
label: 'Ok', label: 'OK',
fn: async () => { fn: async () => {
try { try {
const fileManager = state.fileManager const fileManager = state.fileManager
@ -545,7 +545,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
loadFile(name) loadFile(name)
} else { } else {
modal('Confirm overwrite', `The file ${name} already exists! Would you like to overwrite it?`, { modal('Confirm overwrite', `The file ${name} already exists! Would you like to overwrite it?`, {
label: 'Ok', label: 'OK',
fn: () => { fn: () => {
loadFile(name) loadFile(name)
} }
@ -560,7 +560,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
const publishToGist = () => { const publishToGist = () => {
modal('Create a public gist', 'Are you sure you want to publish all your files in browser directory anonymously as a public gist on github.com? Note: this will not include directories.', { modal('Create a public gist', 'Are you sure you want to publish all your files in browser directory anonymously as a public gist on github.com? Note: this will not include directories.', {
label: 'Ok', label: 'OK',
fn: toGist fn: toGist
}, { }, {
label: 'Cancel', label: 'Cancel',
@ -578,7 +578,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
} else { } else {
if (data.html_url) { if (data.html_url) {
modal('Gist is ready', `The gist is at ${data.html_url}. Would you like to open it in a new window?`, { modal('Gist is ready', `The gist is at ${data.html_url}. Would you like to open it in a new window?`, {
label: 'Ok', label: 'OK',
fn: () => { fn: () => {
window.open(data.html_url, '_blank') window.open(data.html_url, '_blank')
} }
@ -808,7 +808,7 @@ export const FileExplorer = (props: FileExplorerProps) => {
} }
if (helper.checkSpecialChars(content)) { if (helper.checkSpecialChars(content)) {
modal('Validation Error', 'Special characters are not allowed', { modal('Validation Error', 'Special characters are not allowed', {
label: 'Ok', label: 'OK',
fn: () => {} fn: () => {}
}, null) }, null)
} else { } else {

Loading…
Cancel
Save