You've already forked AstralRinth
forked from didirus/AstralRinth
New features (#592)
* New features * Lots of bug fixes * Fix respack creation * Improve mobile nav with more project types * Fix resolution sorting and remove icons * Move cookie consent to top on small devices to get out of the way of navigation * Move cookie consent + fix hydration * Fix project editing + update search features * Centralize hardcoding of loader/category names, fix cookie consent shadow, fix mobile navbar rounding * Fix plugin platforms formatting * Kitchen sink! * Add support for display names * LiteLoader formatting * Fixed "show all loaders" toggle not resetting when changing pages * Allow multiple loaders in version filter controls * Fix clear filters button * Revert "Add support for display names" This reverts commit 370838763d86bcae51bf06c304248f7a1f8fc28f. * Let's see how this goes. Upstream filters, attempt 1 * github? hello? * No more "Server mod" on plugins * Fix formatting of project types in project creation * Move where project creation sets the resource pack loader * Allow setting pixelated image-rendering Allows to apply 'style' attribute to IMG tags with value 'image-rendering' set to 'pixelated', which can be useful for people who use pixel art in their READMEs (to demonstrate items, for example). * fix user page + hydration issue fix from Brawaru * Rename to proxies * Make categories use title case * Always show project type on moderation page, improve project type display on project pages * Remove invalid key * Missed a check * Fix browse menu animation * Fix disabled button condition and minimum width for 2 lines * Body -> Description in edit pages * More casing consistency issues * Fix duplicate version URLs * Fix version creation * Edit URLs, fix privacy page buttons * Fix notifications popup overlaying * Final merge fixes Co-authored-by: Prospector <prospectordev@gmail.com> Co-authored-by: Sasha Sorokin <10401817+Brawaru@users.noreply.github.com>
This commit is contained in:
@@ -3,13 +3,15 @@
|
||||
<div
|
||||
ref="container"
|
||||
class="container"
|
||||
:style="{ visibility: shown ? 'visible' : 'hidden' }"
|
||||
:class="{ 'mobile-menu-open': mobileMenuOpen }"
|
||||
:style="{
|
||||
visibility: shown ? 'visible' : 'hidden',
|
||||
}"
|
||||
>
|
||||
<div class="card banner">
|
||||
<span>
|
||||
Modrinth uses cookies for various purposes, including advertising.<br />
|
||||
We encourage you to review your privacy settings by clicking on the
|
||||
button below:
|
||||
Modrinth uses cookies for various purposes. We encourage you to review
|
||||
your privacy settings by clicking on the button below:
|
||||
</span>
|
||||
<div class="actions">
|
||||
<button class="btn button" @click="review">Review</button>
|
||||
@@ -24,6 +26,12 @@
|
||||
import scopes from '~/privacy-toggles'
|
||||
export default {
|
||||
name: 'CookieConsent',
|
||||
props: {
|
||||
mobileMenuOpen: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
shown: false,
|
||||
@@ -68,15 +76,18 @@ export default {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
|
||||
z-index: 20;
|
||||
z-index: 2;
|
||||
position: fixed;
|
||||
bottom: 4rem;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
|
||||
.banner {
|
||||
padding: 1rem;
|
||||
font-size: 1.05rem;
|
||||
border-radius: 0;
|
||||
margin-bottom: 0;
|
||||
box-shadow: 0 0 20px 2px rgba(0, 0, 0, 0.3);
|
||||
padding: 1rem 1rem calc(var(--size-mobile-navbar-height) + 1rem);
|
||||
transition: padding-bottom 0.25s ease-in-out;
|
||||
}
|
||||
.actions {
|
||||
display: flex;
|
||||
@@ -89,11 +100,23 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 750px) {
|
||||
bottom: 0;
|
||||
.banner {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
&.mobile-menu-open {
|
||||
.banner {
|
||||
margin-bottom: 0;
|
||||
padding-bottom: calc(var(--size-mobile-navbar-height-expanded) + 1rem);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 750px) {
|
||||
.banner {
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
&.mobile-menu-open {
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +125,9 @@ export default {
|
||||
text-align: unset;
|
||||
|
||||
.banner {
|
||||
max-width: 18vw;
|
||||
border-radius: var(--size-rounded-card);
|
||||
width: 18vw;
|
||||
min-width: 16rem;
|
||||
border-left: solid 5px var(--color-brand);
|
||||
margin: 0 2rem 2rem 0;
|
||||
}
|
||||
|
||||
@@ -28,13 +28,16 @@
|
||||
</nuxt-link>
|
||||
</p>
|
||||
</div>
|
||||
<div class="side-type">
|
||||
<div
|
||||
v-if="type !== 'resourcepack' && projectTypeDisplay !== 'plugin'"
|
||||
class="side-type"
|
||||
>
|
||||
<div
|
||||
v-if="clientSide === 'optional' && serverSide === 'optional'"
|
||||
class="side-descriptor"
|
||||
>
|
||||
<InfoIcon aria-hidden="true" />
|
||||
Universal {{ type }}
|
||||
Universal {{ projectTypeDisplay }}
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
@@ -44,7 +47,7 @@
|
||||
class="side-descriptor"
|
||||
>
|
||||
<InfoIcon aria-hidden="true" />
|
||||
Client {{ type }}
|
||||
Client {{ projectTypeDisplay }}
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
@@ -54,8 +57,16 @@
|
||||
class="side-descriptor"
|
||||
>
|
||||
<InfoIcon aria-hidden="true" />
|
||||
Server {{ type }}
|
||||
Server {{ projectTypeDisplay }}
|
||||
</div>
|
||||
<div v-else-if="moderation" class="side-descriptor">
|
||||
<InfoIcon aria-hidden="true" />
|
||||
A {{ projectTypeDisplay }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="moderation" class="side-descriptor">
|
||||
<InfoIcon aria-hidden="true" />
|
||||
A {{ projectTypeDisplay }}
|
||||
</div>
|
||||
<p class="description">
|
||||
{{ description }}
|
||||
@@ -217,6 +228,16 @@ export default {
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
moderation: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
projectTypeDisplay() {
|
||||
return this.$getProjectTypeForDisplay(this.type, this.categories)
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -43,11 +43,15 @@ export default {
|
||||
|
||||
<style scoped>
|
||||
button {
|
||||
text-transform: capitalize;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-transform: capitalize;
|
||||
background-color: transparent;
|
||||
border-radius: 0;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
button span::first-letter {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
>
|
||||
<Multiselect
|
||||
v-if="getValidLoaders().length > 1"
|
||||
v-model="selectedLoader"
|
||||
v-model="selectedLoaders"
|
||||
:options="getValidLoaders()"
|
||||
:custom-label="(value) => value.charAt(0).toUpperCase() + value.slice(1)"
|
||||
:multiple="false"
|
||||
:multiple="true"
|
||||
:searchable="false"
|
||||
:show-no-results="false"
|
||||
:close-on-select="true"
|
||||
:clear-search-on-select="false"
|
||||
:show-labels="false"
|
||||
:allow-empty="false"
|
||||
:allow-empty="true"
|
||||
:disabled="getValidLoaders().length === 1"
|
||||
placeholder="Filter loader..."
|
||||
@input="updateVersionFilters()"
|
||||
@@ -51,10 +51,12 @@
|
||||
/>
|
||||
<button
|
||||
title="Clear filters"
|
||||
:disabled="selectedLoader === null && selectedGameVersions.length === 0"
|
||||
:disabled="
|
||||
selectedLoaders.length === 0 && selectedGameVersions.length === 0
|
||||
"
|
||||
class="iconified-button"
|
||||
@click="
|
||||
selectedLoader = null
|
||||
selectedLoaders = []
|
||||
selectedGameVersions = []
|
||||
updateVersionFilters()
|
||||
"
|
||||
@@ -90,7 +92,7 @@ export default {
|
||||
cachedValidVersions: null,
|
||||
cachedValidLoaders: null,
|
||||
selectedGameVersions: [],
|
||||
selectedLoader: null,
|
||||
selectedLoaders: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -124,8 +126,10 @@ export default {
|
||||
this.selectedGameVersions.some((gameVersion) =>
|
||||
projectVersion.game_versions.includes(gameVersion)
|
||||
)) &&
|
||||
(this.selectedLoader === null ||
|
||||
projectVersion.loaders.includes(this.selectedLoader))
|
||||
(this.selectedLoaders.length === 0 ||
|
||||
this.selectedLoaders.some((loader) =>
|
||||
projectVersion.loaders.includes(loader)
|
||||
))
|
||||
)
|
||||
this.$emit('updateVersions', temp)
|
||||
},
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
<span
|
||||
v-for="category in categoriesFiltered"
|
||||
:key="category.name"
|
||||
v-html="
|
||||
category.icon +
|
||||
(category.name === 'modloader' ? 'ModLoader' : category.name)
|
||||
"
|
||||
v-html="category.icon + $formatCategory(category.name)"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -33,7 +30,8 @@ export default {
|
||||
.filter(
|
||||
(x) =>
|
||||
this.categories.includes(x.name) &&
|
||||
(!x.project_type || x.project_type === this.type)
|
||||
(!x.project_type || x.project_type === this.type) &&
|
||||
x.name !== 'minecraft'
|
||||
)
|
||||
},
|
||||
},
|
||||
@@ -52,7 +50,6 @@ export default {
|
||||
flex-direction: row;
|
||||
color: var(--color-icon);
|
||||
margin-right: 1em;
|
||||
text-transform: capitalize;
|
||||
|
||||
svg {
|
||||
width: 1rem;
|
||||
|
||||
@@ -69,7 +69,6 @@ export default {
|
||||
}
|
||||
|
||||
span {
|
||||
text-transform: capitalize;
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user