You've already forked AstralRinth
forked from didirus/AstralRinth
Merge commit '6387fb21c6948190b2ed2cbda0568eff379179ab' into beta
This commit is contained in:
@@ -38,6 +38,7 @@ import _CodeIcon from './icons/code.svg?component'
|
||||
import _CoffeeIcon from './icons/coffee.svg?component'
|
||||
import _CogIcon from './icons/cog.svg?component'
|
||||
import _CoinsIcon from './icons/coins.svg?component'
|
||||
import _CollapseIcon from './icons/collapse.svg?component'
|
||||
import _CollectionIcon from './icons/collection.svg?component'
|
||||
import _CompassIcon from './icons/compass.svg?component'
|
||||
import _ContractIcon from './icons/contract.svg?component'
|
||||
@@ -52,6 +53,7 @@ import _DatabaseIcon from './icons/database.svg?component'
|
||||
import _DownloadIcon from './icons/download.svg?component'
|
||||
import _DropdownIcon from './icons/dropdown.svg?component'
|
||||
import _EditIcon from './icons/edit.svg?component'
|
||||
import _EllipsisVerticalIcon from './icons/ellipsis-vertical.svg?component'
|
||||
import _ExpandIcon from './icons/expand.svg?component'
|
||||
import _ExternalIcon from './icons/external.svg?component'
|
||||
import _EyeOffIcon from './icons/eye-off.svg?component'
|
||||
@@ -229,6 +231,7 @@ export const CodeIcon = _CodeIcon
|
||||
export const CoffeeIcon = _CoffeeIcon
|
||||
export const CogIcon = _CogIcon
|
||||
export const CoinsIcon = _CoinsIcon
|
||||
export const CollapseIcon = _CollapseIcon
|
||||
export const CollectionIcon = _CollectionIcon
|
||||
export const CompassIcon = _CompassIcon
|
||||
export const ContractIcon = _ContractIcon
|
||||
@@ -243,6 +246,7 @@ export const DatabaseIcon = _DatabaseIcon
|
||||
export const DownloadIcon = _DownloadIcon
|
||||
export const DropdownIcon = _DropdownIcon
|
||||
export const EditIcon = _EditIcon
|
||||
export const EllipsisVerticalIcon = _EllipsisVerticalIcon
|
||||
export const ExpandIcon = _ExpandIcon
|
||||
export const ExternalIcon = _ExternalIcon
|
||||
export const EyeOffIcon = _EyeOffIcon
|
||||
|
||||
8
packages/assets/icons/collapse.svg
Normal file
8
packages/assets/icons/collapse.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
|
||||
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
|
||||
class="lucide lucide-minimize-icon lucide-minimize">
|
||||
<path d="M8 3v3a2 2 0 0 1-2 2H3" />
|
||||
<path d="M21 8h-3a2 2 0 0 1-2-2V3" />
|
||||
<path d="M3 16h3a2 2 0 0 1 2 2v3" />
|
||||
<path d="M16 21v-3a2 2 0 0 1 2-2h3" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 414 B |
1
packages/assets/icons/ellipsis-vertical.svg
Normal file
1
packages/assets/icons/ellipsis-vertical.svg
Normal file
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-ellipsis-vertical-icon lucide-ellipsis-vertical"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>
|
||||
|
After Width: | Height: | Size: 349 B |
3
packages/moderation/data/messages/reports/antivirus.md
Normal file
3
packages/moderation/data/messages/reports/antivirus.md
Normal file
@@ -0,0 +1,3 @@
|
||||
Unfortunately, anti-virus software has consistently been found to be an unreliable tool for Minecraft mods.
|
||||
|
||||
If you have evidence of malicious activity concerning a specific mod, or of malicious code decompiled from a mod on Modrinth, please create a new Report and provide the required details, thank you.
|
||||
@@ -0,0 +1,3 @@
|
||||
Thank you for your report.
|
||||
|
||||
This project was confirmed to be malicious after a detailed investigation. Luckily, thanks to your report and quick action from our team, we have reason to believe this did not impact a significant amount of users and we have taken precautions to prevent this malicious code from appearing on Modrinth again.
|
||||
@@ -0,0 +1,6 @@
|
||||
Unfortunately, the Moderation team is unable to assist with your issue.
|
||||
|
||||
The reporting system is exclusively for reporting issues to Moderation staff; only violations of [Modrinth's Content Rules](https://modrinth.com/legal/rules) should be reported. The members of the project you're reporting do not see that you have submitted a report.
|
||||
|
||||
If you are having issues with crashes, please check out [our FAQ section](https://support.modrinth.com/aen/articles/8792916) to learn how to diagnose and fix crashes.
|
||||
For other project-specific issues consider asking the project's own community, check for a Discord or Issues link on the project page.
|
||||
@@ -0,0 +1,5 @@
|
||||
Unfortunately, the Moderation team is unable to assist with your issue.
|
||||
|
||||
The reporting system is exclusively for reporting issues to Moderation staff; only violations of [Modrinth's Content Rules](https://modrinth.com/legal/rules) should be reported.
|
||||
|
||||
Please reach out to the [Modrinth Help Center](https://support.modrinth.com/) so we can better assist you and bring up your concerns with our platform tean,
|
||||
3
packages/moderation/data/messages/reports/spam.md
Normal file
3
packages/moderation/data/messages/reports/spam.md
Normal file
@@ -0,0 +1,3 @@
|
||||
The reporting system is exclusively for reporting issues to Modrinth staff; only violations of [Modrinth's Content Rules](https://modrinth.com/legal/rules) should be reported. The members of the project you're reporting do not see that you have submitted a report.
|
||||
|
||||
Please ensure you are using the Reports system appropriately, repeated misuse may result in account suspension.
|
||||
3
packages/moderation/data/messages/reports/stale.md
Normal file
3
packages/moderation/data/messages/reports/stale.md
Normal file
@@ -0,0 +1,3 @@
|
||||
We haven't received a response in some time, so we're closing this report thread.
|
||||
|
||||
If you have additional information to share we ask that you create a new report.
|
||||
34
packages/moderation/data/report-quick-replies.ts
Normal file
34
packages/moderation/data/report-quick-replies.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import type { ReportQuickReply } from '../types/reports'
|
||||
|
||||
export default [
|
||||
{
|
||||
label: 'Antivirus',
|
||||
message: async () => (await import('./messages/reports/antivirus.md?raw')).default,
|
||||
private: false,
|
||||
},
|
||||
{
|
||||
label: 'Spam',
|
||||
message: async () => (await import('./messages/reports/spam.md?raw')).default,
|
||||
private: false,
|
||||
},
|
||||
{
|
||||
label: 'Gameplay Issue',
|
||||
message: async () => (await import('./messages/reports/gameplay-issue.md?raw')).default,
|
||||
private: false,
|
||||
},
|
||||
{
|
||||
label: 'Platform Issue',
|
||||
message: async () => (await import('./messages/reports/platform-issue.md?raw')).default,
|
||||
private: false,
|
||||
},
|
||||
{
|
||||
label: 'Stale',
|
||||
message: async () => (await import('./messages/reports/stale.md?raw')).default,
|
||||
private: false,
|
||||
},
|
||||
{
|
||||
label: 'Confirmed Malware',
|
||||
message: async () => (await import('./messages/reports/confirmed-malware.md?raw')).default,
|
||||
private: false,
|
||||
},
|
||||
] as ReadonlyArray<ReportQuickReply>
|
||||
@@ -68,7 +68,7 @@ const versions: Stage = {
|
||||
message: async () => '',
|
||||
enablesActions: [
|
||||
{
|
||||
id: 'versions_incorrect_project_type_options',
|
||||
id: 'versions_alternate_versions_options',
|
||||
type: 'dropdown',
|
||||
label: 'How are the alternate versions distributed?',
|
||||
options: [
|
||||
|
||||
@@ -2,8 +2,10 @@ export * from './types/actions'
|
||||
export * from './types/messages'
|
||||
export * from './types/stage'
|
||||
export * from './types/keybinds'
|
||||
export * from './types/reports'
|
||||
export * from './utils'
|
||||
export { finalPermissionMessages } from './data/modpack-permissions-stage'
|
||||
|
||||
export { finalPermissionMessages } from './data/modpack-permissions-stage'
|
||||
export { default as checklist } from './data/checklist'
|
||||
export { default as keybinds } from './data/keybinds'
|
||||
export { default as reportQuickReplies } from './data/report-quick-replies'
|
||||
|
||||
28
packages/moderation/types/reports.ts
Normal file
28
packages/moderation/types/reports.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import type { Project, Report, Thread, User, Version, DelphiReport } from '@modrinth/utils'
|
||||
|
||||
export interface OwnershipTarget {
|
||||
name: string
|
||||
slug: string
|
||||
avatar_url?: string
|
||||
type: 'user' | 'organization'
|
||||
}
|
||||
|
||||
export interface ExtendedReport extends Report {
|
||||
thread: Thread
|
||||
reporter_user: User
|
||||
project?: Project
|
||||
user?: User
|
||||
version?: Version
|
||||
target?: OwnershipTarget
|
||||
}
|
||||
|
||||
export interface ExtendedDelphiReport extends DelphiReport {
|
||||
target?: OwnershipTarget
|
||||
}
|
||||
|
||||
export interface ReportQuickReply {
|
||||
label: string
|
||||
message: string | ((report: ExtendedReport) => Promise<string> | string)
|
||||
shouldShow?: (report: ExtendedReport) => boolean
|
||||
private?: boolean
|
||||
}
|
||||
97
packages/ui/src/components/base/CollapsibleRegion.vue
Normal file
97
packages/ui/src/components/base/CollapsibleRegion.vue
Normal file
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<div
|
||||
class="relative overflow-hidden rounded-xl border-[2px] border-solid border-divider shadow-lg"
|
||||
:class="{ 'max-h-32': isCollapsed }"
|
||||
>
|
||||
<div
|
||||
class="px-4 pt-4"
|
||||
:class="{
|
||||
'content-disabled pb-16': isCollapsed,
|
||||
'pb-4': !isCollapsed,
|
||||
}"
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="isCollapsed"
|
||||
class="pointer-events-none absolute inset-0 bg-gradient-to-b from-transparent to-button-bg"
|
||||
></div>
|
||||
|
||||
<div class="absolute bottom-4 left-1/2 z-20 -translate-x-1/2">
|
||||
<ButtonStyled circular type="transparent">
|
||||
<button class="flex items-center gap-1 text-xs" @click="toggleCollapsed">
|
||||
<ExpandIcon v-if="isCollapsed" />
|
||||
<CollapseIcon v-else />
|
||||
{{ isCollapsed ? expandText : collapseText }}
|
||||
</button>
|
||||
</ButtonStyled>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import ButtonStyled from './ButtonStyled.vue'
|
||||
import { ExpandIcon, CollapseIcon } from '@modrinth/assets'
|
||||
import { ref } from 'vue'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
initiallyCollapsed?: boolean
|
||||
expandText?: string
|
||||
collapseText?: string
|
||||
}>(),
|
||||
{
|
||||
initiallyCollapsed: true,
|
||||
expandText: 'Expand',
|
||||
collapseText: 'Collapse',
|
||||
},
|
||||
)
|
||||
|
||||
const isCollapsed = ref(props.initiallyCollapsed)
|
||||
|
||||
function toggleCollapsed() {
|
||||
isCollapsed.value = !isCollapsed.value
|
||||
}
|
||||
|
||||
function setCollapsed(value: boolean) {
|
||||
isCollapsed.value = value
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
isCollapsed,
|
||||
setCollapsed,
|
||||
toggleCollapsed,
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content-disabled {
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
|
||||
:deep(*) {
|
||||
pointer-events: none !important;
|
||||
user-select: none !important;
|
||||
-webkit-user-select: none !important;
|
||||
-moz-user-select: none !important;
|
||||
-ms-user-select: none !important;
|
||||
}
|
||||
|
||||
:deep(button),
|
||||
:deep(input),
|
||||
:deep(textarea),
|
||||
:deep(select),
|
||||
:deep(a),
|
||||
:deep([tabindex]) {
|
||||
tabindex: -1 !important;
|
||||
}
|
||||
|
||||
:deep(*:focus) {
|
||||
outline: none !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -163,7 +163,6 @@ const onFocus = () => {
|
||||
}
|
||||
|
||||
const onBlur = (event) => {
|
||||
console.log(event)
|
||||
if (!isChildOfDropdown(event.relatedTarget)) {
|
||||
dropdownVisible.value = false
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ export { default as Card } from './base/Card.vue'
|
||||
export { default as Checkbox } from './base/Checkbox.vue'
|
||||
export { default as Chips } from './base/Chips.vue'
|
||||
export { default as Collapsible } from './base/Collapsible.vue'
|
||||
export { default as CollapsibleRegion } from './base/CollapsibleRegion.vue'
|
||||
export { default as ContentPageHeader } from './base/ContentPageHeader.vue'
|
||||
export { default as CopyCode } from './base/CopyCode.vue'
|
||||
export { default as DoubleIcon } from './base/DoubleIcon.vue'
|
||||
|
||||
@@ -18,7 +18,7 @@ export type DonationPlatform =
|
||||
| { short: 'ko-fi'; name: 'Ko-fi' }
|
||||
| { short: 'other'; name: 'Other' }
|
||||
|
||||
export type ProjectType = 'mod' | 'modpack' | 'resourcepack' | 'shader'
|
||||
export type ProjectType = 'mod' | 'modpack' | 'resourcepack' | 'shader' | 'plugin' | 'datapack'
|
||||
export type MonetizationStatus = 'monetized' | 'demonetized' | 'force-demonetized'
|
||||
|
||||
export type GameVersion = string
|
||||
@@ -65,7 +65,8 @@ export interface Project {
|
||||
client_side: Environment
|
||||
server_side: Environment
|
||||
|
||||
team: ModrinthId
|
||||
team?: ModrinthId
|
||||
team_id: ModrinthId
|
||||
thread_id: ModrinthId
|
||||
organization: ModrinthId
|
||||
|
||||
@@ -76,6 +77,7 @@ export interface Project {
|
||||
donation_urls: DonationLink<DonationPlatform>[]
|
||||
|
||||
published: string
|
||||
created?: string
|
||||
updated: string
|
||||
approved: string
|
||||
queued: string
|
||||
@@ -295,6 +297,60 @@ export type Report = {
|
||||
body: string
|
||||
}
|
||||
|
||||
// Threads
|
||||
export interface Thread {
|
||||
id: string
|
||||
type: ThreadType
|
||||
project_id: string | null
|
||||
report_id: string | null
|
||||
messages: ThreadMessage[]
|
||||
members: User[]
|
||||
}
|
||||
|
||||
export type ThreadType = 'project' | 'report' | 'direct_message'
|
||||
|
||||
export interface ThreadMessage {
|
||||
id: string | null
|
||||
author_id: string | null
|
||||
body: MessageBody
|
||||
created: string
|
||||
hide_identity: boolean
|
||||
}
|
||||
|
||||
export type MessageBody =
|
||||
| TextMessageBody
|
||||
| StatusChangeMessageBody
|
||||
| ThreadClosureMessageBody
|
||||
| ThreadReopenMessageBody
|
||||
| DeletedMessageBody
|
||||
|
||||
export interface TextMessageBody {
|
||||
type: 'text'
|
||||
body: string
|
||||
private: boolean
|
||||
replying_to: string | null
|
||||
associated_images: string[]
|
||||
}
|
||||
|
||||
export interface StatusChangeMessageBody {
|
||||
type: 'status_change'
|
||||
new_status: ProjectStatus
|
||||
old_status: ProjectStatus
|
||||
}
|
||||
|
||||
export interface ThreadClosureMessageBody {
|
||||
type: 'thread_closure'
|
||||
}
|
||||
|
||||
export interface ThreadReopenMessageBody {
|
||||
type: 'thread_reopen'
|
||||
}
|
||||
|
||||
export interface DeletedMessageBody {
|
||||
type: 'deleted'
|
||||
private: boolean
|
||||
}
|
||||
|
||||
// Moderation
|
||||
export interface ModerationModpackPermissionApprovalType {
|
||||
id:
|
||||
@@ -379,3 +435,38 @@ export interface ModerationJudgement {
|
||||
export interface ModerationJudgements {
|
||||
[sha1: string]: ModerationJudgement
|
||||
}
|
||||
|
||||
// Delphi
|
||||
export interface DelphiReport {
|
||||
id: string
|
||||
project: Project
|
||||
version: Version
|
||||
priority_score: number
|
||||
detected_at: string
|
||||
trace_type:
|
||||
| 'reflection_indirection'
|
||||
| 'xor_obfuscation'
|
||||
| 'included_libraries'
|
||||
| 'suspicious_binaries'
|
||||
| 'corrupt_classes'
|
||||
| 'suspicious_classes'
|
||||
| 'url_usage'
|
||||
| 'classloader_usage'
|
||||
| 'processbuilder_usage'
|
||||
| 'runtime_exec_usage'
|
||||
| 'jni_usage'
|
||||
| 'main_method'
|
||||
| 'native_loading'
|
||||
| 'malformed_jar'
|
||||
| 'nested_jar_too_deep'
|
||||
| 'failed_decompilation'
|
||||
| 'analysis_failure'
|
||||
| 'malware_easyforme'
|
||||
| 'malware_simplyloader'
|
||||
file_path: string
|
||||
// pending = not reviewed yet.
|
||||
// approved = approved as malicious, removed from modrinth
|
||||
// rejected = not approved as malicious, remains on modrinth?
|
||||
status: 'pending' | 'approved' | 'rejected'
|
||||
content?: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user