mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2025-01-08 16:19:17 +03:00
Add a prompt to the move dialog
This commit is contained in:
parent
69a76d1b47
commit
18ccee32b8
@ -313,6 +313,7 @@ describe "TreeView", ->
|
||||
|
||||
it "opens a move dialog with the file's current path populated", ->
|
||||
expect(moveDialog).toExist()
|
||||
expect(moveDialog.prompt.text()).toBe "Enter the new path for the file:"
|
||||
expect(moveDialog.editor.getText()).toBe(project.relativize(filePath))
|
||||
expect(moveDialog.editor.getSelectedText()).toBe fs.base(filePath)
|
||||
expect(moveDialog.editor.isFocused).toBeTruthy()
|
||||
@ -329,7 +330,6 @@ describe "TreeView", ->
|
||||
expect(fs.exists(filePath)).toBeFalsy()
|
||||
expect(moveDialog.parent()).not.toExist()
|
||||
|
||||
|
||||
waitsFor "tree view to update", ->
|
||||
treeView.root.find('> .entries > .file:contains(renamed-test-file.txt)').length > 0
|
||||
|
||||
|
@ -158,6 +158,7 @@ fs = require 'fs'
|
||||
class MoveDialog extends View
|
||||
@content: ->
|
||||
@div class: 'move-dialog', =>
|
||||
@div "Enter the new path for the file:", outlet: 'prompt'
|
||||
@subview 'editor', new Editor(mini: true)
|
||||
|
||||
initialize: (@project, @path) ->
|
||||
|
@ -39,8 +39,8 @@
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
|
||||
background-color: #444;
|
||||
background-color: #333;
|
||||
color: white;
|
||||
border: 2px solid #222;
|
||||
-webkit-box-shadow: 0 0 3px 3px rgba(0, 0, 0, .5);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user