From 39f2b0ecb6194db8ab248af039447191c3db97ea Mon Sep 17 00:00:00 2001 From: aecsocket Date: Sat, 20 Dec 2025 11:43:04 +0000 Subject: [PATCH] Technical review queue (#4775) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: fix typo in status message * feat(labrinth): overhaul malware scanner report storage and routes * chore: address some review comments * feat: add Delphi to Docker Compose `with-delphi` profile * chore: fix unused import Clippy lint * feat(labrinth/delphi): use PAT token authorization with project read scopes * chore: expose file IDs in version queries * fix: accept null decompiled source payloads from Delphi * tweak(labrinth): expose base62 file IDs more consistently for Delphi * feat(labrinth/delphi): support new Delphi report severity field * chore(labrinth): run `cargo sqlx prepare` to fix Docker build errors * tweak: add route for fetching Delphi issue type schema, abstract Labrinth away from issue types * chore: run `cargo sqlx prepare` * chore: fix typo on frontend generated state file message * feat: update to use new Delphi issue schema * wip: tech review endpoints * wip: add ToSchema for dependent types * wip: report issues return * wip * wip: returning more data * wip * Fix up db query * Delphi configuration to talk to Labrinth * Get Delphi working with Labrinth * Add Delphi dummy fixture * Better Delphi logging * Improve utoipa for tech review routes * Add more sorting options for tech review queue * Oops join * New routes for fetching issues and reports * Fix which kind of ID is returned in tech review endpoints * Deduplicate tech review report rows * Reduce info sent for projects * Fetch more thread info * Address PR comments * fix ci * fix postgres version mismatch * fix version creation * Implement routes * fix up tech review * Allow adding a moderation comment to Delphi rejections * fix up rebase * exclude rejected projects from tech review * add status change msg to tech review thread * cargo sqlx prepare * also ignore withheld projects * More filtering on issue search * wip: report routes * Fix up for build * cargo sqlx prepare * fix thread message privacy * New tech review search route * submit route * details have statuses now * add default to drid status * dedup issue details * fix sqlx query on empty files * fixes * Dedupe issue detail statuses and message on entering tech rev * Fix qa issues * Fix qa issues * fix review comments * typos * fix ci * feat: tech review frontend (#4781) * chore: fix typo in status message * feat(labrinth): overhaul malware scanner report storage and routes * chore: address some review comments * feat: add Delphi to Docker Compose `with-delphi` profile * chore: fix unused import Clippy lint * feat(labrinth/delphi): use PAT token authorization with project read scopes * chore: expose file IDs in version queries * fix: accept null decompiled source payloads from Delphi * tweak(labrinth): expose base62 file IDs more consistently for Delphi * feat(labrinth/delphi): support new Delphi report severity field * chore(labrinth): run `cargo sqlx prepare` to fix Docker build errors * tweak: add route for fetching Delphi issue type schema, abstract Labrinth away from issue types * chore: run `cargo sqlx prepare` * chore: fix typo on frontend generated state file message * feat: update to use new Delphi issue schema * wip: tech review endpoints * wip: add ToSchema for dependent types * wip: report issues return * wip * wip: returning more data * wip * Fix up db query * Delphi configuration to talk to Labrinth * Get Delphi working with Labrinth * Add Delphi dummy fixture * Better Delphi logging * Improve utoipa for tech review routes * Add more sorting options for tech review queue * Oops join * New routes for fetching issues and reports * Fix which kind of ID is returned in tech review endpoints * Deduplicate tech review report rows * Reduce info sent for projects * Fetch more thread info * Address PR comments * fix ci * fix ci * fix postgres version mismatch * fix version creation * Implement routes * feat: batch scan alert * feat: layout * feat: introduce surface variables * fix: theme selector * feat: rough draft of tech review card * feat: tab switcher * feat: batch scan btn * feat: api-client module for tech review * draft: impl * feat: auto icons * fix: layout issues * feat: fixes to code blocks + flag labels * feat: temp remove mock data * fix: search sort types * fix: intl & lint * chore: re-enable mock data * fix: flag badges + auto open first issue in file tab * feat: update for new routes * fix: more qa issues * feat: lazy load sources * fix: re-enable auth middleware * feat: impl threads * fix: lint & severity * feat: download btn + switch to using NavTabs with new local mode option * feat: re-add toplevel btns * feat: reports page consistency * fix: consistency on project queue * fix: icons + sizing * fix: colors and gaps * fix: impl endpoints * feat: load all flags on file tab * feat: thread generics changes * feat: more qa * feat: fix collapse * fix: qa * feat: msg modal * fix: ISO import * feat: qa fixes * fix: empty state basic * fix: collapsible region * fix: collapse thread by default * feat: rough draft of new process/flow * fix labrinth build * fix thread message privacy * New tech review search route * feat: qa fixes * feat: QA changes * fix: verdict on detail not whole issue * fix: lint + intl * fix: lint * fix: thread message for tech rev verdict * feat: use anim frames * fix: exports + typecheck * polish: qa changes * feat: qa * feat: qa polish * feat: fix malic modal * fix: lint * fix: qa + lint * fix: pagination * fix: lint * fix: qa * intl extract * fix ci --------- Signed-off-by: Calum H. Co-authored-by: Alejandro González Co-authored-by: aecsocket --------- Signed-off-by: Calum H. Co-authored-by: Alejandro González Co-authored-by: Calum H. --- CLAUDE.md | 2 +- Cargo.lock | 1 + apps/frontend/nuxt.config.ts | 2 +- apps/frontend/src/components/ui/NavTabs.vue | 169 ++- .../withdraw-stages/MuralpayDetailsStage.vue | 8 +- .../ui/moderation/BatchScanProgressAlert.vue | 39 + .../ui/moderation/MaliciousSummaryModal.vue | 168 +++ .../moderation/ModerationDelphiReportCard.vue | 182 --- .../ui/moderation/ModerationQueueCard.vue | 286 +++-- .../ui/moderation/ModerationReportCard.vue | 416 +++--- .../ui/moderation/ModerationTechRevCard.vue | 1138 +++++++++++++++++ .../src/components/ui/servers/FileItem.vue | 48 +- .../ui/servers/icons/LoaderIcon.vue | 236 +--- .../ui/thread/ConversationThread.vue | 24 + .../src/components/ui/thread/ReportThread.vue | 286 ----- .../components/ui/thread/ThreadMessage.vue | 49 +- .../src/components/ui/thread/ThreadView.vue | 227 ++++ apps/frontend/src/layouts/default.vue | 17 +- apps/frontend/src/locales/en-US/index.json | 10 +- apps/frontend/src/pages/moderation.vue | 11 +- apps/frontend/src/pages/moderation/index.vue | 82 +- .../src/pages/moderation/reports/index.vue | 68 +- .../moderation/technical-review-mockup.vue | 387 ------ .../src/pages/moderation/technical-review.vue | 571 ++++++++- .../src/pages/settings/billing/index.vue | 8 +- .../src/providers/creator-withdraw.ts | 2 +- apps/frontend/src/utils/finance-icons.ts | 34 - apps/labrinth/.env.docker-compose | 2 +- ...f9530c311eef084abb6fce35de5f37d79bcea.json | 34 + ...ebe1d03998be169a306b63a0ca1beaa07397f.json | 28 + ...c71674941487c15be1e8ce0ebc78e7c26b34d.json | 15 + ...90683636bbde53a51ee61fa18ef49cea8c3a.json} | 7 +- ...19ef7bcbb341c7ffea3d13acd250bb20e6d07.json | 29 + ...d3aaeb30a8da4721959fdee99cf649a8b29e3.json | 49 + ...1fe1472402338e0f0bb323b6147d2a0cc4eca.json | 22 + ...7a2eb115dc88da24735fffeca3eb1c269ad53.json | 22 + ...d07b7d42c37e089403961ee16be0f99958ea0.json | 15 + ...42917689c31af7dd9a6baea4dbde99dc1a08e.json | 37 + ...66b6696052ac6d5ebe131b9e7242104f700af.json | 22 + ...45c1fa3af3a899b232482aab9cc44b9336063.json | 14 + ...c9e2bd27ac9a87987eafd79b06f1c4ecdb659.json | 26 + ...8efd9e422151b683d9897a071ee0c4bac1cd4.json | 39 + ...adf1de8aaf214b32a2aab299a0d87fd2dc453.json | 14 + ...061d930ff06a8a928ff1cea6a723bb37c1b75.json | 28 + ...a95f2732f1a7611ea6f7ce49cd7e077761ebf.json | 26 + ...350233d40ad81ac2d16481a0e9b32424a999d.json | 24 + ...de1e7cddd68ac956143bef994104280a8dc07.json | 37 + ...ea29fa063b416c18dc857132127db95ff17f3.json | 22 + ...5d818fde0499d8e5a08e9e22bee42014877f3.json | 20 + .../fixtures/delphi-report-2025-11-15.sql | 90 ++ .../20250810155316_delphi-reports.sql | 47 + .../20251130173416_delphi_report_verdicts.sql | 2 + .../20251213141500_delphi_report_fixes.sql | 8 + ...47_delphi_dedupe_issue_detail_statuses.sql | 26 + apps/labrinth/src/auth/mod.rs | 10 +- .../src/database/models/delphi_report_item.rs | 266 ++++ apps/labrinth/src/database/models/ids.rs | 34 +- apps/labrinth/src/database/models/mod.rs | 1 + .../src/database/models/thread_item.rs | 4 +- .../src/database/models/version_item.rs | 12 + apps/labrinth/src/file_hosting/mock.rs | 4 +- apps/labrinth/src/main.rs | 17 +- apps/labrinth/src/models/v2/threads.rs | 26 + apps/labrinth/src/models/v3/projects.rs | 7 +- apps/labrinth/src/models/v3/threads.rs | 41 +- apps/labrinth/src/models/v3/users.rs | 27 +- apps/labrinth/src/routes/internal/admin.rs | 103 +- apps/labrinth/src/routes/internal/delphi.rs | 423 ++++++ apps/labrinth/src/routes/internal/mod.rs | 4 +- .../{moderation.rs => moderation/mod.rs} | 103 +- .../routes/internal/moderation/ownership.rs | 84 ++ .../routes/internal/moderation/tech_review.rs | 894 +++++++++++++ apps/labrinth/src/routes/mod.rs | 23 + .../src/routes/v3/project_creation.rs | 4 - apps/labrinth/src/routes/v3/threads.rs | 65 +- .../src/routes/v3/version_creation.rs | 41 +- packages/api-client/src/modules/index.ts | 2 + .../api-client/src/modules/labrinth/index.ts | 1 + .../modules/labrinth/tech-review/internal.ts | 124 ++ .../api-client/src/modules/labrinth/types.ts | 187 ++- packages/assets/generated-icons.ts | 16 + packages/assets/icons/bug.svg | 14 + packages/assets/icons/chevron-down.svg | 4 + packages/assets/icons/file-code.svg | 8 + packages/assets/icons/file-image.svg | 9 + packages/assets/icons/folder.svg | 5 + packages/assets/icons/list-filter.svg | 6 + packages/assets/icons/shield-alert.svg | 18 + packages/assets/icons/shield-check.svg | 7 + packages/moderation/package.json | 1 + .../src/data/report-quick-replies.ts | 5 +- .../src/data/tech-review-quick-replies.ts | 11 + packages/moderation/src/index.ts | 5 + packages/moderation/src/types/quick-reply.ts | 6 + packages/moderation/src/types/reports.ts | 13 +- .../ui/src/components/base/Admonition.vue | 13 +- packages/ui/src/components/base/Badge.vue | 20 + .../src/components/base/CollapsibleRegion.vue | 104 +- packages/ui/src/components/base/Combobox.vue | 41 +- packages/ui/src/components/base/index.ts | 1 + .../billing/FormattedPaymentMethod.vue | 8 +- .../ui/src/components/nav/PagewideBanner.vue | 9 +- .../components/project/ProjectStatusBadge.vue | 27 +- packages/ui/src/locales/en-US/index.json | 6 + packages/ui/src/utils/auto-icons.ts | 201 +++ packages/ui/src/utils/index.ts | 1 + packages/utils/highlightjs/index.ts | 33 + packages/utils/utils.ts | 20 +- pnpm-lock.yaml | 3 + 109 files changed, 6281 insertions(+), 2017 deletions(-) create mode 100644 apps/frontend/src/components/ui/moderation/BatchScanProgressAlert.vue create mode 100644 apps/frontend/src/components/ui/moderation/MaliciousSummaryModal.vue delete mode 100644 apps/frontend/src/components/ui/moderation/ModerationDelphiReportCard.vue create mode 100644 apps/frontend/src/components/ui/moderation/ModerationTechRevCard.vue delete mode 100644 apps/frontend/src/components/ui/thread/ReportThread.vue create mode 100644 apps/frontend/src/components/ui/thread/ThreadView.vue delete mode 100644 apps/frontend/src/pages/moderation/technical-review-mockup.vue delete mode 100644 apps/frontend/src/utils/finance-icons.ts create mode 100644 apps/labrinth/.sqlx/query-0ed2e6e3149352d12a673fddc50f9530c311eef084abb6fce35de5f37d79bcea.json create mode 100644 apps/labrinth/.sqlx/query-2d9e36c76a1e214c53d9dc2aa3debe1d03998be169a306b63a0ca1beaa07397f.json create mode 100644 apps/labrinth/.sqlx/query-3240e4b5abc9850b5d3c09fafcac71674941487c15be1e8ce0ebc78e7c26b34d.json rename apps/labrinth/.sqlx/{query-ccb0315ff52ea4402f53508334a7288fc9f8e77ffd7bce665441ff682384cbf9.json => query-33f26ce7e262d7c5707d05fe926390683636bbde53a51ee61fa18ef49cea8c3a.json} (50%) create mode 100644 apps/labrinth/.sqlx/query-3473715e4ff6efb6707f73e8ddf19ef7bcbb341c7ffea3d13acd250bb20e6d07.json create mode 100644 apps/labrinth/.sqlx/query-3961aa17ce3219c057c398dca0ed3aaeb30a8da4721959fdee99cf649a8b29e3.json create mode 100644 apps/labrinth/.sqlx/query-3e2804a3443239104b2d8b095941fe1472402338e0f0bb323b6147d2a0cc4eca.json create mode 100644 apps/labrinth/.sqlx/query-52ef6d02f8d533fc4e4ceb141d07a2eb115dc88da24735fffeca3eb1c269ad53.json create mode 100644 apps/labrinth/.sqlx/query-6cf1862b3c197d42f9183dcbbd3d07b7d42c37e089403961ee16be0f99958ea0.json create mode 100644 apps/labrinth/.sqlx/query-6f5ec5cee9fc0007d11b4707b4442917689c31af7dd9a6baea4dbde99dc1a08e.json create mode 100644 apps/labrinth/.sqlx/query-7d1f49699e242f3e002afee9bf466b6696052ac6d5ebe131b9e7242104f700af.json create mode 100644 apps/labrinth/.sqlx/query-9ab1f07c2968b5d445752c1480345c1fa3af3a899b232482aab9cc44b9336063.json create mode 100644 apps/labrinth/.sqlx/query-b1df83f4592701f8aa03f6d16bac9e2bd27ac9a87987eafd79b06f1c4ecdb659.json create mode 100644 apps/labrinth/.sqlx/query-b65094517546487e43b65a76aa38efd9e422151b683d9897a071ee0c4bac1cd4.json create mode 100644 apps/labrinth/.sqlx/query-c7c72cf1f98cbc2b647ab840bdfadf1de8aaf214b32a2aab299a0d87fd2dc453.json create mode 100644 apps/labrinth/.sqlx/query-cd630ba950611b387fb5b04999a061d930ff06a8a928ff1cea6a723bb37c1b75.json create mode 100644 apps/labrinth/.sqlx/query-cfe6c9e2abba8e9c1cd7aa799a6a95f2732f1a7611ea6f7ce49cd7e077761ebf.json create mode 100644 apps/labrinth/.sqlx/query-d30290c1b55d9fb0939d122a96f350233d40ad81ac2d16481a0e9b32424a999d.json create mode 100644 apps/labrinth/.sqlx/query-f2054ae7dcc89b21ed6b2f04526de1e7cddd68ac956143bef994104280a8dc07.json create mode 100644 apps/labrinth/.sqlx/query-f6432d7a3c67e058c0e9da42f23ea29fa063b416c18dc857132127db95ff17f3.json create mode 100644 apps/labrinth/.sqlx/query-fe571872262fe7d119b4b6eb1e55d818fde0499d8e5a08e9e22bee42014877f3.json create mode 100644 apps/labrinth/fixtures/delphi-report-2025-11-15.sql create mode 100644 apps/labrinth/migrations/20250810155316_delphi-reports.sql create mode 100644 apps/labrinth/migrations/20251130173416_delphi_report_verdicts.sql create mode 100644 apps/labrinth/migrations/20251213141500_delphi_report_fixes.sql create mode 100644 apps/labrinth/migrations/20251217234047_delphi_dedupe_issue_detail_statuses.sql create mode 100644 apps/labrinth/src/database/models/delphi_report_item.rs create mode 100644 apps/labrinth/src/routes/internal/delphi.rs rename apps/labrinth/src/routes/internal/{moderation.rs => moderation/mod.rs} (80%) create mode 100644 apps/labrinth/src/routes/internal/moderation/ownership.rs create mode 100644 apps/labrinth/src/routes/internal/moderation/tech_review.rs create mode 100644 packages/api-client/src/modules/labrinth/tech-review/internal.ts create mode 100644 packages/assets/icons/bug.svg create mode 100644 packages/assets/icons/chevron-down.svg create mode 100644 packages/assets/icons/file-code.svg create mode 100644 packages/assets/icons/file-image.svg create mode 100644 packages/assets/icons/folder.svg create mode 100644 packages/assets/icons/list-filter.svg create mode 100644 packages/assets/icons/shield-alert.svg create mode 100644 packages/assets/icons/shield-check.svg create mode 100644 packages/moderation/src/data/tech-review-quick-replies.ts create mode 100644 packages/moderation/src/types/quick-reply.ts create mode 100644 packages/ui/src/utils/auto-icons.ts diff --git a/CLAUDE.md b/CLAUDE.md index 2f6a2269..0ab19bc5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -56,7 +56,7 @@ Use `docker exec labrinth-clickhouse clickhouse-client` to access the Clickhouse ### Postgres -Use `docker exec labrinth-postgres psql -U postgres` to access the PostgreSQL instance. +Use `docker exec labrinth-postgres psql -U labrinth -d labrinth -c "SELECT 1"` to access the PostgreSQL instance, replacing the `SELECT 1` with your query. # Guidelines diff --git a/Cargo.lock b/Cargo.lock index 92cc9f38..56731707 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10349,6 +10349,7 @@ dependencies = [ "quote", "regex", "syn 2.0.106", + "url", "uuid 1.18.1", ] diff --git a/apps/frontend/nuxt.config.ts b/apps/frontend/nuxt.config.ts index 165f4d7c..0068aec3 100644 --- a/apps/frontend/nuxt.config.ts +++ b/apps/frontend/nuxt.config.ts @@ -154,7 +154,7 @@ export default defineNuxtConfig({ (state.errors ?? []).length === 0 ) { console.log( - 'Tags already recently generated. Delete apps/frontend/generated/state.json to force regeneration.', + 'Tags already recently generated. Delete apps/frontend/src/generated/state.json to force regeneration.', ) return } diff --git a/apps/frontend/src/components/ui/NavTabs.vue b/apps/frontend/src/components/ui/NavTabs.vue index 5a2c0b78..a84e186a 100644 --- a/apps/frontend/src/components/ui/NavTabs.vue +++ b/apps/frontend/src/components/ui/NavTabs.vue @@ -1,23 +1,58 @@ diff --git a/apps/frontend/src/components/ui/dashboard/withdraw-stages/MuralpayDetailsStage.vue b/apps/frontend/src/components/ui/dashboard/withdraw-stages/MuralpayDetailsStage.vue index 2249cf6a..b7447ee4 100644 --- a/apps/frontend/src/components/ui/dashboard/withdraw-stages/MuralpayDetailsStage.vue +++ b/apps/frontend/src/components/ui/dashboard/withdraw-stages/MuralpayDetailsStage.vue @@ -207,6 +207,8 @@ import { financialMessages, formFieldLabels, formFieldPlaceholders, + getBlockchainColor, + getBlockchainIcon, normalizeChildren, } from '@modrinth/ui' import { defineMessages, useVIntl } from '@vintl/vintl' @@ -218,12 +220,6 @@ import RevenueInputField from '@/components/ui/dashboard/RevenueInputField.vue' import WithdrawFeeBreakdown from '@/components/ui/dashboard/WithdrawFeeBreakdown.vue' import { useGeneratedState } from '@/composables/generated' import { useWithdrawContext } from '@/providers/creator-withdraw.ts' -import { - getBlockchainColor, - getBlockchainIcon, - getCurrencyColor, - getCurrencyIcon, -} from '@/utils/finance-icons.ts' import { getRailConfig } from '@/utils/muralpay-rails' const { withdrawData, maxWithdrawAmount, availableMethods, calculateFees } = useWithdrawContext() diff --git a/apps/frontend/src/components/ui/moderation/BatchScanProgressAlert.vue b/apps/frontend/src/components/ui/moderation/BatchScanProgressAlert.vue new file mode 100644 index 00000000..a0cc6936 --- /dev/null +++ b/apps/frontend/src/components/ui/moderation/BatchScanProgressAlert.vue @@ -0,0 +1,39 @@ + + + diff --git a/apps/frontend/src/components/ui/moderation/MaliciousSummaryModal.vue b/apps/frontend/src/components/ui/moderation/MaliciousSummaryModal.vue new file mode 100644 index 00000000..f5b1fea8 --- /dev/null +++ b/apps/frontend/src/components/ui/moderation/MaliciousSummaryModal.vue @@ -0,0 +1,168 @@ + + + diff --git a/apps/frontend/src/components/ui/moderation/ModerationDelphiReportCard.vue b/apps/frontend/src/components/ui/moderation/ModerationDelphiReportCard.vue deleted file mode 100644 index d374418e..00000000 --- a/apps/frontend/src/components/ui/moderation/ModerationDelphiReportCard.vue +++ /dev/null @@ -1,182 +0,0 @@ - - - - - diff --git a/apps/frontend/src/components/ui/moderation/ModerationQueueCard.vue b/apps/frontend/src/components/ui/moderation/ModerationQueueCard.vue index f60740c9..3d34ba13 100644 --- a/apps/frontend/src/components/ui/moderation/ModerationQueueCard.vue +++ b/apps/frontend/src/components/ui/moderation/ModerationQueueCard.vue @@ -1,143 +1,127 @@ diff --git a/apps/frontend/src/components/ui/moderation/ModerationReportCard.vue b/apps/frontend/src/components/ui/moderation/ModerationReportCard.vue index 895099a7..3b81942c 100644 --- a/apps/frontend/src/components/ui/moderation/ModerationReportCard.vue +++ b/apps/frontend/src/components/ui/moderation/ModerationReportCard.vue @@ -1,176 +1,287 @@ - - diff --git a/apps/frontend/src/components/ui/moderation/ModerationTechRevCard.vue b/apps/frontend/src/components/ui/moderation/ModerationTechRevCard.vue new file mode 100644 index 00000000..4d9b12f2 --- /dev/null +++ b/apps/frontend/src/components/ui/moderation/ModerationTechRevCard.vue @@ -0,0 +1,1138 @@ + + + + + diff --git a/apps/frontend/src/components/ui/servers/FileItem.vue b/apps/frontend/src/components/ui/servers/FileItem.vue index ac4c4265..ae4b2cea 100644 --- a/apps/frontend/src/components/ui/servers/FileItem.vue +++ b/apps/frontend/src/components/ui/servers/FileItem.vue @@ -68,26 +68,18 @@ import { DownloadIcon, EditIcon, - FileArchiveIcon, - FileIcon, FolderOpenIcon, MoreHorizontalIcon, PackageOpenIcon, RightArrowIcon, TrashIcon, } from '@modrinth/assets' -import { ButtonStyled } from '@modrinth/ui' +import { ButtonStyled, getFileExtensionIcon } from '@modrinth/ui' import { computed, ref, shallowRef } from 'vue' import { renderToString } from 'vue/server-renderer' import { useRoute, useRouter } from 'vue-router' -import { - UiServersIconsCodeFileIcon, - UiServersIconsCogFolderIcon, - UiServersIconsEarthIcon, - UiServersIconsImageFileIcon, - UiServersIconsTextFileIcon, -} from '#components' +import { UiServersIconsCogFolderIcon, UiServersIconsEarthIcon } from '#components' import PaletteIcon from '~/assets/icons/palette.svg?component' import TeleportOverflowMenu from './TeleportOverflowMenu.vue' @@ -116,36 +108,7 @@ const emit = defineEmits<{ const isDragOver = ref(false) const isDragging = ref(false) -const codeExtensions = Object.freeze([ - 'json', - 'json5', - 'jsonc', - 'java', - 'kt', - 'kts', - 'sh', - 'bat', - 'ps1', - 'yml', - 'yaml', - 'toml', - 'js', - 'ts', - 'py', - 'rb', - 'php', - 'html', - 'css', - 'cpp', - 'c', - 'h', - 'rs', - 'go', -]) - const textExtensions = Object.freeze(['txt', 'md', 'log', 'cfg', 'conf', 'properties', 'ini', 'sk']) -const imageExtensions = Object.freeze(['png', 'jpg', 'jpeg', 'gif', 'svg', 'webp']) -const supportedArchiveExtensions = Object.freeze(['zip']) const units = Object.freeze(['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB']) const route = shallowRef(useRoute()) @@ -199,12 +162,7 @@ const iconComponent = computed(() => { return FolderOpenIcon } - const ext = fileExtension.value - if (codeExtensions.includes(ext)) return UiServersIconsCodeFileIcon - if (textExtensions.includes(ext)) return UiServersIconsTextFileIcon - if (imageExtensions.includes(ext)) return UiServersIconsImageFileIcon - if (supportedArchiveExtensions.includes(ext)) return FileArchiveIcon - return FileIcon + return getFileExtensionIcon(fileExtension.value) }) const subText = computed(() => { diff --git a/apps/frontend/src/components/ui/servers/icons/LoaderIcon.vue b/apps/frontend/src/components/ui/servers/icons/LoaderIcon.vue index 02d0ae05..4bd494e4 100644 --- a/apps/frontend/src/components/ui/servers/icons/LoaderIcon.vue +++ b/apps/frontend/src/components/ui/servers/icons/LoaderIcon.vue @@ -1,232 +1,22 @@ diff --git a/apps/frontend/src/components/ui/thread/ConversationThread.vue b/apps/frontend/src/components/ui/thread/ConversationThread.vue index 8fb39045..b288daf7 100644 --- a/apps/frontend/src/components/ui/thread/ConversationThread.vue +++ b/apps/frontend/src/components/ui/thread/ConversationThread.vue @@ -217,6 +217,14 @@ hoverFilled: true, disabled: project.status === 'withheld', }, + { + id: 'send-to-review-reply', + action: () => { + sendReply('processing', true) + }, + hoverFilled: true, + disabled: project.status === 'processing', + }, ] : [ { @@ -228,6 +236,14 @@ hoverFilled: true, disabled: project.status === 'withheld', }, + { + id: 'send-to-review', + action: () => { + setStatus('processing') + }, + hoverFilled: true, + disabled: project.status === 'processing', + }, ] " > @@ -240,6 +256,14 @@