You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.5 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <urban-filemanager>
  2. <div class="bucket-filemanager">
  3. <div class="file-table">
  4. <urban-filemanager-parent></urban-filemanager-parent>
  5. <template each={ file in props.files }>
  6. <urban-filemanager-file
  7. if={ file.is_file }
  8. file={ file }
  9. handleClick={ handleDirectoryClick }
  10. handleMarked={ handleMarked }
  11. ></urban-filemanager-file>
  12. <urban-filemanager-directory
  13. if={ !file.is_file }
  14. file={ file }
  15. handleClick={ handleFileClick }
  16. handleMarked={ handleMarked }
  17. ></urban-filemanager-directory>
  18. </template>
  19. </div>
  20. </div>
  21. <script>
  22. import axios from 'axios'
  23. import File from './file.riot'
  24. import Directory from './directory.riot'
  25. import Parent from './parent.riot'
  26. riot.register('urban-filemanager-file', File)
  27. riot.register('urban-filemanager-directory', Directory)
  28. riot.register('urban-filemanager-parent', Parent)
  29. export default {
  30. handleFileClick() {
  31. },
  32. /**
  33. *
  34. *
  35. *
  36. */
  37. handleDirectoryClick(event, file) {
  38. axios.get('/api/', {
  39. params: {
  40. filename: file.filename
  41. }
  42. }).then((response) => {
  43. })
  44. },
  45. handleMarked() {
  46. console.log('ddd')
  47. }
  48. }
  49. </script>
  50. </urban-filemanager>