mirror of
https://github.com/modrinth/code.git
synced 2026-08-27 01:54:47 +00:00
feat: new modpack permissions system (#6005)
* Begin external projects moderator database frontend * add copy link button * begin project page permissions settings * MEL database backend routes * include filename in external files * wip: when uploading a version file, fetch its overrides as a list * wip: override license checks * improve FileHost ref counting * file host read capability * scan files when inserting version file * add dependency sha1 field * clean up version files * wip: attributions * update s3 file host * attribution scanning basic works * works * insert attribution info after resolving * add routes * remove dep sha1 stuff * prepr * wip: override file sources * add files_missing_attributions to versions * return extended version info + attributed at/by * hook up frontend to backend (mostly) * expose version date published * withholding version visibility * frontend work * prepr * use api-client for img upload * moar frontend * prepr * Add schema to attribution resolution and Flame project results * sqlx prepare * changes * remove feature flag, fix optional proof images * fix schema * fmt * fix deletion and file fetch * prepare * fix admonition * update frontend stuff to new schema * prepr * attribution on dependencies * fixes * sqlx prepare * fixes * routes * fix routes * Version grandfathering * prepare * wip: bulk routes * pushing what i've got rn * include link in NoPermission * change hash insert to bulk route * query flame even if entry in MEL * delete file with weird name * Prioritise putting override files in existing groups even with ExternalLicense * fix how hex bytes are handled in route * feat: coolbot moderation changes (#6215) * Update moderator checklist * move permissions stage order * Updated nagContext.versions to v3, added nag for permissions * Update permissions.vue default messages * prepr --------- Co-authored-by: coolbot100s <76798835+coolbot100s@users.noreply.github.com> * QA * prepr * should group by project * return attribution resolution correctly * updated by moderator info * Track what moderator reviewed an attribution moderation status * default deser FMA field * new version page * clean up fetching + add a couple missing features * qa items * prepr * provide moderation package stuff with DI * format? * don't redact moderated_at * move supplementary resources * Reorganize moderation messages. * Quick replies for external content permissions. * prepare * QA * allow exempting projects * Ignore Flame projects which 404 * fix ci * fix cross project attribution stuff * Fix permission error * change what files get cscanned * add more logging * QA Jun 22 * fix * idempotency * Expose route for rescanning * update blog link --------- Co-authored-by: aecsocket <aecsocket@tutanota.com> Co-authored-by: coolbot100s <76798835+coolbot100s@users.noreply.github.com> Co-authored-by: aecsocket <43144841+aecsocket@users.noreply.github.com>
This commit is contained in:
co-authored by
coolbot100s
aecsocket
aecsocket
parent
a686a93858
commit
e7926083fb
@@ -5,6 +5,7 @@ import {
|
||||
CalendarIcon,
|
||||
CardIcon,
|
||||
CheckCircleIcon,
|
||||
CircleAlertIcon,
|
||||
CurrencyIcon,
|
||||
DiscordIcon,
|
||||
FileArchiveIcon,
|
||||
@@ -72,6 +73,7 @@ export const SEVERITY_ICONS: Record<string, Component> = {
|
||||
critical: XCircleIcon,
|
||||
success: CheckCircleIcon,
|
||||
moderation: ScaleIcon,
|
||||
'circle-warning': CircleAlertIcon,
|
||||
}
|
||||
|
||||
export const PROJECT_STATUS_ICONS: Record<ProjectStatus, Component> = {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { defineMessages, type MessageDescriptor } from '../composables/i18n'
|
||||
import type { Labrinth } from '@modrinth/api-client'
|
||||
|
||||
import { defineMessage, defineMessages, type MessageDescriptor } from '../composables/i18n'
|
||||
|
||||
export const commonMessages = defineMessages({
|
||||
acceptButton: {
|
||||
@@ -25,6 +27,10 @@ export const commonMessages = defineMessages({
|
||||
id: 'badge.beta',
|
||||
defaultMessage: 'Beta',
|
||||
},
|
||||
release: {
|
||||
id: 'badge.release',
|
||||
defaultMessage: 'Release',
|
||||
},
|
||||
allProjectType: {
|
||||
id: 'project-type.all',
|
||||
defaultMessage: 'All',
|
||||
@@ -1124,6 +1130,10 @@ export const commonProjectSettingsMessages = defineMessages({
|
||||
id: 'project.settings.view.title',
|
||||
defaultMessage: 'View',
|
||||
},
|
||||
withheldVersionsWarningResolve: {
|
||||
id: 'project.versions.withheld-versions-warning.resolve-button',
|
||||
defaultMessage: 'Resolve',
|
||||
},
|
||||
})
|
||||
|
||||
export const languageSelectorMessages = defineMessages({
|
||||
@@ -1285,3 +1295,64 @@ export const externalProjectLicenseStatusMessages = defineMessages({
|
||||
defaultMessage: 'Unidentified',
|
||||
},
|
||||
})
|
||||
|
||||
export const projectCompatibilityMessages = defineMessages({
|
||||
title: {
|
||||
id: `project.about.compatibility.title`,
|
||||
defaultMessage: 'Compatibility',
|
||||
},
|
||||
minecraftJava: {
|
||||
id: `project.about.compatibility.game.minecraftJava`,
|
||||
defaultMessage: 'Minecraft: Java Edition',
|
||||
},
|
||||
platforms: {
|
||||
id: `project.about.compatibility.platforms`,
|
||||
defaultMessage: 'Platforms',
|
||||
},
|
||||
platformsPlural: {
|
||||
id: `project.about.compatibility.platforms-plural`,
|
||||
defaultMessage: '{count, plural, one {Platform} other {Platforms}}',
|
||||
},
|
||||
environments: {
|
||||
id: `project.about.compatibility.environments`,
|
||||
defaultMessage: 'Supported environments',
|
||||
},
|
||||
})
|
||||
|
||||
export const fileTypeMessages: Record<
|
||||
Labrinth.Versions.v3.FileType | 'primary',
|
||||
MessageDescriptor
|
||||
> = {
|
||||
primary: defineMessage({
|
||||
id: 'version.file-type.primary',
|
||||
defaultMessage: 'Primary',
|
||||
}),
|
||||
unknown: defineMessage({
|
||||
id: 'version.file-type.unknown',
|
||||
defaultMessage: 'Other',
|
||||
}),
|
||||
'required-resource-pack': defineMessage({
|
||||
id: 'version.file-type.required-resource-pack',
|
||||
defaultMessage: 'Required resource pack',
|
||||
}),
|
||||
'optional-resource-pack': defineMessage({
|
||||
id: 'version.file-type.optional-resource-pack',
|
||||
defaultMessage: 'Optional resource pack',
|
||||
}),
|
||||
'sources-jar': defineMessage({
|
||||
id: 'version.file-type.sources-jar',
|
||||
defaultMessage: 'Source jar',
|
||||
}),
|
||||
'dev-jar': defineMessage({
|
||||
id: 'version.file-type.dev-jar',
|
||||
defaultMessage: 'Dev jar',
|
||||
}),
|
||||
'javadoc-jar': defineMessage({
|
||||
id: 'version.file-type.javadoc-jar',
|
||||
defaultMessage: 'Javadoc jar',
|
||||
}),
|
||||
signature: defineMessage({
|
||||
id: 'version.file-type.signature',
|
||||
defaultMessage: 'Signature file',
|
||||
}),
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export { createAttributionGroupTitle } from '../components/external_files/external-project-utils'
|
||||
export * from './auto-icons'
|
||||
export * from './common-messages'
|
||||
export * from './events'
|
||||
|
||||
Reference in New Issue
Block a user