modal texts

flattentree
bunsenstraat 11 months ago
parent 3b532e2383
commit 6901d2cd62
  1. 2
      apps/remix-ide/src/app/files/dgitProvider.ts
  2. 1
      apps/remix-ide/src/app/tabs/locales/en/filePanel.json
  3. 1
      apps/remixdesktop/src/plugins/fsPlugin.ts
  4. 2
      apps/remixdesktop/src/plugins/templates.ts
  5. 2
      libs/remix-ui/workspace/src/lib/actions/workspace.ts
  6. 6
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx

@ -415,7 +415,7 @@ class DGitProvider extends Plugin {
async clone(input, workspaceName, workspaceExists = false) { async clone(input, workspaceName, workspaceExists = false) {
if ((Registry.getInstance().get('platform').api.isDesktop())) { if ((Registry.getInstance().get('platform').api.isDesktop())) {
const folder = await this.call('fs', 'selectFolder') const folder = await this.call('fs', 'selectFolder', null, 'Select or create a folder to clone the repository in')
if (!folder) return false if (!folder) return false
const cmd = { const cmd = {
url: input.url, url: input.url,

@ -75,6 +75,7 @@
"filePanel.ok": "OK", "filePanel.ok": "OK",
"filePanel.yes": "Yes", "filePanel.yes": "Yes",
"filePanel.cancel": "Cancel", "filePanel.cancel": "Cancel",
"filePanel.selectFolder": "Select or create folder",
"filePanel.createNewWorkspace": "create a new workspace", "filePanel.createNewWorkspace": "create a new workspace",
"filePanel.connectToLocalhost": "connect to localhost", "filePanel.connectToLocalhost": "connect to localhost",
"filePanel.copiedToClipboard": "Copied to clipboard {path}", "filePanel.copiedToClipboard": "Copied to clipboard {path}",

@ -339,6 +339,7 @@ class FSPluginClient extends ElectronBasePluginClient {
if (!path) { if (!path) {
dirs = dialog.showOpenDialogSync(this.window, { dirs = dialog.showOpenDialogSync(this.window, {
properties: ['openDirectory', 'createDirectory', 'showHiddenFiles'], properties: ['openDirectory', 'createDirectory', 'showHiddenFiles'],
title: title || 'Select or create a folder',
}) })
} }
path = dirs && dirs.length && dirs[0] ? dirs[0] : path path = dirs && dirs.length && dirs[0] ? dirs[0] : path

@ -44,7 +44,7 @@ class TemplatesPluginClient extends ElectronBasePluginClient {
async loadTemplateInNewWindow (files: any) { async loadTemplateInNewWindow (files: any) {
let folder = await this.call('fs' as any, 'selectFolder', 'Select or create a folder to load the template in') let folder = await this.call('fs' as any, 'selectFolder', null ,'Select or create a folder to load the template in')
if (!folder || folder === '') return if (!folder || folder === '') return
// @ts-ignore // @ts-ignore

@ -629,7 +629,7 @@ export const cloneRepository = async (url: string) => {
message: message:
'An error occurred: Please check that you have the correct URL for the repo. If the repo is private, you need to add your github credentials (with the valid token permissions) in Settings plugin', 'An error occurred: Please check that you have the correct URL for the repo. If the repo is private, you need to add your github credentials (with the valid token permissions) in Settings plugin',
modalType: 'modal', modalType: 'modal',
okLabel: 'OK', okLabel: plugin.registry.get('platform').api.isDesktop() ? 'Select or create folder':'OK',
okFn: async () => { okFn: async () => {
await deleteWorkspace(repoName) await deleteWorkspace(repoName)
dispatch(cloneRepositoryFailed()) dispatch(cloneRepositoryFailed())

@ -195,7 +195,7 @@ export function Workspace() {
global.modal( global.modal(
intl.formatMessage({id: 'filePanel.workspace.create'}), intl.formatMessage({id: 'filePanel.workspace.create'}),
createModalMessage(), createModalMessage(),
intl.formatMessage({id: 'filePanel.ok'}), intl.formatMessage({id: (platform !== appPlatformTypes.desktop)? 'filePanel.ok':'filePanel.selectFolder'}),
onFinishCreateWorkspace, onFinishCreateWorkspace,
intl.formatMessage({id: 'filePanel.cancel'}) intl.formatMessage({id: 'filePanel.cancel'})
) )
@ -246,7 +246,7 @@ export function Workspace() {
global.modal( global.modal(
intl.formatMessage({id: 'filePanel.workspace.clone'}), intl.formatMessage({id: 'filePanel.workspace.clone'}),
cloneModalMessage(), cloneModalMessage(),
intl.formatMessage({id: 'filePanel.ok'}), intl.formatMessage({id: (platform !== appPlatformTypes.desktop)? 'filePanel.ok':'filePanel.selectFolder'}),
handleTypingUrl, handleTypingUrl,
intl.formatMessage({id: 'filePanel.cancel'}) intl.formatMessage({id: 'filePanel.cancel'})
) )
@ -431,7 +431,7 @@ export function Workspace() {
global.modal( global.modal(
intl.formatMessage({id: 'filePanel.workspace.clone'}), intl.formatMessage({id: 'filePanel.workspace.clone'}),
intl.formatMessage({id: 'filePanel.workspace.cloneMessage'}), intl.formatMessage({id: 'filePanel.workspace.cloneMessage'}),
intl.formatMessage({id: 'filePanel.ok'}), intl.formatMessage({id: (platform !== appPlatformTypes.desktop)? 'filePanel.ok':'filePanel.selectFolder'}),
() => {}, () => {},
intl.formatMessage({id: 'filePanel.cancel'}) intl.formatMessage({id: 'filePanel.cancel'})
) )

Loading…
Cancel
Save