Skip to content

Commit

Permalink
fix loadingIndicator clipping top left corner
Browse files Browse the repository at this point in the history
  • Loading branch information
ToBinio committed Apr 7, 2024
1 parent 6699b4c commit cca40c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
7 changes: 3 additions & 4 deletions theseus_gui/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,7 @@ command_listener(async (e) => {
</section>
</div>
<div class="router-view">
<ModrinthLoadingIndicator
offset-height="var(--appbar-height)"
offset-width="var(--sidebar-width)"
/>
<ModrinthLoadingIndicator />
<RouterView v-slot="{ Component }">
<template v-if="Component">
<Suspense @pending="loading.startLoading()" @resolve="loading.stopLoading()">
Expand Down Expand Up @@ -474,6 +471,8 @@ command_listener(async (e) => {
overflow-x: hidden;
background-color: var(--color-bg);
border-top-left-radius: var(--radius-xl);
position: relative;
}
}
}
Expand Down
15 changes: 2 additions & 13 deletions theseus_gui/src/components/modrinth-loading-indicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ export default defineComponent({
default:
'repeating-linear-gradient(to right, var(--color-brand) 0%, var(--color-brand) 100%)',
},
offsetWidth: {
type: String,
default: '208px',
},
offsetHeight: {
type: String,
default: '52px',
},
},
setup(props, { slots }) {
const indicator = useLoadingIndicator({
Expand All @@ -52,12 +44,9 @@ export default defineComponent({
'div',
{
style: {
position: 'fixed',
top: props.offsetHeight,
right: 0,
left: props.offsetWidth,
position: 'absolute',
pointerEvents: 'none',
width: `calc((100vw - ${props.offsetWidth}) * ${indicator.progress.value / 100})`,
width: `calc(100% * ${indicator.progress.value / 100})`,
height: `${props.height}px`,
opacity: indicator.isLoading.value ? 1 : 0,
background: props.color || undefined,
Expand Down

0 comments on commit cca40c7

Please sign in to comment.