settings.html 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. {% extends 'base.html' %}
  2. {% block content %}
  3. <div class="container-fluid">
  4. <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
  5. <h1 class="h2">Settings</h1>
  6. <span><small>Logged in as <b>{{ user.username }}</b></small></span>
  7. </div>
  8. <div id="settings-status-div" class="text-dark">
  9. </div>
  10. <div id="settings-form">
  11. <div class="mb-3">
  12. <label for="username" class="form-label">Username</label>
  13. <input type="text" class="form-control" name="username" id="username" value="{{ user.username }}">
  14. </div>
  15. <fieldset disabled>
  16. <div class="mb-3">
  17. <label for="email" class="form-label">Email Address</label>
  18. <input type="email" class="form-control" id="email" aria-describedby="emailHelp" value="{{ user.email }}">
  19. <div id="emailHelp" class="form-text">This is the google account you logged in with.</div>
  20. </div>
  21. <div class="mb-3">
  22. <label for="fullname" class="form-label">Full Name</label>
  23. <input type="text" class="form-control" id="fullname" value="{{ user.get_full_name }}">
  24. </div>
  25. <div class="mb-3">
  26. <label for="ytchannelid" class="form-label">YouTube Channel ID</label>
  27. <input type="text" class="form-control" id="ytchannelid" aria-describedby="emailHelp" value="{{ user.profile.yt_channel_id }}">
  28. </div>
  29. <div class="mb-3">
  30. <label for="accesstoken" class="form-label">Access Token</label>
  31. <input type="text" class="form-control" id="accesstoken" value="{{ user.profile.access_token }}">
  32. </div>
  33. <div class="mb-3">
  34. <label for="refreshtoken" class="form-label">Refresh Token</label>
  35. <input type="text" class="form-control" id="refreshtoken" value="{{ user.profile.refresh_token }}">
  36. </div>
  37. <div class="mb-3">
  38. <label for="expiresat" class="form-label">Expires At</label>
  39. <input type="datetime-local" class="form-control" id="expiresat" value="{{ user.profile.expires_at }}">
  40. </div>
  41. </fieldset>
  42. <div class="mb-3 form-check form-switch">
  43. <input class="form-check-input" name="auto refresh playlists" type="checkbox" id="flexSwitchCheckDefault">
  44. <label class="form-check-label" for="flexSwitchCheckDefault">Automatically refresh playlists on visit</label>
  45. </div>
  46. <div class="mb-3 form-check form-switch">
  47. <input class="form-check-input" name="hide videos" type="checkbox" id="flexSwitchCheckChecked" checked>
  48. <label class="form-check-label" for="flexSwitchCheckChecked">Hide deleted/private videos</label>
  49. </div>
  50. <div class="mb-3 form-check form-switch">
  51. <input class="form-check-input" name="confirm before deleting" type="checkbox" id="flexSwitchCheckChecked" checked>
  52. <label class="form-check-label" for="flexSwitchCheckChecked">Confirm before deleting</label>
  53. </div>
  54. </div>
  55. <div>
  56. <a class="btn btn-outline-danger" href="{% url 'delete_account' %}">Delete account</a>
  57. <button type="button" hx-post="{% url 'update_settings' %}" hx-include="[id='settings-form']" hx-target="#settings-status-div" class="btn btn-success">Save</button>
  58. </div>
  59. </div>
  60. {% endblock %}