aboutsummaryrefslogtreecommitdiff
path: root/src/components/settings_modal/helpers/modified_indicator.vue
blob: b75a28114f1f79729f0cf6ed7479d0cca6cfba5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<template>
  <span
    v-if="changed"
    class="ModifiedIndicator"
    >
    <Popover
      trigger="hover"
      >
      <span slot="trigger">
        &nbsp;
          <FAIcon
            icon="wrench"
          />
      </span>
      <div
        class="modified-tooltip"
        slot="content"
        >
      {{ $t('settings.setting_changed') }}
      </div>
    </Popover>
  </span>
</template>

<script>
import Popover from 'src/components/popover/popover.vue'
import { library } from '@fortawesome/fontawesome-svg-core'
import { faWrench } from '@fortawesome/free-solid-svg-icons'

library.add(
  faWrench
)

export default {
  props: ['changed'],
  components: { Popover }
}
</script>

<style lang="scss">
.ModifiedIndicator {
  display: inline-block;
  position: relative;

  .modified-tooltip {
    margin: 0.5em 1em;
    min-width: 10em;
    text-align: center;
  }
}
</style>