PageSourceSearch

https://modrinth.com/_nuxt/D6JmiSeK.js

js modrinth.com collected 2026-10-01 10:38:30 UTC 3,482 bytes, 1 lines download raw bytes

1import{d as z,aU as b,u as k,aB as L,b2 as V,c as i,w as B,o as d,m as S,k as e,Y as A,n as g,b as y,a as _,q as s,j as c,v as n,H as M,fF as P,F as j,p as D,aE as N,U as O}from"./DUququmF.js";import{A as F}from"./CQXioT8-.js";const R={class:"flex w-full flex-col gap-4"},q={class:"w-min"},Y={class:"w-min"},U=z({__name:"CreateLimitAlert",props:N({type:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(h){const u=b(),{formatMessage:t}=k(),a=O({limitReached:{id:"create.limit-alert.limit-reached",defaultMessage:"{type} limit reached"},approachingLimit:{id:"create.limit-alert.approaching-limit",defaultMessage:"Approaching {type} limit ({current}/{max})"},limitReachedDescription:{id:"create.limit-alert.limit-reached-description",defaultMessage:"You've reached your {type} limit of {max}. Please contact support to increase your limit."},approachingLimitDescription:{id:"create.limit-alert.approaching-limit-description",defaultMessage:"You're about to hit the {type} limit, please contact support if you need more than {max} {typePlural}."},contactSupport:{id:"create.limit-alert.contact-support",defaultMessage:"Contact support"},typeProject:{id:"create.limit-alert.type-project",defaultMessage:"project"},typeOrganization:{id:"create.limit-alert.type-organization",defaultMessage:"organization"},typeCollection:{id:"create.limit-alert.type-collection",defaultMessage:"collection"},typePluralProject:{id:"create.limit-alert.type-plural-project",defaultMessage:"projects"},typePluralOrganization:{id:"create.limit-alert.type-plural-organization",defaultMessage:"organizations"},typePluralCollection:{id:"create.limit-alert.type-plural-collection",defaultMessage:"collections"}}),p=h,x=L(h,"modelValue"),{data:v}=V({queryKey:i(()=>["limits",p.type]),queryFn:()=>{switch(p.type){case"org":return u.labrinth.limits_v3.getOrganizationLimits();case"collection":return u.labrinth.limits_v3.getCollectionLimits();default:return u.labrinth.limits_v3.getProjectLimits()}}}),r=i(()=>{switch(p.type){case"project":return{singular:t(a.typeProject),plural:t(a.typePluralProject)};case"org":return{singular:t(a.typeOrganization),plural:t(a.typePluralOrganization)};case"collection":return{singular:t(a.typeCollection),plural:t(a.typePluralCollection)};default:return{singular:t(a.typeProject),plural:t(a.typePluralProject)}}}),m=i(()=>v.value?.current??0),l=i(()=>v.value?.max??null),C=i(()=>l.value?Math.round(m.value/l.value*100):0),o=i(()=>l.value!==null&&m.value>=l.value),w=i(()=>l.value!==null&&C.value>=75);return B(o,f=>{x.value=f},{immediate:!0}),(f,E)=>w.value?(d(),S(e(F),{key:0,type:o.value?"critical":"warning",header:o.value?e(A)(e(t)(e(a).limitReached,{type:r.value.singular})):e(t)(e(a).approachingLimit,{type:r.value.singular,current:m.value,max:l.value}),class:"mb-4"},{default:g(()=>[y("div",R,[o.value?(d(),_(j,{key:0},[s(c(e(t)(e(a).limitReachedDescription,{type:r.value.singular,max:l.value}))+" ",1),y("div",q,[n(e(M),{type:"colored",color:"red",to:"https://support.modrinth.com",target:"_blank"},{default:g(()=>[n(e(P)),s(c(e(t)(e(a).contactSupport)),1)]),_:1})])],64)):(d(),_(j,{key:1},[s(c(e(t)(e(a).approachingLimitDescription,{type:r.value.singular,max:l.value,typePlural:r.value.plural}))+" ",1),y("div",Y,[n(e(M),{type:"colored",color:"orange",to:"https://support.modrinth.com",target:"_blank"},{default:g(()=>[n(e(P)),s(c(e(t)(e(a).contactSupport)),1)]),_:1})])],64))])]),_:1},8,["type","header"])):D("",!0)}});export{U as _};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.