logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git

user_note.vue (1701B)


  1. <template>
  2. <div
  3. class="user-note"
  4. >
  5. <div class="heading">
  6. <span>{{ $t('user_card.note') }}</span>
  7. <div class="buttons">
  8. <button
  9. v-show="!editing && editable"
  10. class="button-default btn"
  11. @click="startEditing"
  12. >
  13. {{ $t('user_card.edit_note') }}
  14. </button>
  15. <button
  16. v-show="editing"
  17. class="button-default btn"
  18. :disabled="frozen"
  19. @click="finalizeEditing"
  20. >
  21. {{ $t('user_card.edit_note_apply') }}
  22. </button>
  23. <button
  24. v-show="editing"
  25. class="button-default btn"
  26. :disabled="frozen"
  27. @click="cancelEditing"
  28. >
  29. {{ $t('user_card.edit_note_cancel') }}
  30. </button>
  31. </div>
  32. </div>
  33. <textarea
  34. v-show="editing"
  35. v-model="localNote"
  36. class="input note-text"
  37. />
  38. <span
  39. v-show="!editing"
  40. class="note-text"
  41. :class="{ '-blank': !relationship.note }"
  42. >
  43. {{ relationship.note || $t('user_card.note_blank') }}
  44. </span>
  45. </div>
  46. </template>
  47. <script src="./user_note.js"></script>
  48. <style lang="scss">
  49. .user-note {
  50. display: flex;
  51. flex-direction: column;
  52. .heading {
  53. display: flex;
  54. flex-direction: row;
  55. justify-content: space-between;
  56. align-items: center;
  57. margin-bottom: 0.75em;
  58. .btn {
  59. min-width: 95px;
  60. }
  61. .buttons {
  62. display: flex;
  63. flex-direction: row;
  64. justify-content: right;
  65. .btn {
  66. margin-left: 0.5em;
  67. }
  68. }
  69. }
  70. .note-text {
  71. align-self: stretch;
  72. }
  73. .note-text.-blank {
  74. font-style: italic;
  75. color: var(--textFaint);
  76. }
  77. }
  78. </style>