The frontend/UI server, written in JS using the MarkoJS library
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.

22 lines
1.3 KiB

  1. <if (!state.deleted)>
  2. <a class="anchor" id=input.data.id />
  3. <compact-list-property primary long label="Name" value=input.data.name />
  4. <compact-list-property short label="Date" value=state.date />
  5. <compact-list-property short label="Type" value=input.data.mimeType />
  6. <compact-list-property short label="Author" value=input.data.author />
  7. <compact-list-property short label="Size" value=component.sizeString(input.data.size) />
  8. <compact-list-options long>
  9. <a key="link" class="color-menu" on-click("open", "link")>Link</a>
  10. <if(input.data.kind === "upload")>
  11. <if-permitted user=input.user author=input.data.author permission="file.edit">
  12. <a key="edit" on-click("open", "edit", input.data)>Edit</a>
  13. </if-permitted>
  14. <if-permitted user=input.user author=input.data.author permission="file.remove">
  15. <a key="remove" on-click("open", "remove", input.data)>Remove</a>
  16. </if-permitted>
  17. </if>
  18. </compact-list-options>
  19. <link-file-modal enabled=(state.modal === "link") file=input.data on-close("close") />
  20. <edit-file-modal enabled=(state.modal === "edit") file=input.data on-edited("emit", "edited") on-close("close") />
  21. <remove-file-modal enabled=(state.modal === "remove") file=input.data on-removed("removed") on-close("close") />
  22. </if>