You've already forked AstralRinth
forked from didirus/AstralRinth
Miscellaneous fixes relating to statuses, et al (#920)
This commit is contained in:
@@ -17,5 +17,6 @@ module.exports = {
|
||||
rules: {
|
||||
'no-console': 'off',
|
||||
'vue/no-v-html': 'off',
|
||||
'import/no-named-as-default': 'off',
|
||||
},
|
||||
}
|
||||
|
||||
@@ -10,6 +10,12 @@
|
||||
<nuxt-link to="/legal/rules">Rules</nuxt-link>. Rest assured, we’ll
|
||||
keep your identifying information private.
|
||||
</p>
|
||||
<p v-if="itemType === 'project' || itemType === 'version'">
|
||||
Please <strong>do not</strong> use this to report bugs with the
|
||||
project itself. This form is only for submitting a report to Modrinth
|
||||
staff. If the project has an Issues link or a Discord invite, consider
|
||||
reporting it there.
|
||||
</p>
|
||||
</div>
|
||||
<label class="report-label" for="report-type">
|
||||
<span>
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
$auth.user &&
|
||||
currentMember &&
|
||||
nags.filter((x) => x.condition).length > 0 &&
|
||||
project.status === 'draft'
|
||||
(project.status === 'draft' ||
|
||||
$tag.rejectedStatuses.includes(project.status))
|
||||
"
|
||||
class="author-actions universal-card"
|
||||
>
|
||||
@@ -63,6 +64,16 @@
|
||||
/>{{ nag.title }}</span
|
||||
>
|
||||
{{ nag.description }}
|
||||
<Checkbox
|
||||
v-if="
|
||||
nag.status === 'review' &&
|
||||
project.moderator_message &&
|
||||
$tag.rejectedStatuses.includes(project.status)
|
||||
"
|
||||
v-model="acknowledgedMessage"
|
||||
>
|
||||
I acknowledge that I have addressed the staff's message on the sidebar
|
||||
</Checkbox>
|
||||
<NuxtLink
|
||||
v-if="nag.link"
|
||||
:class="{ invisible: nag.link.hide }"
|
||||
@@ -99,10 +110,12 @@ import RequiredIcon from '~/assets/images/utils/asterisk.svg?inline'
|
||||
import SuggestionIcon from '~/assets/images/utils/lightbulb.svg?inline'
|
||||
import ModerationIcon from '~/assets/images/sidebar/admin.svg?inline'
|
||||
import SendIcon from '~/assets/images/utils/send.svg?inline'
|
||||
import Checkbox from '~/components/ui/Checkbox'
|
||||
|
||||
export default {
|
||||
name: 'ProjectPublishingChecklist',
|
||||
components: {
|
||||
Checkbox,
|
||||
ChevronRightIcon,
|
||||
DropdownIcon,
|
||||
CheckIcon,
|
||||
@@ -163,6 +176,11 @@ export default {
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
acknowledgedMessage: !this.project.moderator_message,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
featuredGalleryImage() {
|
||||
return this.project.gallery.find((img) => img.featured)
|
||||
@@ -290,7 +308,8 @@ export default {
|
||||
},
|
||||
},
|
||||
{
|
||||
condition: this.project.status === 'draft',
|
||||
hide: this.project.status !== 'draft',
|
||||
condition: true,
|
||||
title: 'Submit for review',
|
||||
id: 'submit-for-review',
|
||||
description:
|
||||
@@ -305,6 +324,25 @@ export default {
|
||||
.length > 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
hide: !this.$tag.rejectedStatuses.includes(this.project.status),
|
||||
condition: true,
|
||||
title: 'Resubmit for review',
|
||||
id: 'resubmit-for-review',
|
||||
description: `Your project has been ${this.project.status} by
|
||||
Modrinth's staff. In most cases, you can resubmit for review after
|
||||
addressing the staff's message.`,
|
||||
status: 'review',
|
||||
link: null,
|
||||
action: {
|
||||
onClick: this.submitForReview,
|
||||
title: 'Resubmit for review',
|
||||
disabled: () =>
|
||||
!this.acknowledgedMessage ||
|
||||
this.nags.filter((x) => x.condition && x.status === 'required')
|
||||
.length > 0,
|
||||
},
|
||||
},
|
||||
]
|
||||
.filter((x) => !x.hide)
|
||||
.sort((a, b) =>
|
||||
@@ -341,6 +379,7 @@ export default {
|
||||
},
|
||||
async submitForReview() {
|
||||
if (
|
||||
!this.acknowledgedMessage ||
|
||||
this.nags.filter((x) => x.condition && x.status === 'required')
|
||||
.length === 0
|
||||
) {
|
||||
|
||||
@@ -132,10 +132,7 @@
|
||||
<span class="title">Settings</span>
|
||||
</NuxtLink>
|
||||
<NuxtLink
|
||||
v-if="
|
||||
$auth.user.role === 'moderator' ||
|
||||
$auth.user.role === 'admin'
|
||||
"
|
||||
v-if="$tag.staffRoles.includes($auth.user.role)"
|
||||
class="item button-transparent"
|
||||
to="/moderation"
|
||||
>
|
||||
@@ -297,10 +294,7 @@
|
||||
<span class="dropdown-item__text">Settings</span>
|
||||
</NuxtLink>
|
||||
<NuxtLink
|
||||
v-if="
|
||||
$auth.user &&
|
||||
($auth.user.role === 'moderator' || $auth.user.role === 'admin')
|
||||
"
|
||||
v-if="$auth.user && $tag.staffRoles.includes($auth.user.role)"
|
||||
class="iconified-button raised-button"
|
||||
to="/moderation"
|
||||
>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="main">
|
||||
<div class="error">
|
||||
<Logo404 v-if="error.statusCode === 404" />
|
||||
<h1 v-else>An error occured!</h1>
|
||||
<h1 v-else>An error occurred!</h1>
|
||||
<p>{{ error.message }}</p>
|
||||
<div class="button-group">
|
||||
<nuxt-link to="/" class="iconified-button raised-button brand-button">
|
||||
|
||||
@@ -278,96 +278,44 @@
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
currentMember &&
|
||||
((!$tag.approvedStatuses.includes(project.status) &&
|
||||
project.status !== 'processing') ||
|
||||
(project.moderator_message &&
|
||||
(project.moderator_message.message ||
|
||||
project.moderator_message.body)))
|
||||
"
|
||||
v-if="currentMember && project.moderator_message"
|
||||
class="universal-card"
|
||||
>
|
||||
<h3 class="card-header">Moderation status</h3>
|
||||
<div class="current-status">
|
||||
Project status:
|
||||
<Badge :type="project.status" />
|
||||
</div>
|
||||
<div class="message">
|
||||
<p v-if="project.status === 'rejected'">
|
||||
Your project has been rejected by Modrinth's staff. In most cases,
|
||||
you can resubmit for review after addressing the staff's message,
|
||||
which is below. Do not resubmit until you've addressed the message
|
||||
from the moderators!
|
||||
<h3 class="card-header">Message from the moderators:</h3>
|
||||
<div v-if="project.moderator_message.body">
|
||||
<p
|
||||
v-if="project.moderator_message.message"
|
||||
class="mod-message__title"
|
||||
>
|
||||
{{ project.moderator_message.message }}
|
||||
</p>
|
||||
<div v-if="project.moderator_message">
|
||||
<hr class="card-divider" />
|
||||
<div v-if="project.moderator_message.body">
|
||||
<h3 class="card-header">Message from the moderators:</h3>
|
||||
<p
|
||||
v-if="project.moderator_message.message"
|
||||
class="mod-message__title"
|
||||
>
|
||||
{{ project.moderator_message.message }}
|
||||
</p>
|
||||
<div
|
||||
v-highlightjs
|
||||
class="markdown-body"
|
||||
v-html="$xss($md.render(project.moderator_message.body))"
|
||||
/>
|
||||
</div>
|
||||
<div v-else>
|
||||
<h3 class="card-header">Message from the moderators:</h3>
|
||||
<p>{{ project.moderator_message.message }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="buttons status-buttons">
|
||||
<button
|
||||
v-if="
|
||||
!$tag.approvedStatuses.includes(project.status) &&
|
||||
project.status !== 'processing'
|
||||
"
|
||||
class="iconified-button brand-button"
|
||||
@click="submitForReview"
|
||||
>
|
||||
<CheckIcon />
|
||||
Resubmit for review
|
||||
</button>
|
||||
<button
|
||||
v-if="$tag.approvedStatuses.includes(project.status)"
|
||||
class="iconified-button"
|
||||
@click="clearMessage"
|
||||
>
|
||||
<ClearIcon />
|
||||
Clear message
|
||||
</button>
|
||||
</div>
|
||||
<div v-if="showKnownErrors" class="known-errors">
|
||||
<ul>
|
||||
<li v-if="project.body === ''">
|
||||
Your project must have a body to submit for review.
|
||||
</li>
|
||||
<li v-if="project.versions.length < 1">
|
||||
Your project must have at least one version to submit for
|
||||
review.
|
||||
</li>
|
||||
<li
|
||||
v-if="
|
||||
project.client_side === 'unknown' ||
|
||||
project.server_side === 'unknown'
|
||||
"
|
||||
>
|
||||
Your project must have the supported environments selected.
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div
|
||||
v-highlightjs
|
||||
class="markdown-body"
|
||||
v-html="
|
||||
$xss(
|
||||
$md.render(
|
||||
project.moderator_message.body
|
||||
? project.moderator_message.body
|
||||
: project.moderator_message.message
|
||||
)
|
||||
)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div class="buttons status-buttons">
|
||||
<button
|
||||
v-if="$tag.approvedStatuses.includes(project.status)"
|
||||
class="iconified-button"
|
||||
@click="clearMessage"
|
||||
>
|
||||
<ClearIcon />
|
||||
Clear message
|
||||
</button>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
$auth.user &&
|
||||
($auth.user.role === 'admin' || $auth.user.role === 'moderator')
|
||||
"
|
||||
v-if="$auth.user && $tag.staffRoles.includes($auth.user.role)"
|
||||
class="universal-card moderation-card"
|
||||
>
|
||||
<h3>Moderation actions</h3>
|
||||
@@ -378,16 +326,11 @@
|
||||
project.status === 'processing'
|
||||
"
|
||||
class="iconified-button brand-button"
|
||||
@click="
|
||||
openModerationModal(
|
||||
project.requested_status
|
||||
? project.requested_status
|
||||
: 'approved'
|
||||
)
|
||||
"
|
||||
@click="openModerationModal(requestedStatus)"
|
||||
>
|
||||
<CheckIcon />
|
||||
Approve
|
||||
{{ requestedStatus !== 'approved' ? `(${requestedStatus})` : '' }}
|
||||
</button>
|
||||
<button
|
||||
v-if="
|
||||
@@ -700,9 +643,8 @@
|
||||
class="card warning"
|
||||
aria-label="Warning"
|
||||
>
|
||||
{{ project.title }} has been archived by the project author.
|
||||
{{ project.title }} will not receive any further updates unless the
|
||||
author decides to unarchive the project.
|
||||
{{ project.title }} has been archived and will not receive any further
|
||||
updates unless the author decides to unarchive the project.
|
||||
</div>
|
||||
<div
|
||||
v-if="project.project_type === 'modpack'"
|
||||
@@ -976,8 +918,7 @@ export default {
|
||||
if (
|
||||
!currentMember &&
|
||||
data.$auth.user &&
|
||||
(data.$auth.user.role === 'admin' ||
|
||||
data.$auth.user.role === 'moderator')
|
||||
data.$tag.staffRoles.includes(data.$auth.user.role)
|
||||
) {
|
||||
currentMember = {
|
||||
team_id: project.team_id,
|
||||
@@ -1024,7 +965,6 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showKnownErrors: false,
|
||||
licenseText: '',
|
||||
isSettings: false,
|
||||
routeName: '',
|
||||
@@ -1122,6 +1062,9 @@ export default {
|
||||
featuredGalleryImage() {
|
||||
return this.project.gallery.find((img) => img.featured)
|
||||
},
|
||||
requestedStatus() {
|
||||
return this.project.requested_status ?? 'approved'
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'$route.path': {
|
||||
@@ -1204,19 +1147,6 @@ export default {
|
||||
|
||||
this.$nuxt.$loading.finish()
|
||||
},
|
||||
async submitForReview() {
|
||||
if (
|
||||
this.project.body === '' ||
|
||||
this.project.body.startsWith('# Placeholder description') ||
|
||||
this.versions.length < 1 ||
|
||||
this.project.client_side === 'unknown' ||
|
||||
this.project.server_side === 'unknown'
|
||||
) {
|
||||
this.showKnownErrors = true
|
||||
} else {
|
||||
await this.setProcessing()
|
||||
}
|
||||
},
|
||||
toggleChecklistCollapse() {
|
||||
this.collapsedChecklist = !this.collapsedChecklist
|
||||
},
|
||||
@@ -1646,13 +1576,6 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.current-status {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: var(--spacing-card-sm);
|
||||
margin-top: var(--spacing-card-md);
|
||||
}
|
||||
|
||||
.normal-page__sidebar .mod-button {
|
||||
margin-top: var(--spacing-card-sm);
|
||||
}
|
||||
|
||||
@@ -106,12 +106,13 @@
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<ul
|
||||
<p
|
||||
v-if="member.role === 'Owner' && member.oldRole !== 'Owner'"
|
||||
class="known-errors"
|
||||
>
|
||||
<li>A project can only have one 'Owner'.</li>
|
||||
</ul>
|
||||
A project can only have one 'Owner'. Use the 'Transfer ownership'
|
||||
button below if you no longer wish to be owner.
|
||||
</p>
|
||||
<template v-if="member.oldRole !== 'Owner'">
|
||||
<span class="label">
|
||||
<span class="label__title">Permissions</span>
|
||||
|
||||
@@ -152,7 +152,8 @@
|
||||
<li>Content containing sexual or explicit material</li>
|
||||
<li>Content promoting or sharing harmful or hateful behavior</li>
|
||||
<li>
|
||||
Content with a focus on items such as alcohol, tobacco, and other drugs
|
||||
Content themed around or containing real-life drugs or illicit
|
||||
substances
|
||||
</li>
|
||||
<li>Content with an excessive amount of profane language</li>
|
||||
</ul>
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
<template v-else>
|
||||
<div class="sidebar__item">
|
||||
<Badge
|
||||
v-if="user.role === 'admin' || user.role === 'moderator'"
|
||||
v-if="$tag.staffRoles.includes(user.role)"
|
||||
:type="user.role"
|
||||
/>
|
||||
<Badge v-else-if="projects.length > 0" type="creator" />
|
||||
@@ -233,12 +233,10 @@
|
||||
:status="
|
||||
$auth.user &&
|
||||
($auth.user.id === user.id ||
|
||||
$auth.user.role === 'admin' ||
|
||||
$auth.user.role === 'moderator')
|
||||
$tag.staffRoles.includes($auth.user.role))
|
||||
? project.status
|
||||
: null
|
||||
"
|
||||
:has-mod-message="project.moderator_message"
|
||||
:type="project.project_type"
|
||||
:color="project.color"
|
||||
/>
|
||||
|
||||
@@ -56,4 +56,6 @@ export const state = () => ({
|
||||
},
|
||||
projectViewModes: ['list', 'grid', 'gallery'],
|
||||
approvedStatuses: ['approved', 'archived', 'unlisted', 'private'],
|
||||
rejectedStatuses: ['rejected', 'withheld'],
|
||||
staffRoles: ['moderator', 'admin'],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user