account-overview.ejs 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <div id="account-overview" v-cloak>
  2. <div class="container">
  3. <h1>My account</h1>
  4. <hr/>
  5. <div class="row mb-3">
  6. <div class="col-sm-6">
  7. <h4>Personal information</h4>
  8. </div>
  9. <div class="col-sm-6">
  10. <span class="float-sm-right">
  11. <a class="btn btn-sm btn-outline-info account-settings-button" href="/account/profile">Edit profile</a>
  12. </span>
  13. </div>
  14. </div>
  15. <div class="row">
  16. <div class="col-3">Name:</div>
  17. <div class="col"><strong>{{me.fullName}}</strong></div>
  18. </div>
  19. <div class="row">
  20. <div class="col-3">Email:</div>
  21. <div class="col">
  22. <strong :class="[me.emailStatus === 'unconfirmed' || me.emailStatus === 'changeRequested' ? 'text-muted' : '']">{{me.emailChangeCandidate ? me.emailChangeCandidate : me.emailAddress}}</strong>
  23. <span v-if="me.emailStatus === 'unconfirmed' || me.emailStatus === 'changeRequested'" class="badge badge-pill badge-warning">Unverified</span>
  24. </div>
  25. </div>
  26. <hr/>
  27. <div class="row mb-3">
  28. <div class="col-sm-6">
  29. <h4>Password</h4>
  30. </div>
  31. <div class="col-sm-6">
  32. <span class="float-sm-right">
  33. <a class="btn btn-sm btn-outline-info account-settings-button" href="/account/password">Change password</a>
  34. </span>
  35. </div>
  36. </div>
  37. <div class="row">
  38. <div class="col-3">Password:</div>
  39. <div class="col"><strong>••••••••••</strong></div>
  40. </div>
  41. <hr/>
  42. <div class="row mb-3" v-if="isBillingEnabled">
  43. <div class="col-sm-6">
  44. <h4>Billing</h4>
  45. </div>
  46. <div class="col-sm-6">
  47. <span class="float-sm-right">
  48. <button class="btn btn-sm btn-outline-info account-settings-button" :disabled="syncingUpdateCard" @click="clickStripeCheckoutButton()">{{ syncingUpdateCard ? 'Updating...' : hasBillingCard ? 'Change card' : 'Add Card' }}</button>
  49. </span>
  50. </div>
  51. </div>
  52. <div v-if="isBillingEnabled && hasBillingCard">
  53. <div class="row">
  54. <div class="col-3">Credit card:</div>
  55. <div class="col">{{me.billingCardBrand}} ending in <strong>{{me.billingCardLast4}}</strong> <a class="remove-button ml-2" @click="clickRemoveCardButton()">Remove</a></div>
  56. </div>
  57. <div class="row">
  58. <div class="col-3">Expiration:</div>
  59. <div class="col">{{me.billingCardExpMonth}}/{{me.billingCardExpYear}}</div>
  60. </div>
  61. </div>
  62. <div class="alert alert-danger" v-else-if="isBillingEnabled && cloudError">
  63. There was an error updating your credit card information. Please check your information and try again, or <a href="/contact">contact support</a> if the error persists.
  64. </div>
  65. <div class="alert alert-secondary" v-else-if="isBillingEnabled">
  66. You have not linked a payment source to your account. In order to access paid features, you'll need to provide your credit card information. (Don't worry: you will only be charged when you've reached the limit of your free plan.)
  67. </div>
  68. </div>
  69. <% /* Confirm Remove Card Info Modal */ %>
  70. <modal v-if="removeCardModalVisible" @close="closeRemoveCardModal()" v-cloak>
  71. <div class="modal-header">
  72. <h5 class="modal-title">Remove Card Info?</h5>
  73. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  74. <span>&times;</span>
  75. </button>
  76. </div>
  77. <ajax-form action="updateBillingCard" :syncing.sync="syncingRemoveCard" :cloud-error.sync="cloudError" :handle-parsing="handleParsingRemoveCardForm" @submitted="submittedRemoveCardForm()">
  78. <div class="modal-body">
  79. <p>Are you sure you want to remove your {{me.billingCardBrand}} ending in <strong>{{me.billingCardLast4}}</strong>?</p>
  80. <p class="text-muted">This may restrict your access to paid features.</p>
  81. <p class="text-danger" v-if="cloudError"><small>An error occured while processing your request. Please check your information and try again, or <a href="/contact">contact support</a> if the error persists.</small></p>
  82. </div>
  83. <div class="modal-footer">
  84. <button data-dismiss="modal" class="btn btn-outline-secondary mr-1">Nevermind</button>
  85. <ajax-button type="submit" :syncing="syncingRemoveCard" class="btn btn-danger ml-1">Remove</ajax-button>
  86. </div>
  87. </ajax-form>
  88. </modal>
  89. </div>
  90. <%- /* Expose locals as `window.SAILS_LOCALS` :: */ exposeLocalsToBrowser() %>