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

View File

@ -177,8 +177,15 @@ export const formatCategory = (name) => {
return 'Colored Lighting' return 'Colored Lighting'
} else if (name === 'optifine') { } else if (name === 'optifine') {
return '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) return capitalizeString(name)
} }