Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
Remove mod inbox
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Mar 19, 2024
1 parent fe3e4ed commit 8c4fc18
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 110 deletions.
64 changes: 6 additions & 58 deletions pages/[type]/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -367,37 +367,6 @@
</div>
</div>
</div>
<div
v-if="currentMember && project.moderator_message"
class="universal-card moderation-card"
>
<h2 class="card-header">Message from the moderators:</h2>
<div v-if="project.moderator_message.body">
<p v-if="project.moderator_message.message" class="mod-message__title">
{{ project.moderator_message.message }}
</p>
</div>
<div
class="markdown-body"
v-html="
renderString(
project.moderator_message.body
? project.moderator_message.body
: project.moderator_message.message
)
"
/>
<div class="buttons status-buttons">
<button
v-if="tags.approvedStatuses.includes(project.status)"
class="iconified-button"
@click="clearMessage"
>
<ClearIcon />
Clear message
</button>
</div>
</div>
</div>
<section class="normal-page__content">
<ProjectMemberHeader
Expand Down Expand Up @@ -461,7 +430,9 @@
href: `/${project.project_type}/${
project.slug ? project.slug : project.id
}/moderation`,
shown: !!currentMember,
shown:
!!currentMember &&
(isRejected(project) || isUnderReview(project) || isStaff(auth.user)),
},
]"
/>
Expand Down Expand Up @@ -770,10 +741,12 @@ import {
Checkbox,
ChartIcon,
renderString,
isRejected,
isUnderReview,
isStaff,
} from 'omorphia'
import CrownIcon from '~/assets/images/utils/crown.svg'
import CalendarIcon from '~/assets/images/utils/calendar.svg'
import ClearIcon from '~/assets/images/utils/clear.svg'
import DownloadIcon from '~/assets/images/utils/download.svg'
import UpdateIcon from '~/assets/images/utils/updated.svg'
import QueuedIcon from '~/assets/images/utils/list-end.svg'
Expand Down Expand Up @@ -1042,31 +1015,6 @@ if (!route.name.startsWith('type-id-settings')) {
const onUserCollectProject = useClientTry(userCollectProject)
async function clearMessage() {
startLoading()
try {
await useBaseFetch(`project/${project.value.id}`, {
method: 'PATCH',
body: {
moderation_message: null,
moderation_message_body: null,
},
})
project.value.moderator_message = null
} catch (err) {
data.$notify({
group: 'main',
title: 'An error occurred',
text: err.data.description,
type: 'error',
})
}
stopLoading()
}
async function setProcessing() {
startLoading()
Expand Down
13 changes: 3 additions & 10 deletions pages/[type]/[id]/moderation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@
<h2>Messages</h2>
<p>
This is a private conversation thread with the Modrinth moderators. They may message you
with issues concerning this project. Additionally, you are welcome to start a discussion
here regarding this project and its status.
with issues concerning this project. This thread is only checked when you submit your
project for review. For additional inquiries, contact
<a href="https://support.modrinth.com">Modrinth support</a>.
</p>
<ConversationThread
v-if="thread"
Expand Down Expand Up @@ -124,7 +125,6 @@ const props = defineProps({
const app = useNuxtApp()
const auth = await useAuth()
const tags = useTags()
const { data: thread } = await useAsyncData(`thread/${props.project.thread_id}`, () =>
useBaseFetch(`thread/${props.project.thread_id}`)
Expand All @@ -140,13 +140,6 @@ async function setStatus(status) {
body: data,
})
if (tags.value.staffRoles.includes(auth.value.user.role)) {
await useBaseFetch(`thread/${props.project.thread_id}/read`, {
method: 'POST',
body: data,
})
}
const project = props.project
project.status = status
await props.resetProject()
Expand Down
3 changes: 0 additions & 3 deletions pages/moderation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
<NavStackItem link="/moderation/review" label="Review projects">
<ModerationIcon />
</NavStackItem>
<NavStackItem link="/moderation/messages" label="Messages">
<MessageIcon />
</NavStackItem>
<NavStackItem link="/moderation/reports" label="Reports">
<ReportIcon />
</NavStackItem>
Expand Down
39 changes: 0 additions & 39 deletions pages/moderation/messages.vue

This file was deleted.

0 comments on commit 8c4fc18

Please sign in to comment.