Add moderation button to side drawer
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful

This commit is contained in:
Sol Fisher Romanoff 2022-11-05 16:23:42 +02:00
parent bdd970ca68
commit bff34818bb
No known key found for this signature in database
GPG key ID: 9D3F2B64F2341B62
4 changed files with 23 additions and 16 deletions

View file

@ -13,20 +13,6 @@
>
<ReportsTab />
</div>
<!-- <div -->
<!-- :label="$t('moderation.users')" -->
<!-- icon="users" -->
<!-- data-tab-name="users" -->
<!-- > -->
<!-- <UsersTab /> -->
<!-- </div> -->
<!-- <div -->
<!-- :label="$t('moderation.statuses')" -->
<!-- icon="message" -->
<!-- data-tab-name="statuses" -->
<!-- > -->
<!-- <StatusesTab /> -->
<!-- </div> -->
</tab-switcher>
</template>

View file

@ -15,7 +15,8 @@ import {
faTachometerAlt,
faCog,
faInfoCircle,
faList
faList,
faUserTie
} from '@fortawesome/free-solid-svg-icons'
library.add(
@ -30,7 +31,8 @@ library.add(
faTachometerAlt,
faCog,
faInfoCircle,
faList
faList,
faUserTie
)
const SideDrawer = {
@ -102,6 +104,9 @@ const SideDrawer = {
},
openSettingsModal () {
this.$store.dispatch('openSettingsModal')
},
openModModal () {
this.$store.dispatch('openModModal')
}
}
}

View file

@ -143,6 +143,21 @@
/> {{ $t("nav.about") }}
</router-link>
</li>
<li
v-if="currentUser && currentUser.role === 'admin' || currentUser.role === 'moderator'"
@click="toggleDrawer"
>
<button
class="button-unstyled -link -fullwidth"
@click="openModModal"
>
<FAIcon
fixed-width
class="fa-scale-110 fa-old-padding"
icon="user-tie"
/> {{ $t("nav.moderation") }}
</button>
</li>
<li
v-if="currentUser && currentUser.role === 'admin'"
@click="toggleDrawer"

View file

@ -307,6 +307,7 @@
"interactions": "Interactions",
"lists": "Lists",
"mentions": "Mentions",
"moderation": "Moderation",
"preferences": "Preferences",
"public_timeline_description": "Public posts from this instance",
"public_tl": "Public timeline",