editor-file.pug 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. .modal#modal-editor-file
  2. .modal-background
  3. .modal-container
  4. .modal-content.is-expanded
  5. header.is-green
  6. span Insert File
  7. p.modal-notify(v-bind:class="{ 'is-active': isLoading }")
  8. span {{ isLoadingText }}
  9. i
  10. .modal-toolbar.is-green
  11. a.button(v-on:click="newFolder")
  12. i.fa.fa-folder
  13. span New Folder
  14. a.button#btn-editor-file-upload
  15. i.fa.fa-upload
  16. span Upload File
  17. label
  18. input(type="file", multiple)
  19. section.is-gapless
  20. .columns.is-stretched
  21. .column.is-one-quarter.modal-sidebar.is-green(style={'max-width':'350px'})
  22. .model-sidebar-header Folders
  23. ul.model-sidebar-list
  24. li(v-for="fld in folders")
  25. a(v-on:click="selectFolder(fld)", v-bind:class="{ 'is-active': currentFolder === fld }")
  26. i.icon-folder2
  27. span / {{ fld }}
  28. .column.editor-modal-file-choices
  29. figure(v-for="fl in files", v-bind:class="{ 'is-active': currentFile === fl._id }", v-on:click="selectFile(fl._id)", v-bind:data-uid="fl._id")
  30. i(class='icon-file')
  31. span: strong {{ fl.filename }}
  32. span {{ fl.mime }}
  33. span {{ fl.filesize | filesize }}
  34. em(v-show="files.length < 1")
  35. i.icon-marquee-minus
  36. | This folder is empty.
  37. footer
  38. a.button.is-grey.is-outlined(v-on:click="cancel") Discard
  39. a.button.is-green(v-on:click="insertFileLink") Insert Link to File
  40. .modal.is-superimposed(v-bind:class="{ 'is-active': newFolderShow }")
  41. .modal-background
  42. .modal-container
  43. .modal-content
  44. header.is-light-blue New Folder
  45. section
  46. label.label Enter the new folder name:
  47. p.control.is-fullwidth
  48. input.input#txt-editor-file-newfoldername(type='text', placeholder='folder name', v-model='newFolderName', v-on:keyup.enter="newFolderCreate", v-on:keyup.esc="newFolderDiscard")
  49. span.help.is-danger(v-show="newFolderError") This folder name is invalid!
  50. footer
  51. a.button.is-grey.is-outlined(v-on:click="newFolderDiscard") Discard
  52. a.button.is-light-blue(v-on:click="newFolderCreate") Create
  53. .modal.is-superimposed(v-bind:class="{ 'is-active': renameFileShow }")
  54. .modal-background
  55. .modal-container
  56. .modal-content
  57. header.is-indigo Rename File
  58. section
  59. label.label Enter the new filename (without the extension) of the file:
  60. p.control.is-fullwidth
  61. input.input#txt-editor-file-rename(type='text', placeholder='filename', v-model='renameFileFilename')
  62. span.help.is-danger.is-hidden This filename is invalid!
  63. footer
  64. a.button.is-grey.is-outlined(v-on:click="renameFileDiscard") Discard
  65. a.button.is-light-blue(v-on:click="renameFileGo") Rename
  66. .modal.is-superimposed(v-bind:class="{ 'is-active': deleteFileShow }")
  67. .modal-background
  68. .modal-container
  69. .modal-content
  70. header.is-red Delete file?
  71. section
  72. span Are you sure you want to delete #[strong {{deleteFileFilename}}]?
  73. footer
  74. a.button.is-grey.is-outlined(v-on:click="deleteFileWarn(false)") Discard
  75. a.button.is-red(v-on:click="deleteFileGo") Delete