This commit is contained in:
coolbot100s 2025-08-05 12:48:52 -07:00
parent 29e4c6d18a
commit de11629402
2 changed files with 29 additions and 18 deletions

View File

@ -174,7 +174,12 @@
<script setup> <script setup>
import { DropdownSelect } from "@modrinth/ui"; import { DropdownSelect } from "@modrinth/ui";
import { SaveIcon, TriangleAlertIcon } from "@modrinth/assets"; import { SaveIcon, TriangleAlertIcon } from "@modrinth/assets";
import { isCommonUrl, isDiscordUrl, isLinkShortener, commonLinkDomains } from "@modrinth/moderation"; import {
isCommonUrl,
isDiscordUrl,
isLinkShortener,
commonLinkDomains,
} from "@modrinth/moderation";
const tags = useTags(); const tags = useTags();
@ -220,29 +225,29 @@ const isDiscordUrlCommon = computed(() => {
}); });
const isIssuesDiscordUrl = computed(() => { const isIssuesDiscordUrl = computed(() => {
return isDiscordUrl(issuesUrl.value) return isDiscordUrl(issuesUrl.value);
}) });
const isSourceDiscordUrl = computed(() => { const isSourceDiscordUrl = computed(() => {
return isDiscordUrl(sourceUrl.value) return isDiscordUrl(sourceUrl.value);
}) });
const isWikiDiscordUrl = computed(() => { const isWikiDiscordUrl = computed(() => {
return isDiscordUrl(wikiUrl.value) return isDiscordUrl(wikiUrl.value);
}) });
const isIssuesLinkShortner = computed(() => { const isIssuesLinkShortner = computed(() => {
return isLinkShortener(issuesUrl.value) return isLinkShortener(issuesUrl.value);
}) });
const isSourceLinkShortener = computed(() => { const isSourceLinkShortener = computed(() => {
return isLinkShortener(sourceUrl.value) return isLinkShortener(sourceUrl.value);
}) });
const isWikiLinkShortener = computed(() => { const isWikiLinkShortener = computed(() => {
return isLinkShortener(wikiUrl.value) return isLinkShortener(wikiUrl.value);
}) });
const isDiscordLinkShortener = computed(() => { const isDiscordLinkShortener = computed(() => {
return isLinkShortener(discordUrl.value) return isLinkShortener(discordUrl.value);
}) });
const rawDonationLinks = JSON.parse(JSON.stringify(props.project.donation_urls)); const rawDonationLinks = JSON.parse(JSON.stringify(props.project.donation_urls));
rawDonationLinks.push({ rawDonationLinks.push({

View File

@ -217,12 +217,18 @@ const multipleResolutionTagsWarning = computed(() => {
if (props.project.project_type !== "resourcepack") return null; if (props.project.project_type !== "resourcepack") return null;
const resolutionTags = selectedTags.value.filter((tag) => const resolutionTags = selectedTags.value.filter((tag) =>
['8x-', '16x', '32x', '48x', '64x', '128x', '256x', '512x+'].includes(tag.name), ["8x-", "16x", "32x", "48x", "64x", "128x", "256x", "512x+"].includes(tag.name),
); );
if (resolutionTags.length > 1) { if (resolutionTags.length > 1) {
return `You've selected ${resolutionTags.length} resolution tags (${resolutionTags.map((t) => t.name).join(", ").replace('8x-', '8x or lower') return `You've selected ${resolutionTags.length} resolution tags (${resolutionTags
.replace('512x+', '512x or higher')}). Resource packs should typically only have one resolution tag.`; .map((t) => t.name)
.join(", ")
.replace("8x-", "8x or lower")
.replace(
"512x+",
"512x or higher",
)}). Resource packs should typically only have one resolution tag.`;
} }
return null; return null;
}); });