Skip to content

Commit b46f6d0

Browse files
authored
feat: moderation locking (#5070)
* feat: base locking impl * feat: lock logic in place in rev endpoint + fetch rev * feat: frontend impl and finalize * feat: auto skip if using the moderation queue page * fix: qa issues * fix: async state + locking fix * fix: lint * fix: fmt * fix: qa issue * fix: qa + redirect bug * fix: lint * feat: delete all locks endpoint for admins * fix: dedupe * fix: fmt * fix: project redirect move to middleware * fix: lint
1 parent 915d8c6 commit b46f6d0

21 files changed

+1639
-316
lines changed

apps/frontend/nuxt.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ export default defineNuxtConfig({
311311
compatibilityDate: '2025-01-01',
312312
telemetry: false,
313313
experimental: {
314-
asyncContext: true,
314+
asyncContext: isProduction(),
315315
},
316316
})
317317

apps/frontend/src/components/ui/moderation/ModerationQueueCard.vue

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,20 @@ import dayjs from 'dayjs'
127127
import { computed } from 'vue'
128128
129129
import type { ModerationProject } from '~/helpers/moderation'
130-
import { useModerationStore } from '~/store/moderation.ts'
131130
132131
const { addNotification } = injectNotificationManager()
133132
const formatRelativeTime = useRelativeTime()
134-
const moderationStore = useModerationStore()
135133
136134
const baseId = useId()
137135
138136
const props = defineProps<{
139137
queueEntry: ModerationProject
140138
}>()
141139
140+
const emit = defineEmits<{
141+
startFromProject: [projectId: string]
142+
}>()
143+
142144
function getDaysQueued(date: Date): number {
143145
const now = new Date()
144146
const diff = now.getTime() - date.getTime()
@@ -201,16 +203,6 @@ const quickActions: OverflowMenuOption[] = [
201203
]
202204
203205
function openProjectForReview() {
204-
moderationStore.setSingleProject(props.queueEntry.project.id)
205-
navigateTo({
206-
name: 'type-id',
207-
params: {
208-
type: 'project',
209-
id: props.queueEntry.project.slug || props.queueEntry.project.id,
210-
},
211-
state: {
212-
showChecklist: true,
213-
},
214-
})
206+
emit('startFromProject', props.queueEntry.project.id)
215207
}
216208
</script>

0 commit comments

Comments
 (0)