access.pug 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. extends ../../layout
  2. block vars
  3. - var suppressFooter = true
  4. - var suppressSkipToContent = true
  5. block content
  6. script(type="template", id="overleaf-token-access-data")!= StringHelper.stringifyJsonForScript({ postUrl: postUrl, csrfToken: csrfToken})
  7. div(
  8. ng-controller="TokenAccessPageController",
  9. ng-init="post()"
  10. )
  11. .editor.full-size
  12. div
  13. |  
  14. a(href="/project", style="font-size: 2rem; margin-left: 1rem; color: #ddd;")
  15. i.fa.fa-arrow-left
  16. .loading-screen(
  17. ng-show="mode == 'accessAttempt'"
  18. )
  19. .loading-screen-brand-container
  20. .loading-screen-brand()
  21. h3.loading-screen-label.text-center
  22. | #{translate('join_project')}
  23. span(ng-show="accessInFlight == true")
  24. span.loading-screen-ellip .
  25. span.loading-screen-ellip .
  26. span.loading-screen-ellip .
  27. .global-alerts.text-center(ng-cloak)
  28. div(ng-show="accessError", ng-cloak)
  29. br
  30. div(ng-switch="accessError", ng-cloak)
  31. div(ng-switch-when="not_found")
  32. h4(aria-live="assertive")
  33. | Project not found
  34. div(ng-switch-default)
  35. .alert.alert-danger(aria-live="assertive") #{translate('token_access_failure')}
  36. p
  37. a(href="/") #{translate('home')}
  38. .loading-screen(
  39. ng-show="mode == 'v1Import'"
  40. )
  41. .container
  42. .row
  43. .col-sm-8.col-sm-offset-2
  44. h1.text-center
  45. span(ng-if="v1ImportData.status != 'mustLogin'") Overleaf v1 Project
  46. span(ng-if="v1ImportData.status == 'mustLogin'") Please Log In
  47. img.v2-import__img(
  48. src="/img/v1-import/v2-editor.png"
  49. alt="The new V2 editor."
  50. )
  51. div(ng-if="v1ImportData.status == 'cannotImport'")
  52. h2.text-center
  53. | Cannot Access Overleaf v1 Project
  54. p.text-center.row-spaced-small
  55. | Please contact the project owner or
  56. |
  57. a(href="/contact") contact support
  58. |
  59. | for assistance.
  60. div(ng-if="v1ImportData.status == 'mustLogin'")
  61. p.text-center.row-spaced-small
  62. | You will need to log in to access this project.
  63. .row-spaced.text-center
  64. a.btn.btn-primary(
  65. href="/login?redir={{ currentPath() }}"
  66. ) Log In To Access Project
  67. div(ng-if="v1ImportData.status == 'canDownloadZip'")
  68. p.text-center.row-spaced.small
  69. | #[strong() {{ getProjectName() }}] has not yet been moved into
  70. | the new version of Overleaf. This project was created
  71. | anonymously and therefore cannot be automatically imported.
  72. | Please download a zip file of the project and upload that to
  73. | continue editing it. If you would like to delete this project
  74. | after you have made a copy, please contact support.
  75. .row-spaced.text-center
  76. a.btn.btn-primary(ng-href="{{ buildZipDownloadPath(v1ImportData.projectId) }}")
  77. | Download project zip file
  78. .loading-screen(
  79. ng-show="mode == 'requireAccept'"
  80. )
  81. .container
  82. .row
  83. .col-md-8.col-md-offset-2
  84. .card
  85. .page-header.text-centered
  86. h1 #{translate("invited_to_join")}
  87. br
  88. em {{ getProjectName() }}
  89. .row.text-center
  90. .col-md-12
  91. p
  92. if user
  93. | #{translate("accepting_invite_as")}
  94. |
  95. em #{user.email}
  96. .row.text-center
  97. .col-md-12
  98. button.btn.btn-lg.btn-primary(
  99. type='submit'
  100. ng-click="postConfirmedByUser()"
  101. ) #{translate("join_project")}
  102. block append foot-scripts
  103. script(type="text/javascript", nonce=scriptNonce).
  104. $(document).ready(function () {
  105. setTimeout(function() {
  106. $('.loading-screen-brand').css('height', '20%')
  107. }, 500);
  108. });