Add handling for new loaders, fix max height being applied when scrolling is disabled from #2898 (#3761)
This commit is contained in:
parent
0278241006
commit
858c7e393f
@ -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>
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user