pleroma-fe/src/components/settings_modal/helpers/modified_indicator.vue

52 lines
938 B
Vue
Raw Normal View History

2020-10-17 21:28:49 +02:00
<template>
<span
v-if="changed"
class="ModifiedIndicator"
2021-02-25 13:32:21 +01:00
>
2020-10-17 21:28:49 +02:00
<Popover
trigger="hover"
2021-02-25 13:32:21 +01:00
>
2022-07-31 11:35:48 +02:00
<template #trigger>
&nbsp;
2021-02-25 13:32:21 +01:00
<FAIcon
icon="wrench"
2021-04-07 21:42:34 +02:00
:aria-label="$t('settings.setting_changed')"
2021-02-25 13:32:21 +01:00
/>
2021-04-07 21:42:34 +02:00
</template>
2022-07-31 11:35:48 +02:00
<template #content>
2021-04-07 21:42:34 +02:00
<div class="modified-tooltip">
{{ $t('settings.setting_changed') }}
</div>
</template>
2020-10-17 21:28:49 +02:00
</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
)
2020-10-17 21:28:49 +02:00
export default {
2021-02-25 13:32:21 +01:00
components: { Popover },
props: ['changed']
2020-10-17 21:28:49 +02:00
}
</script>
<style lang="scss">
.ModifiedIndicator {
2020-10-17 21:28:49 +02:00
display: inline-block;
position: relative;
2022-07-30 22:36:40 +02:00
}
2020-10-17 21:28:49 +02:00
2022-07-30 22:36:40 +02:00
.modified-tooltip {
margin: 0.5em 1em;
min-width: 10em;
text-align: center;
2020-10-17 21:28:49 +02:00
}
</style>