access.pug 3.7 KB

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