feat: continue work
This commit is contained in:
parent
b2978096fd
commit
d33b06ea55
@ -8,14 +8,18 @@
|
|||||||
</p>
|
</p>
|
||||||
<p v-else>You've been invited to join this project. Please accept or decline the invitation.</p>
|
<p v-else>You've been invited to join this project. Please accept or decline the invitation.</p>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<button class="iconified-button brand-button" @click="acceptInvite()">
|
<ButtonStyled color="brand">
|
||||||
<CheckIcon />
|
<button class="brand-button" @click="acceptInvite()">
|
||||||
Accept
|
<CheckIcon />
|
||||||
</button>
|
Accept
|
||||||
<button class="iconified-button danger-button" @click="declineInvite()">
|
</button>
|
||||||
<XIcon />
|
</ButtonStyled>
|
||||||
Decline
|
<ButtonStyled color="red">
|
||||||
</button>
|
<button @click="declineInvite">
|
||||||
|
<XIcon />
|
||||||
|
Decline
|
||||||
|
</button>
|
||||||
|
</ButtonStyled>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@ -31,12 +35,11 @@
|
|||||||
<h2 class="my-0 mr-auto">Publishing checklist</h2>
|
<h2 class="my-0 mr-auto">Publishing checklist</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<button
|
<ButtonStyled circular>
|
||||||
:class="['square-button', !collapsed && '[&>svg]:rotate-180']"
|
<button :class="!collapsed && '[&>svg]:rotate-180'" @click="toggleCollapsed()">
|
||||||
@click="toggleCollapsed()"
|
<DropdownIcon class="duration-250 transition-transform ease-in-out" />
|
||||||
>
|
</button>
|
||||||
<DropdownIcon class="duration-250 transition-transform ease-in-out" />
|
</ButtonStyled>
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!collapsed" class="grid-display width-16 mt-4">
|
<div v-if="!collapsed" class="grid-display width-16 mt-4">
|
||||||
@ -80,9 +83,11 @@ import {
|
|||||||
LightBulbIcon,
|
LightBulbIcon,
|
||||||
TriangleAlertIcon,
|
TriangleAlertIcon,
|
||||||
DropdownIcon,
|
DropdownIcon,
|
||||||
|
SendIcon,
|
||||||
} from "@modrinth/assets";
|
} from "@modrinth/assets";
|
||||||
import { acceptTeamInvite, removeTeamMember } from "~/helpers/teams.js";
|
import { acceptTeamInvite, removeTeamMember } from "~/helpers/teams.js";
|
||||||
import { nags } from "@modrinth/moderation";
|
import { nags } from "@modrinth/moderation";
|
||||||
|
import { ButtonStyled } from "@modrinth/ui";
|
||||||
import type { Nag, NagContext, NagStatus } from "@modrinth/moderation";
|
import type { Nag, NagContext, NagStatus } from "@modrinth/moderation";
|
||||||
import type { Project, User, Version } from "@modrinth/utils";
|
import type { Project, User, Version } from "@modrinth/utils";
|
||||||
import type { Component } from "vue";
|
import type { Component } from "vue";
|
||||||
@ -138,8 +143,19 @@ const nagContext = computed<NagContext>(() => ({
|
|||||||
versions: props.versions,
|
versions: props.versions,
|
||||||
currentMember: props.currentMember as User,
|
currentMember: props.currentMember as User,
|
||||||
currentRoute: props.routeName,
|
currentRoute: props.routeName,
|
||||||
|
tags: props.tags,
|
||||||
|
submitProject: submitForReview,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
const submitForReview = async () => {
|
||||||
|
if (
|
||||||
|
!props.acknowledgedMessage ||
|
||||||
|
nags.value.filter((x) => x.condition && x.status === "required").length === 0
|
||||||
|
) {
|
||||||
|
await props.setProcessing();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const applicableNags = computed<Nag[]>(() => {
|
const applicableNags = computed<Nag[]>(() => {
|
||||||
return nags.filter((nag) => {
|
return nags.filter((nag) => {
|
||||||
return nag.shouldShow(nagContext.value);
|
return nag.shouldShow(nagContext.value);
|
||||||
|
|||||||
@ -2,6 +2,20 @@ import type { Nag, NagContext } from '../../types/nags'
|
|||||||
import { formatProjectType } from '@modrinth/utils'
|
import { formatProjectType } from '@modrinth/utils'
|
||||||
|
|
||||||
export const coreNags: Nag[] = [
|
export const coreNags: Nag[] = [
|
||||||
|
{
|
||||||
|
id: 'moderator-feedback',
|
||||||
|
title: 'Review moderator feedback',
|
||||||
|
description: () =>
|
||||||
|
'Review any feedback from moderators regarding your project before resubmitting.',
|
||||||
|
status: 'suggestion',
|
||||||
|
shouldShow: (context: NagContext) =>
|
||||||
|
context.tags.rejectedStatuses.includes(context.project.status),
|
||||||
|
link: {
|
||||||
|
path: 'moderation',
|
||||||
|
title: 'Visit moderation thread',
|
||||||
|
shouldShow: (context: NagContext) => context.currentRoute !== 'type-id-moderation',
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'upload-version',
|
id: 'upload-version',
|
||||||
title: 'Upload a version',
|
title: 'Upload a version',
|
||||||
|
|||||||
0
packages/moderation/data/nags/extended.ts
Normal file
0
packages/moderation/data/nags/extended.ts
Normal file
@ -32,6 +32,8 @@ export interface NagContext {
|
|||||||
* The current route in the application.
|
* The current route in the application.
|
||||||
*/
|
*/
|
||||||
currentRoute: string
|
currentRoute: string
|
||||||
|
tags: any
|
||||||
|
submitProject: (...any: any) => any
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user