yandere_fe/src/components/settings_modal/helpers/modified_indicator.vue

52 lines
879 B
Vue
Raw Normal View History

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