Moderation checklist (#1635)
* Moderation checklist * Skip button * Fix modpacks * Fix modpack types not being sent * Fixes * remove explainer * pass auth to analytics
This commit is contained in:
parent
5ea71da181
commit
cb1c8be870
1035
components/ui/ModerationChecklist.vue
Normal file
1035
components/ui/ModerationChecklist.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -702,6 +702,9 @@ function runAnalytics() {
|
||||
body: {
|
||||
url: window.location.href,
|
||||
},
|
||||
headers: {
|
||||
Authorization: auth.token,
|
||||
},
|
||||
})
|
||||
.then(() => {})
|
||||
.catch(() => {})
|
||||
|
||||
@ -415,10 +415,6 @@
|
||||
:auth="auth"
|
||||
:tags="tags"
|
||||
/>
|
||||
<MessageBanner v-else-if="project.status === 'withheld'" message-type="warning">
|
||||
{{ project.title }} has been removed from search by Modrinth's moderators. Please use
|
||||
{{ project.title }} at your own risk.
|
||||
</MessageBanner>
|
||||
<MessageBanner v-if="project.status === 'archived'" message-type="warning">
|
||||
{{ project.title }} has been archived. {{ project.title }} will not receive any further
|
||||
updates unless the author decides to unarchive the project.
|
||||
@ -755,6 +751,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ModerationChecklist
|
||||
v-if="auth.user && tags.staffRoles.includes(auth.user.role) && showModerationChecklist"
|
||||
:project="project"
|
||||
:reset-project="resetProject"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
@ -815,6 +816,7 @@ import Breadcrumbs from '~/components/ui/Breadcrumbs.vue'
|
||||
import { userCollectProject } from '~/composables/user.js'
|
||||
import CollectionCreateModal from '~/components/ui/CollectionCreateModal.vue'
|
||||
import OrganizationIcon from '~/assets/images/utils/organization.svg'
|
||||
import ModerationChecklist from '~/components/ui/ModerationChecklist.vue'
|
||||
|
||||
const data = useNuxtApp()
|
||||
const route = useRoute()
|
||||
@ -1207,6 +1209,11 @@ async function copyId() {
|
||||
}
|
||||
|
||||
const collapsedChecklist = ref(false)
|
||||
|
||||
const showModerationChecklist = ref(false)
|
||||
if (process.client && history && history.state && history.state.showChecklist) {
|
||||
showModerationChecklist.value = true
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.header {
|
||||
|
||||
@ -13,6 +13,13 @@
|
||||
<button v-else class="iconified-button push-right" @click="oldestFirst = true">
|
||||
<SortAscIcon />Sorting by newest
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-highlight"
|
||||
:disabled="projectsFiltered.length === 0"
|
||||
@click="goToProjects()"
|
||||
>
|
||||
<ModerationIcon /> Start moderating
|
||||
</button>
|
||||
</div>
|
||||
<p v-if="projectType !== 'all'" class="project-count">
|
||||
Showing {{ projectsFiltered.length }} {{ projectTypePlural }} of {{ projects.length }} total
|
||||
@ -101,6 +108,7 @@ import EyeIcon from '~/assets/images/utils/eye.svg'
|
||||
import SortAscIcon from '~/assets/images/utils/sort-asc.svg'
|
||||
import SortDescIcon from '~/assets/images/utils/sort-desc.svg'
|
||||
import WarningIcon from '~/assets/images/utils/issues.svg'
|
||||
import ModerationIcon from '~/assets/images/sidebar/admin.svg'
|
||||
import Badge from '~/components/ui/Badge.vue'
|
||||
import { formatProjectType } from '~/plugins/shorthands.js'
|
||||
|
||||
@ -186,6 +194,22 @@ if (projects.value) {
|
||||
})
|
||||
}
|
||||
}
|
||||
async function goToProjects() {
|
||||
const router = useRouter()
|
||||
|
||||
const project = projectsFiltered.value[0]
|
||||
await router.push({
|
||||
name: 'type-id',
|
||||
params: {
|
||||
type: project.project_type,
|
||||
id: project.slug ? project.slug : project.id,
|
||||
},
|
||||
state: {
|
||||
showChecklist: true,
|
||||
projects: projectsFiltered.value.slice(1).map((x) => (x.slug ? x.slug : x.id)),
|
||||
},
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.project {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user