You've already forked AstralRinth
forked from didirus/AstralRinth
Small fixes (#1061)
This commit is contained in:
@@ -238,6 +238,12 @@ export const inferVersionInfo = async function (rawFile, project, gameVersions)
|
|||||||
case 10:
|
case 10:
|
||||||
newGameVersions = getRange('1.19', '1.19.3')
|
newGameVersions = getRange('1.19', '1.19.3')
|
||||||
break
|
break
|
||||||
|
case 11:
|
||||||
|
newGameVersions = getRange('23w03a', '23w05a')
|
||||||
|
break
|
||||||
|
case 12:
|
||||||
|
newGameVersions.push('1.19.4')
|
||||||
|
break
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -279,6 +285,9 @@ export const inferVersionInfo = async function (rawFile, project, gameVersions)
|
|||||||
case 12:
|
case 12:
|
||||||
newGameVersions.push('1.19.3')
|
newGameVersions.push('1.19.3')
|
||||||
break
|
break
|
||||||
|
case 13:
|
||||||
|
newGameVersions.push('1.19.4')
|
||||||
|
break
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ export const configuredXss = new xss.FilterXSS({
|
|||||||
/^https?:\/\/(www\.)?youtube(-nocookie)?\.com\/embed\/[a-zA-Z0-9_-]{11}(\?&autoplay=[0-1]{1})?$/,
|
/^https?:\/\/(www\.)?youtube(-nocookie)?\.com\/embed\/[a-zA-Z0-9_-]{11}(\?&autoplay=[0-1]{1})?$/,
|
||||||
remove: ['&autoplay=1'], // Prevents autoplay
|
remove: ['&autoplay=1'], // Prevents autoplay
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
regex: /^https?:\/\/(www\.)?discord\.com\/widget\?id=\d{18,19}(&theme=\w+)?$/,
|
||||||
|
remove: [/&theme=\w+/],
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
for (const source of allowedSources) {
|
for (const source of allowedSources) {
|
||||||
@@ -107,13 +111,16 @@ export const md = (options = {}) => {
|
|||||||
const url = new URL(src)
|
const url = new URL(src)
|
||||||
|
|
||||||
const allowedHostnames = [
|
const allowedHostnames = [
|
||||||
|
'imgur.com',
|
||||||
'i.imgur.com',
|
'i.imgur.com',
|
||||||
'cdn-raw.modrinth.com',
|
'cdn-raw.modrinth.com',
|
||||||
'cdn.modrinth.com',
|
'cdn.modrinth.com',
|
||||||
'staging-cdn-raw.modrinth.com',
|
'staging-cdn-raw.modrinth.com',
|
||||||
'staging-cdn.modrinth.com',
|
'staging-cdn.modrinth.com',
|
||||||
|
'github.com',
|
||||||
'raw.githubusercontent.com',
|
'raw.githubusercontent.com',
|
||||||
'img.shields.io',
|
'img.shields.io',
|
||||||
|
'i.postimg.cc',
|
||||||
]
|
]
|
||||||
|
|
||||||
if (allowedHostnames.includes(url.hostname)) {
|
if (allowedHostnames.includes(url.hostname)) {
|
||||||
|
|||||||
@@ -85,6 +85,14 @@
|
|||||||
:key="`donation-link-${index}`"
|
:key="`donation-link-${index}`"
|
||||||
class="input-group donation-link-group"
|
class="input-group donation-link-group"
|
||||||
>
|
>
|
||||||
|
<input
|
||||||
|
v-model="donationLink.url"
|
||||||
|
type="url"
|
||||||
|
maxlength="2048"
|
||||||
|
placeholder="Enter a valid URL"
|
||||||
|
:disabled="!hasPermission"
|
||||||
|
@input="updateDonationLinks"
|
||||||
|
/>
|
||||||
<Multiselect
|
<Multiselect
|
||||||
v-model="donationLink.platform"
|
v-model="donationLink.platform"
|
||||||
placeholder="Select platform"
|
placeholder="Select platform"
|
||||||
@@ -95,14 +103,6 @@
|
|||||||
:disabled="!hasPermission"
|
:disabled="!hasPermission"
|
||||||
@update:model-value="updateDonationLinks"
|
@update:model-value="updateDonationLinks"
|
||||||
/>
|
/>
|
||||||
<input
|
|
||||||
v-model="donationLink.url"
|
|
||||||
type="url"
|
|
||||||
maxlength="2048"
|
|
||||||
placeholder="Enter a valid URL"
|
|
||||||
:disabled="!hasPermission"
|
|
||||||
@input="updateDonationLinks"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="button-group">
|
<div class="button-group">
|
||||||
<button
|
<button
|
||||||
@@ -235,9 +235,9 @@ export default defineNuxtComponent({
|
|||||||
link.platform = 'Patreon'
|
link.platform = 'Patreon'
|
||||||
} else if (url.includes('ko-fi.com')) {
|
} else if (url.includes('ko-fi.com')) {
|
||||||
link.platform = 'Ko-fi'
|
link.platform = 'Ko-fi'
|
||||||
} else if (url.includes('paypal.com')) {
|
} else if (url.includes('paypal.com') || url.includes('paypal.me')) {
|
||||||
link.platform = 'Paypal'
|
link.platform = 'PayPal'
|
||||||
} else if (url.includes('buymeacoffee.com')) {
|
} else if (url.includes('buymeacoffee.com') || url.includes('buymeacoff.ee')) {
|
||||||
link.platform = 'Buy Me a Coffee'
|
link.platform = 'Buy Me a Coffee'
|
||||||
} else if (url.includes('github.com/sponsors')) {
|
} else if (url.includes('github.com/sponsors')) {
|
||||||
link.platform = 'GitHub Sponsors'
|
link.platform = 'GitHub Sponsors'
|
||||||
|
|||||||
Reference in New Issue
Block a user