Add handling for new loaders, fix max height being applied when scrolling is disabled from #2898 (#3761)

This commit is contained in:
Prospector 2025-06-09 14:59:59 -07:00 committed by GitHub
parent 0278241006
commit 858c7e393f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 6 deletions

View File

@ -3,11 +3,18 @@
<div
class="wrapper-wrapper"
:class="{
'top-fade': !scrollableAtTop && !props.disableScrolling,
'bottom-fade': !scrollableAtBottom && !props.disableScrolling,
'top-fade': !scrollableAtTop && !disableScrolling,
'bottom-fade': !scrollableAtBottom && !disableScrolling,
}"
>
<div ref="scrollablePane" class="scrollable-pane" @scroll="onScroll">
<div
ref="scrollablePane"
:class="{
'max-h-[19rem]': !disableScrolling,
}"
class="scrollable-pane"
@scroll="onScroll"
>
<slot />
</div>
</div>
@ -17,7 +24,7 @@
<script setup lang="ts">
import { ref, onMounted, onUnmounted } from 'vue'
const props = withDefaults(
withDefaults(
defineProps<{
disableScrolling?: boolean
}>(),
@ -100,6 +107,5 @@ function onScroll({ target: { scrollTop, offsetHeight, scrollHeight } }) {
overflow-y: auto;
overflow-x: hidden;
position: relative;
max-height: 19rem;
}
</style>

View File

@ -177,8 +177,15 @@ export const formatCategory = (name) => {
return 'Colored Lighting'
} else if (name === 'optifine') {
return 'OptiFine'
} else if (name === 'bta-babric') {
return 'BTA (Babric)'
} else if (name === 'legacy-fabric') {
return 'Legacy Fabric'
} else if (name === 'java-agent') {
return 'Java Agent'
} else if (name === 'nilloader') {
return 'NilLoader'
}
return capitalizeString(name)
}