Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into markdown-links
Browse files Browse the repository at this point in the history
  • Loading branch information
triphora authored Aug 2, 2023
2 parents 51fb065 + 7c2ea3d commit ce7f00d
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: push

jobs:
deploy:
if: github.repository_owner == 'modrinth'
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion components/ui/NotificationItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
>
<VersionIcon />
<nuxt-link
:to="getVersionLink(notif.extra_data.project, notif.extra_data.version.name)"
:to="getVersionLink(notif.extra_data.project, notif.extra_data.version)"
class="text-link"
>
{{ notif.extra_data.version.name }}
Expand Down
2 changes: 1 addition & 1 deletion composables/tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const useTags = () =>
'folia',
],
dataPackLoaders: ['datapack'],
modLoaders: ['forge', 'fabric', 'quilt', 'liteloader', 'modloader', 'rift'],
modLoaders: ['forge', 'fabric', 'quilt', 'liteloader', 'modloader', 'rift', 'neoforge'],
},
projectViewModes: ['list', 'grid', 'gallery'],
approvedStatuses: ['approved', 'archived', 'unlisted', 'private'],
Expand Down
5 changes: 5 additions & 0 deletions helpers/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ export async function fetchNotifications() {

export function groupNotifications(notifications, includeRead = false) {
const grouped = []

for (const notification of notifications) {
notification.grouped_notifs = []
}

for (const notification of notifications.filter((notif) => includeRead || !notif.read)) {
// Group notifications of the same thread or project id
if (notification.body) {
Expand Down
8 changes: 7 additions & 1 deletion helpers/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ export const configuredXss = new xss.FilterXSS({
try {
const url = new URL(value)

if (url.hostname.includes('wsrv.nl')) {
url.searchParams.delete('errorredirect')
}

const allowedHostnames = [
'imgur.com',
'i.imgur.com',
Expand All @@ -88,9 +92,11 @@ export const configuredXss = new xss.FilterXSS({
return xss.safeAttrValue(
tag,
name,
`https://wsrv.nl/?url=${encodeURIComponent(value)}&n=-1`,
`https://wsrv.nl/?url=${encodeURIComponent(url.toString())}&n=-1`,
cssFilter
)
} else {
return xss.safeAttrValue(tag, name, url.toString(), cssFilter)
}
} catch (err) {}
}
Expand Down
3 changes: 3 additions & 0 deletions pages/auth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ const route = useRoute()
}
@media screen and (max-width: 25.5rem) {
width: auto;
margin: 1rem;
.third-party .btn {
grid-column: 1 / 3;
}
Expand Down
8 changes: 6 additions & 2 deletions pages/auth/sign-up.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
type="password"
placeholder="Confirm password"
/>
<Checkbox v-model="subscribe" class="subscribe-btn" label="Subscribe updates about Modrinth" />
<Checkbox
v-model="subscribe"
class="subscribe-btn"
label="Subscribe to updates about Modrinth"
/>
<p>
By creating an account, you agree to Modrinth's
<nuxt-link to="/legal/terms" class="text-link">terms</nuxt-link> and
Expand All @@ -43,7 +47,7 @@
Create account <RightArrowIcon />
</button>
<p>
Already have an account yet?
Already have an account?
<nuxt-link
class="text-link"
:to="`/auth/sign-in${route.query.redirect ? `?redirect=${route.query.redirect}` : ''}`"
Expand Down
6 changes: 5 additions & 1 deletion pages/auth/welcome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
Thank you for creating an account. You can now follow and create projects, receive updates
about your favorite projects, and more!
</p>
<Checkbox v-model="subscribe" class="subscribe-btn" label="Subscribe updates about Modrinth" />
<Checkbox
v-model="subscribe"
class="subscribe-btn"
label="Subscribe to updates about Modrinth"
/>
<button class="btn btn-primary continue-btn" @click="continueSignUp">Continue</button>
<p>
By creating an account, you agree to Modrinth's
Expand Down
2 changes: 1 addition & 1 deletion pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<nuxt-link to="/mods" class="iconified-button brand-button"> Discover mods </nuxt-link>
<nuxt-link
v-if="!auth.user"
to="sign-up"
to="/auth/sign-up"
class="iconified-button outline-button"
rel="noopener nofollow"
>
Expand Down
3 changes: 2 additions & 1 deletion pages/search/[searchProjectType].vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
!showAllLoaders &&
x.name !== 'forge' &&
x.name !== 'fabric' &&
x.name !== 'quilt'
x.name !== 'quilt' &&
x.name !== 'neoforge'
) {
return false
} else if (projectType.id === 'mod' && showAllLoaders) {
Expand Down
6 changes: 3 additions & 3 deletions pages/settings/account.vue
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@
</div>
<p></p>
<div class="input-group push-right">
<button class="iconified-button brand-button" @click="$refs.manageProvidersModal.hide()">
<CheckIcon />
Finish editing
<button class="iconified-button" @click="$refs.manageProvidersModal.hide()">
<XIcon />
Close
</button>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion plugins/shorthands.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ export const formatCategory = (name) => {
return 'BungeeCord'
} else if (name === 'liteloader') {
return 'LiteLoader'
} else if (name === 'neoforge') {
return 'NeoForge'
} else if (name === 'game-mechanics') {
return 'Game Mechanics'
} else if (name === 'worldgen') {
Expand Down Expand Up @@ -312,7 +314,7 @@ export const formatVersions = (versionArray) => {

for (const interval of newIntervals) {
if (interval.length === 2) {
output.push(`${interval[0][0]}${interval[1][0]}`)
output.push(`${interval[0][0]}${interval[1][0]}`)
} else {
output.push(interval[0][0])
}
Expand Down

0 comments on commit ce7f00d

Please sign in to comment.