Add tooltips to visibility icons (#9287)

This commit is contained in:
Sam Smucny 2022-12-08 00:57:23 -05:00 committed by GitHub
parent e81c2962a0
commit f89a163305
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,10 +1,10 @@
<template>
<span v-if="note.visibility !== 'public'" :class="$style.visibility">
<span v-if="note.visibility !== 'public'" :class="$style.visibility" :title="i18n.ts._visibility[note.visibility]">
<i v-if="note.visibility === 'home'" class="fas fa-home"></i>
<i v-else-if="note.visibility === 'followers'" class="fas fa-unlock"></i>
<i v-else-if="note.visibility === 'specified'" ref="specified" class="fas fa-envelope"></i>
</span>
<span v-if="note.localOnly" :class="$style.localOnly"><i class="fas fa-biohazard"></i></span>
<span v-if="note.localOnly" :class="$style.localOnly" :title="i18n.ts._visibility['localOnly']"><i class="fas fa-biohazard"></i></span>
</template>
<script lang="ts" setup>
@ -12,6 +12,7 @@ import { ref } from 'vue';
import XDetails from '@/components/MkUsersTooltip.vue';
import * as os from '@/os';
import { useTooltip } from '@/scripts/use-tooltip';
import { i18n } from '@/i18n';
const props = defineProps<{
note: {