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

Commit

Permalink
Remove useless moderation stuff
Browse files Browse the repository at this point in the history
Moderation messages are superseded by threads, so there is no need to have the ModalModeration anymore, it would only confuse new moderators
  • Loading branch information
triphora committed Aug 1, 2023
1 parent 34d63f3 commit f5301b5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 252 deletions.
175 changes: 0 additions & 175 deletions components/ui/ModalModeration.vue

This file was deleted.

77 changes: 0 additions & 77 deletions pages/[type]/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,6 @@
"
/>
</Head>
<ModalModeration
v-if="auth.user"
ref="modalModeration"
:project="project"
:status="moderationStatus"
:on-close="resetProject"
/>
<Modal ref="modalLicense" :header="project.license.name ? project.license.name : 'License'">
<div class="modal-license">
<div class="markdown-body" v-html="renderString(licenseText)" />
Expand Down Expand Up @@ -355,61 +348,6 @@
</button>
</div>
</div>
<div
v-if="auth.user && tags.staffRoles.includes(auth.user.role)"
class="universal-card moderation-card"
>
<h2>Moderation actions</h2>
<div class="input-stack">
<button
v-if="
!tags.approvedStatuses.includes(project.status) || project.status === 'processing'
"
class="iconified-button brand-button"
@click="openModerationModal(requestedStatus)"
>
<CheckIcon />
Approve
{{ requestedStatus !== 'approved' ? `(${requestedStatus})` : '' }}
</button>
<button
v-if="
tags.approvedStatuses.includes(project.status) ||
project.status === 'processing' ||
(tags.rejectedStatuses.includes(project.status) && project.status !== 'withheld')
"
class="iconified-button danger-button"
@click="openModerationModal('withheld')"
>
<EyeOffIcon />
Withhold
</button>
<button
v-if="
tags.approvedStatuses.includes(project.status) ||
project.status === 'processing' ||
(tags.rejectedStatuses.includes(project.status) && project.status !== 'rejected')
"
class="iconified-button danger-button"
@click="openModerationModal('rejected')"
>
<CrossIcon />
Reject
</button>
<button class="iconified-button" @click="openModerationModal(null)">
<EditIcon />
Edit message
</button>
<nuxt-link class="iconified-button" to="/moderation/review">
<ModerationIcon />
Visit review queue
</nuxt-link>
<nuxt-link class="iconified-button" to="/moderation/reports">
<ReportIcon />
Visit reports
</nuxt-link>
</div>
</div>
</div>
<section class="normal-page__content">
<ProjectMemberHeader
Expand Down Expand Up @@ -760,7 +698,6 @@
</template>
<script setup>
import CalendarIcon from '~/assets/images/utils/calendar.svg'
import CheckIcon from '~/assets/images/utils/check.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'
Expand All @@ -779,15 +716,13 @@ import PayPalIcon from '~/assets/images/external/paypal.svg'
import OpenCollectiveIcon from '~/assets/images/external/opencollective.svg'
import UnknownIcon from '~/assets/images/utils/unknown-donation.svg'
import ChevronRightIcon from '~/assets/images/utils/chevron-right.svg'
import EyeOffIcon from '~/assets/images/utils/eye-off.svg'
import BoxIcon from '~/assets/images/utils/box.svg'
import Promotion from '~/components/ads/Promotion.vue'
import Badge from '~/components/ui/Badge.vue'
import Categories from '~/components/ui/search/Categories.vue'
import EnvironmentIndicator from '~/components/ui/EnvironmentIndicator.vue'
import Modal from '~/components/ui/Modal.vue'
import ModalReport from '~/components/ui/ModalReport.vue'
import ModalModeration from '~/components/ui/ModalModeration.vue'
import NavRow from '~/components/ui/NavRow.vue'
import CopyCode from '~/components/ui/CopyCode.vue'
import Avatar from '~/components/ui/Avatar.vue'
Expand All @@ -802,9 +737,6 @@ import LinksIcon from '~/assets/images/utils/link.svg'
import LicenseIcon from '~/assets/images/utils/copyright.svg'
import GalleryIcon from '~/assets/images/utils/image.svg'
import VersionIcon from '~/assets/images/utils/version.svg'
import CrossIcon from '~/assets/images/utils/x.svg'
import EditIcon from '~/assets/images/utils/edit.svg'
import ModerationIcon from '~/assets/images/sidebar/admin.svg'
import { renderString } from '~/helpers/parse.js'
import Breadcrumbs from '~/components/ui/Breadcrumbs.vue'
Expand Down Expand Up @@ -970,7 +902,6 @@ const licenseIdDisplay = computed(() => {
}
})
const featuredGalleryImage = computed(() => project.value.gallery.find((img) => img.featured))
const requestedStatus = computed(() => project.value.requested_status ?? 'approved')
async function resetProject() {
const newProject = await useBaseFetch(`project/${project.value.id}`)
Expand Down Expand Up @@ -1127,14 +1058,6 @@ async function patchIcon(icon) {
return result
}
const modalModeration = ref(null)
const moderationStatus = ref(null)
function openModerationModal(status) {
moderationStatus.value = status
modalModeration.value.show()
}
async function updateMembers() {
allMembers.value = await useAsyncData(
`project/${route.params.id}/members`,
Expand Down

0 comments on commit f5301b5

Please sign in to comment.