logo

pleroma-fe

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

modified_indicator.vue (1041B)


  1. <template>
  2. <span
  3. v-if="changed"
  4. class="ModifiedIndicator"
  5. >
  6. <Popover
  7. trigger="hover"
  8. :trigger-attrs="{ 'aria-label': $t('settings.setting_changed') }"
  9. >
  10. <template #trigger>
  11. &nbsp;
  12. <FAIcon
  13. icon="wrench"
  14. />
  15. </template>
  16. <template #content>
  17. <div class="modified-tooltip">
  18. {{ $t(messageKey) }}
  19. </div>
  20. </template>
  21. </Popover>
  22. </span>
  23. </template>
  24. <script>
  25. import Popover from 'src/components/popover/popover.vue'
  26. import { library } from '@fortawesome/fontawesome-svg-core'
  27. import { faWrench } from '@fortawesome/free-solid-svg-icons'
  28. library.add(
  29. faWrench
  30. )
  31. export default {
  32. components: { Popover },
  33. props: {
  34. changed: Boolean,
  35. messageKey: {
  36. type: String,
  37. default: 'settings.setting_changed'
  38. }
  39. }
  40. }
  41. </script>
  42. <style lang="scss">
  43. .ModifiedIndicator {
  44. display: inline-block;
  45. position: relative;
  46. }
  47. .modified-tooltip {
  48. margin: 0.5em 1em;
  49. min-width: 10em;
  50. text-align: center;
  51. }
  52. </style>