mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-29 05:17:39 -07:00
feat: 🧐 bring back misskey's moderation displays on profile
This commit is contained in:
parent
336603a2f4
commit
8f7eedc784
3 changed files with 28 additions and 15 deletions
|
@ -160,7 +160,6 @@
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { defineAsyncComponent } from "vue";
|
import { defineAsyncComponent } from "vue";
|
||||||
import { toUnicode } from "punycode/";
|
import { toUnicode } from "punycode/";
|
||||||
import { showSuspendedDialog } from "../scripts/show-suspended-dialog";
|
|
||||||
import MkButton from "@/components/MkButton.vue";
|
import MkButton from "@/components/MkButton.vue";
|
||||||
import MkInput from "@/components/form/input.vue";
|
import MkInput from "@/components/form/input.vue";
|
||||||
import MkInfo from "@/components/MkInfo.vue";
|
import MkInfo from "@/components/MkInfo.vue";
|
||||||
|
@ -367,6 +366,14 @@ function resetPassword() {
|
||||||
"closed"
|
"closed"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showSuspendedDialog() {
|
||||||
|
os.alert({
|
||||||
|
type: "error",
|
||||||
|
title: i18n.ts.yourAccountSuspendedTitle,
|
||||||
|
text: i18n.ts.yourAccountSuspendedDescription,
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -7,9 +7,22 @@
|
||||||
:class="{ wide: !narrow }"
|
:class="{ wide: !narrow }"
|
||||||
>
|
>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<!-- TODO -->
|
<div v-if="$i?.isModerator || $i?.isAdmin">
|
||||||
<!-- <div class="punished" v-if="user.isSuspended"><i class="ph-warning ph-bold ph-lg" style="margin-right: 8px;"></i> {{ i18n.ts.userSuspended }}</div> -->
|
<div class="punished" v-if="user.isSilenced">
|
||||||
<!-- <div class="punished" v-if="user.isSilenced"><i class="ph-warning ph-bold ph-lg" style="margin-right: 8px;"></i> {{ i18n.ts.userSilenced }}</div> -->
|
<i
|
||||||
|
class="ph-warning ph-bold ph-lg"
|
||||||
|
style="margin-right: 8px; color: var(--warn)"
|
||||||
|
></i>
|
||||||
|
{{ i18n.ts.silenced }}
|
||||||
|
</div>
|
||||||
|
<div class="punished" v-if="user.isSuspended">
|
||||||
|
<i
|
||||||
|
class="ph-warning ph-bold ph-lg"
|
||||||
|
style="margin-right: 8px; color: var(--warn)"
|
||||||
|
></i>
|
||||||
|
{{ i18n.ts.suspended }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="profile">
|
<div class="profile">
|
||||||
<MkMoved
|
<MkMoved
|
||||||
|
@ -447,7 +460,10 @@ onUnmounted(() => {
|
||||||
> .main {
|
> .main {
|
||||||
> .punished {
|
> .punished {
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
padding: 16px;
|
padding: 10px;
|
||||||
|
color: var(--infoWarnBg);
|
||||||
|
background-color: var(--infoWarnFg);
|
||||||
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
> .profile {
|
> .profile {
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
import * as os from "@/os";
|
|
||||||
import { i18n } from "@/i18n";
|
|
||||||
|
|
||||||
export function showSuspendedDialog() {
|
|
||||||
return os.alert({
|
|
||||||
type: "error",
|
|
||||||
title: i18n.ts.yourAccountSuspendedTitle,
|
|
||||||
text: i18n.ts.yourAccountSuspendedDescription,
|
|
||||||
});
|
|
||||||
}
|
|
Loading…
Reference in a new issue