Change icons for visibilities and make public visibility icon show up in

feed too
This commit is contained in:
Michcio 2022-09-25 13:23:04 +02:00
parent 010a65dd92
commit ef77f281a6
3 changed files with 13 additions and 12 deletions

View file

@ -12,11 +12,11 @@
</button>
<div>
<span class="text-count" :class="{ over: textLength > maxTextLength }">{{ maxTextLength - textLength }}</span>
<span v-if="localOnly" class="local-only"><i class="fas fa-biohazard"></i></span>
<span v-if="localOnly" class="local-only"><i class="fas fa-tree-city"></i></span>
<button ref="visibilityButton" v-tooltip="i18n.ts.visibility" class="_button visibility" :disabled="channel != null" @click="setVisibility">
<span v-if="visibility === 'public'"><i class="fas fa-globe"></i></span>
<span v-else-if="visibility === 'home'"><i class="fas fa-home"></i></span>
<span v-else-if="visibility === 'followers'"><i class="fas fa-unlock"></i></span>
<span v-if="visibility === 'public'"><i class="fas fa-bullhorn"></i></span>
<span v-else-if="visibility === 'home'"><i class="fas fa-lock-open"></i></span>
<span v-else-if="visibility === 'followers'"><i class="fas fa-lock"></i></span>
<span v-else-if="visibility === 'specified'"><i class="fas fa-envelope"></i></span>
</button>
<button v-tooltip="i18n.ts.previewNoteText" class="_button preview" :class="{ active: showPreview }" @click="showPreview = !showPreview"><i class="fas fa-file-code"></i></button>

View file

@ -2,21 +2,21 @@
<MkModal ref="modal" :z-priority="'high'" :src="src" @click="modal.close()" @closed="emit('closed')">
<div class="gqyayizv _popup">
<button key="public" class="_button" :class="{ active: v === 'public' }" data-index="1" @click="choose('public')">
<div><i class="fas fa-globe"></i></div>
<div><i class="fas fa-bullhorn"></i></div>
<div>
<span>{{ i18n.ts._visibility.public }}</span>
<span>{{ i18n.ts._visibility.publicDescription }}</span>
</div>
</button>
<button key="home" class="_button" :class="{ active: v === 'home' }" data-index="2" @click="choose('home')">
<div><i class="fas fa-home"></i></div>
<div><i class="fas fa-lock-open"></i></div>
<div>
<span>{{ i18n.ts._visibility.home }}</span>
<span>{{ i18n.ts._visibility.homeDescription }}</span>
</div>
</button>
<button key="followers" class="_button" :class="{ active: v === 'followers' }" data-index="3" @click="choose('followers')">
<div><i class="fas fa-unlock"></i></div>
<div><i class="fas fa-lock"></i></div>
<div>
<span>{{ i18n.ts._visibility.followers }}</span>
<span>{{ i18n.ts._visibility.followersDescription }}</span>
@ -31,7 +31,7 @@
</button>
<div class="divider"></div>
<button key="localOnly" class="_button localOnly" :class="{ active: localOnly }" data-index="5" @click="localOnly = !localOnly">
<div><i class="fas fa-biohazard"></i></div>
<div><i class="fas fa-tree-city"></i></div>
<div>
<span>{{ i18n.ts._visibility.localOnly }}</span>
<span>{{ i18n.ts._visibility.localOnlyDescription }}</span>

View file

@ -1,10 +1,11 @@
<template>
<span v-if="note.visibility !== 'public'" :class="$style.visibility">
<i v-if="note.visibility === 'home'" class="fas fa-home"></i>
<i v-else-if="note.visibility === 'followers'" class="fas fa-unlock"></i>
<span :class="$style.visibility">
<i v-if="note.visibility === 'public'" class="fas fa-bullhorn"></i>
<i v-else-if="note.visibility === 'home'" class="fas fa-lock-open"></i>
<i v-else-if="note.visibility === 'followers'" class="fas fa-lock"></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"><i class="fas fa-tree-city"></i></span>
</template>
<script lang="ts" setup>